How to Create a Drupal 7 Backup with Backup and Migrate


In this comprehensive tutorial, we will demonstrate the process of making Drupal backups with the use of this Backup and Migrate module. For individuals looking to duplicate Drupal files and databases by hand, we also cover the detailed steps to accomplish this backup process. Note that, the following indicated methods can be useful for a website made with Drupal 7.

Why You Need to Create Drupal Backups?

Fairly speaking, there are various reasons to make a backup of your Drupal data. Obviously, it’s a great way to create a development environment that is similar to the production site when there are some changes made to the existing website. In this way, you are free to make your experimentation without affecting the SEO rankings and page views.

Based on our researches, there are around 30,000 websites attacked on a daily basis, and it has been much easier than ever to get stuck into Drupal security issues. A good solution to avoid data loss caused by human error, botched updates and corrupt hard drives is to do data backups regularly. To say the least, every piece of software has the possibility of getting broken, and the backups for the core data should be a sovereign remedy for this kind of unexpected disaster.

How to Back up & Restore a Drupal Website Automatically?

Setting up Drupal backups will be a breeze with the use of “Backup and Migrate” module. To be precise, this Drupal module not only provides you the ability to backup all your MySQL database, files and code, but also allows you to migrate a website between different environments. More importantly, it fully supports bzip, zip and gzip compression as well as the automatic scheduled backups.

Here is a quick checklist of what you need to do for duplicating and restoring your Drupal site with the “Backup and Migrate” module.

Step 1 – Enable Backup and Migrate Module

The first thing you need to do is initialize this “Backup and Migrate” module. To begin, just download this useful tool via this page. Make sure that you would download the right version that is compatible with the current version of Drupal from the “Downloads” table.

Module Download Table

To install the newly-downloaded module package, just log onto your Drupal administrator area and then jump into the upper-right “Modules” section. In the next snapshot, click the link labelled as “Install new module” to proceed.

Install New Module

This will open a new dialogue window where you are allowed to install a module/theme from a URL. Allowing for convenience and operability, you’d better click to upload your module via this “Choose File” button. After the completion of the upload task, do remember to click on the “Install” button.

Upload Module Package

The only thing left to do is follow the given instructions to initialize this module on your “Modules” page. Just like enabling any other Drupal modules, you only need to check the respective “Enabled” box and then scroll down to “Save Configuration” as below.

Enable Your Module

Step 2 – Specify File System Path

Assuming that you’ve enabled the “Backup and Migrate” module, you can navigate to “Configuration” > “System” to locate and click on the newly-added module. It is quite common that a warning saying that “You must specify a private file system path in the file system settings to backup the server” appears onscreen. To solve this problem, just hit on the clickable “File System Settings” link to specify your file system path.

Specify File System Path

Inside the “Private File System Path” text box, just modify the system path to store the private or uploaded files. As a matter of course, you can enter any desired path here.

Enter File System Path

Step 3 – Make Configurations to the Module

To customize the “Backup and Migrate” module to your liking, you should revert back to “Configurations” > “System” > “Backup and Migrate” once more. As you can see, there are a couple of tabs available from this configuration page:

Backup & Migrate Options

  • Destinations – is where to store your future backup files. Generally speaking, your files/data can be downloaded to a computer, emailed to one email account or saved to a directory. To edit or delete certain destinations, you need to modify the “Manual Backups Directory” and the “Scheduled Backups Directory” sections.
  • Schedules – is where to backup the Drupal database and files on a regular schedule. If you define a number of backups for a schedule, then those old backups would be deleted once the new ones are created.
  • Profiles – is where to save the table exclusion settings, such as backup file name, timestamp and compression settings. It is also possible to create more profiles by using the “Add Profiles” tab.
  • Backup – is where to run simple backups of your Drupal site. The included “Quick Backup” tab gives you the option to decide whether download the database. Once done with the above settings, remember to press the “Backup Now” button to start backing up your website.

Important to Note: This will open a download dialogue that prompts you to save the base backups to your computer. If you’re going to have a full data backup, you will have to click on the “Advanced Backup” option. During this process, you’d better not exclude database tables unless you want to break the Drupal install.

Step 4 – Restore from the Backup

This step is extremely useful when your Drupal 7 site goes down accidentally. Honestly speaking, the prior backups can large simplify the task of restoring all of your data and files. To do that, you only need to enter the below “Restore” tab and follow the prompt to perform this task. If you run into any problems during this period, you can navigate to “Configurations” > “Development” to clear all caches.

Restore from the Backup