Published Aug 22, 2025
Updated Aug 22, 2025
By Simon

back and migrate drupal 9 quick backup UI

A Development Tool, Backup and Migrate makes it easy to back up your site, after dump and archive were removed from the Drush CLI tool, I found this is the easiest way to create backups and maintain a backup schedule and archive. 

Basic Info

Actively maintained Yes
Requires No extra requirements

https://www.drupal.org/project/backup_migrate

How to Use Backup and Migrate

Out of the box, you can download a backup and restore via the UI by upload. To back up the site database and download it, all you need to do is install the module, visit the Backup and Migrate page and click backup now.

It is highly configurable and can store backs up in a private file system, schedule backups, restore databases, and lots more.

Using a Private File System

Note on local backups and Private file system

If you have not set up your private file system, you will get a message:

The backup could not be saved to 'private://backup_migrate/' because your private files system path has not been set. 

If you get that message you will need to create a private files system path, you can also check the File System page.

Manage > Configuration > Media > File system
/admin/config/media/file-system 

If the above message is present, you will also get the following message on the file system page.

Private file system path Not set. 
An existing local file system path for storing private files. It should be writeable by Drupal and not accessible over the web. This must be changed in settings.php

To set the private file system path, use the below snippet, which will tell Drupal that the private file directory is outside the Drupal site root. This is the best place to put it, and you can name it anything you like. It this case, the directory is private-file. Add the snippet to your settings.php.

$settings['file_private_path'] = $app_root . '/../private-file';

You will also need to make the directory in the location outside the app root and make it writeable. You may also need to add a .htaccess file to the directory if it is not created automatically. Check the status report page of your Drupal instance to see more details.

# make directory
mkdir private-file

# change owner:group to be user and apache (www-data)
chown my-user:www-data private-file

Schedule your Backups

To schedule backups you need to set up a private directory as we have just done. Other than that, it is an extremely simple process. Visit the Schedules tab on the Backup and Migrate page, click add schedule, fill out the form, and click save.

The information need to set up a schedule is self-explanatory. One great feature I will point out is the number to keep setting. This will delete any backup more than the number stipulated, which is great to keep your server storage in check.

Summary

The Backup and Migrate module is one of those essential modules for Drupal. It takes the headache out of making backups so you can safely update your. 

As well as being able to manually back up your site for pre-update backups, you can also make and keep scheduled back-ups to a private file system. 

Even though we have only discussed local (local to your installation) private directories and backup destinations, you can also set up remote back destinations as well. I have never had the need for this, but for additional backup destinations, you can use Backup Migrate Flysystem

I hope this has been useful for you. To learn more about Drupal, front-end development and design, be sure to sign up for the newsletter below. Thanks for reading.

 

Tags