Last Updated: February 25, 2016
·
2.083K
· luukyb

Backup and restore databases in Drupal

The quickest way is to use drush

Backup your db:

drush cc all

drush sql-dump > ~/sql-dump.sql

Restore a database:

drush sql-cli < ~/sql-dump.sql

If your backup is on a remote server, you will need to download it locally:

scp username@server.com:~/sql-dump.sql ~/Download/