Drupal Backup Creation Tutorial

Learn How to Backup Drupal

This tutorial covers the following topics:

In this tutorial we will present a few options which you may use to create a backup of your Drupal website.

Backup Using Softaculous

To create a backup of your Drupal website using Softaculous, you first need to go to your cPanel > Softaculous tool. Then click on the All installations button and locate your Drupal website.

After you find your website, click on the Backup button next to it.

On the next page you can choose whether to backup only the files or database for your application or both by checking the Backup Directory and Backup Database options. You can also add a note to the backup via the Backup Note text field. When ready with the backup configuration, click the Backup Installation button.

Once the backup is ready you will be able to access it from the Backups page or simply by clicking on the Backup link in the message Softaculous would display.

The newly created backup should be visible in the application's list. You would be able to see its date and time of creation in the backup's filename.

Backup Using Drush

In order to create a backup of your Drupal web site using Drush, you should first log in your account via SSH. Detailed instructions on how to use SSH can be found in our SSH tutorial. After you login to your account via SSH, navigate to the Drupal installation’s home folder.

Then run the following command:

Replace USER with your actual cPanel username. You can pick a different location for the backup and different backup file name. Executing the command above will create an archive with all the website files and a copy of your Drupal database. The output would be similar to the following one:

After the process is successfully completed, you will be able to find the backup in the specified location - /home/USER/backup/site.tar.gz.

Backup Drupal Manually

First, you should backup all the files and folders inside your Drupal directory. You can do that by downloading them via your favorite FTP client. You can find our comprehensive FTP tutorial here.

After that you have to export your Drupal database. You can do that by using PHPMyAdmin. You can check our tutorial on how to backup/restore MySQL database in order to create a backup of your Drupal database.

Make sure that you choose the correct database, which your Drupal application uses.

If you are unsure about the Drupal database name, you will be able to find it in the drupal_folder/sites/default/settings.php file. You can view this file through cPanel -> File manager.