A reliable backup will allow you to restore your site if something goes wrong, whether it is a server failure, site code or database problems, or user error. Everyone should have a regular back up schedule for their site, and know how to restore the site from those backups. A new backup should also be created before every update of core or a contributed project made to a site. For a Drupal site, you need to make sure to have backups for both your site code, including your site-specific settings and files, and the user-generated content that lives in the database and filesystem.

Example tasks

  • Back up a database and user-generated files
  • Back up Drupal site code
  • Restore a Drupal site from backups


Backups are not an integral part of Drupal itself; the procedures and tools are widely used across all web applications. This means the information is widely available and reliable.

Drupalize.Me resources

Quick reference

Using Drush:

drush sql:dump --gzip --result-file=backup.sql

Or using mysqldump, replace {DATABASE_NAME} with the name or your MySQL database:

mysqldump -q --opt --add-drop-table {DATABASE_NAME} | gzip > backup.sql.gz

Both examples will result in a file named backup.sql.gz that contains a compressed backup of your database.


More Guides

We have guides on many Drupal skills and topics.

Explore guides

External resources