Drupal - Does drush up do a database backup/dump?

To make gzipped mysql dump with drush:

drush sql-dump --gzip --result-file

Update from the wranvaud's comment: If you don't specify the result file it will be stored on you home folder under: ~/drush-backups/<db_name>/<timestamp>/<database_file>.sql.gz, otherwise you can specify --result-file='~/Documents/'


No it doesn't. It only makes a backup of the current module directories, before it replaces them.

To create a sql dump, use

drush sql-dump > filename.sql.

But remember to move the file outside of your webroot.


If you have the Backup and Migrate module module installed, you can call it from Drush with

$ drush bam-backup

Tags:

Database

Drush