Home
/
Drupal Tutorials
/
Drupal Backup Creation Tutorial

Drupal Backup Creation Tutorial

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

Backup Using Drush

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

Then run the following command:

drush archive-dump --destination=/home/customer/service/www/domain.com/backup/site.tar.gz

Replace domain.com with your actual domain name. 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:

Database dump saved to /tmp/drush_tmp_1510221289_5a0425e916e33/USER_drup.sql [success]
Archive saved to /home/USER/backup/site.tar.gz [ok]

After the process is successfully completed, you will be able to find the backup in the specified location – /home/customer/service/www/backup/site.tar.gz.

Backup Drupal Manually

First, you should back up 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 Site Tools > Site > File manager.

Share This Article