Is there any comparative advantage in terms of best practice, ease of use, or speed in terms of using the drush back up and migrate command (drush bam) or is it just preference?

I'm often using just a simple drush sql-dump > exportdb.sql and a $(drush sql-connect) < importdb.sql to backup a database. I find it pretty easy to use.

2 Answers 2


There aren't giant differences between the two approaches. Here are a few small differences:

drush sql-dump uses mysqldump program in the background and so is must faster than the pure PHP approach taken by BAM.

You can easily skip tables with sql-dump as well. See the help for this command.

Finally, some folks might want to use sql-sync which does all of these steps in one command. It works faster than sql-dump+sql_connect when one of the machines is remote. It also includes optional data sanitization.

  • 1
    Moshe, does sql-dump take care of locking tables, maintenance mode, etc to ensure a safe backup?
    – mpdonadio
    Commented Nov 12, 2011 at 18:49
  • 2
    We do pass the right params to mysqldump so that it's dump is consistent and safe ... Drupal's maint mode is not needed. Commented Nov 12, 2011 at 20:32
  • 3
    Thanks for the info, and for your work with drush and devel. I don't know how I could could get anything done w/o those two things.
    – mpdonadio
    Commented Nov 12, 2011 at 22:14

I think the biggest advantages of bam-backup is that you can choose a profile. With this you can do a bunch of different things. The most useful is the ability to exclude the rows from the cache and watchdog tables. I also think (though I have never confirmed it), that taking a backup this way will use maintenance mode just like via the UI, if you have it configured. This can result in better backups if you have active traffic.

When I am doing normal backups as safeties, I just use bam-backup. When I am doing a neuritic backup, or sending a db to a client for deployment, I also take a full backup with MySQL Administrator, which will properly lock tables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.