Drupal Backup and Migrate: backups, schedules and restoring
· The AYT team · 5 min read

Drupal Backup and Migrate is a contributed module that backs up the site's database and files straight from the admin, by hand or on a schedule, and restores the database from a saved or uploaded file. The current release, 5.1.5, works with Drupal 10.3+ and Drupal 11. You install it with composer require 'drupal/backup_migrate:^5.1', and backups saved on the server go into Drupal's private files folder.
What the module does and doesn't do
Backup and Migrate has four preconfigured backup sources: the Drupal database, the public files, the private files and the entire site. You can download them straight to your browser or save them on the server, compressed with gzip, bzip or zip and optionally encrypted.
What it doesn't do:
- it keeps backups only on the same server, unless you add the Backup Migrate Flysystem module for other destinations;
- restoring from the interface is designed for the database; files you put back yourself;
- it doesn't replace your host's backups: if the server fails, the backups on it fail with it.
It's a good quick safety net before an update, or a way to download a copy of the database when you have no access to phpMyAdmin or a command line.
Step 1: install the module
In a Composer project (the usual case for Drupal 10 and 11):
composer require 'drupal/backup_migrate:^5.1'
drush pm:install backup_migrate -y
Without drush, enable it under Extend by ticking Backup and Migrate. Its interface is under Configuration → Development → Backup and Migrate.
Step 2: set up the private folder
The default destination for server-side backups is private://backup_migrate/, a subfolder of the private files directory. If Drupal doesn't have a private directory yet, set one in settings.php:
$settings['file_private_path'] = '../private';
The path must be outside the web root. In a Composer project, where the web root is web/, ../private means a folder next to web/, so it can't be reached from a browser. Clear the cache after the change (drush cache:rebuild) and check in Reports → Status report that the private directory shows as available and protected.
Step 3: a manual backup
On the module's main page (Quick Backup) you choose:
- the source: database, public files or the entire site;
- the destination: download to your browser or the private folder on the server;
- then press the backup button.
For a module or core update, a database backup downloaded to your machine is usually enough: you can restore the code from Composer, and uploaded files don't change during an update.
Step 4: scheduled backups
The module ships with a daily schedule that is off by default. Turn it on in the Schedules tab: pick the source, the destination and how many copies to keep (with no limit, copies pile up and fill the disk).
Schedules run with Drupal's cron. If the site relies only on the Automated Cron module, which runs on page visits, the backup happens at the first visit after the interval, so at irregular times. On a production site, set up a server cron job that runs drush cron or calls the site's cron URL.
Step 5: restoring
In the Restore tab, upload a database backup file or pick one already saved on the server, then confirm. Restoring replaces the whole database, so everything written to the site after the backup was taken is lost. Put the site in maintenance mode first.
Two practical limits:
- the uploaded file must fit within PHP's
upload_max_filesizeandpost_max_size; a large database can exceed them even compressed; - the restore runs in a web request, so a very large database can stop at
max_execution_time. For large databases, phpMyAdmin ordrush sql:cli < backup.sqlare safer.
Alternatives without the module
If you have command-line access, drush does the same without anything installed in the site:
drush sql:dump --gzip --result-file=../backups/db.sql
drush archive:dump
archive:dump puts code, files and database into one archive. Without SSH, export the database from phpMyAdmin and download the files via FTPS.
Whatever the tool, the rule is the same: a good backup lives in more than one place, at least one of which isn't the site's server, and it has been restored at least once as a test.
Frequently asked questions
Does Backup and Migrate work on Drupal 11?
Yes. Release 5.1.5, published in July 2026, declares compatibility with Drupal 10.3+ and Drupal 11 and is covered by the Drupal security team.
Can I move a site to another server with Backup and Migrate?
You can move the database: back it up on the old server and restore it on the new one, after installing the same code. The code (with vendor/) and the files you move separately. For a complete move, a drush archive:dump or a migration done by your host is simpler.
Drupal backups on AYT hosting
On AYT's paid plans, backups happen without any module: daily for the last 7 days, weekly for 4 weeks and monthly for 24 months, kept in 3 locations. You restore from the panel, the whole site or individual files.

The Drupal Toolkit also saves the database before every core update and before a staging copy is pushed over the live site. If you still want Backup and Migrate, install it from the Drupal Toolkit's Extensions page: enter the package drupal/backup_migrate under Install, then switch it on with Turn on in the same list. The web root is /web, so a private folder set to ../private stays outside it. You can also export the database from phpMyAdmin at any time. See restoring from a backup for the panel steps, the supported apps and the plans.
