How do I back up a Drupal site?

A complete Drupal backup includes three things: the database, the files directory, and the codebase. Missing any one of these leaves you unable to fully restore the site.

The database can be exported with Drush using drush sql-dump or directly via mysqldump. The files directory usually lives at sites/default/files and contains all user uploads. The codebase should already be in version control.

Many hosts offer automated backups as part of their service, which is the easiest route. For self managed setups, tools like Backup and Migrate module or server level scripts work well. Whatever method you use, test your restore process periodically. A backup you have never restored from is not really a backup you can trust.

Facebook
Twitter
LinkedIn
Pinterest