This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

CloudwaysCDN — a powerful solution that offers superior performance and satisfied global audience for your business. Read More

Here’s How To Create A Backup Of Drupal 7 Site Using Backup And Migrate Module

Updated on  8th February

3 Min Read
Reading Time: 3 minutes

In the age of computers and technology, the word ‘backup’ holds a very important value. There’s always a lingering risk of losing the data or compromising its security. To avoid such cases it is important to always have a backup ready in case anything goes awry. While Drupal is often touted as one of the most secure CMS out there, it too is susceptible to attacks.

backup drupal 7 website via backup and migrate module

In a previous post, I showed How To Backup A Drupal 8 Site. This time, I’ll show you how to avoid losing your data by maintaining backups. Here’s how you can make a backup of your Drupal 7 site easily using the Backup and Migrate Module.

Download and Install Backup and Migrate Module

The first thing that you’ll need to do is download and install the Backup and Migrate module from its project page on Drupal.org.

Create a Database Backup

Now, make a backup of your site’s database using the Backup and Migrate module. Navigate to admin->configuration->Backup and Migrate. Before you do this, make sure that you set a private file directory on your local storage that is not accessible by the web in the File System settings of Drupal.

filesystem path drupal 7

After doing so, you can start making a backup of your database.

backup of database drupal 7

Copy Filesystem

Next, you will need to copy all the files including the .htaccess file in your Drupal site to the new location or server which will hold your copy of the site.

Delete and Replace settings.php

In this new site, delete settings.php in the sites/default directory. Now copy the settings.php from your old sites sites/default directory to the new one.

Install the New Drupal Site

Now, in your new location visit yoursitename.com/install and install Drupal as you normally would.

Enable Backup and Migrate

In your new site, go to admin/modules and enable the Backup and Migrate module. The module should be installed on the new site, since you had copied the entire filesystem of the original site to the new one.

Restore Database Using Backup and Migrate

Next, simply use the Backup and Migrate module to restore the database using the backup that you made earlier.

restore data drupal 7

Conclusion

That’s it! You’ve successfully made a copy of your Drupal 7 site using the Backup and Migrate module. It’s important that you always maintain a backup of your database. Hope you found this guide useful. If you have any queries, please leave me a message in the comment section below and I’ll get back to you.

Share your opinion in the comment section. COMMENT NOW

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.

Start Growing with Cloudways Today.

Our Clients Love us because we never compromise on these

Get Our Newsletter
Be the first to get the latest updates and tutorials.

THERE’S MORE TO READ.