Drush Bam Civi Wham

2010-05-29 19:01
Written by

A while ago I mentioned that I was finding the backup and migrate module a better option to syncing Civi installs that the Civi drush command and Lobo asked if I would do a write-up on it.

I'm going to keep this pretty brief but I think it is worth telling people about as I find it really quick & easy.

http://drupal.org/project/backup_migrate (AKA BAM)

I've been pretty lazy with this module and haven't used it's full potential but basically what it allows you to do is to create a backup profile which is a mix of full table backups, table structure only backups and exclusions of tables you don't want to backup. All the stuff I am about to describe is configurable through a simple drupal front-end interface

So, what I do is set it to back-up structure only for the sessions table, the various drupal cache tables, and the civi-cache tables. I exclude a handful of tables specific to our set-up. I also exclude the civicrm_domain table because that way I can restore the whole backup onto a staging install on another server (which has already been correctly configured) and it just works because the install specific settings are in the civicrm_domain table.

You can backup to download which is not nearly as slow as you might think or to a pre-configured backup destination on the server. You can also schedule your backups and use more than one backup profile on different schedules (to different locations). Here are the possible location types:

Server Directory
Save the backup files to any directory on the server which the web-server can write to.
MySQL Database
Import the backup directly into another MySQL database. Database destinations can also be used as a source to backup from.
FTP Directory
Save the backup files to any a directory on an FTP server.
Amazon S3 Bucket
Save the backup files to a bucket on your Amazon S3 account.
Send the backup as an email attachment to the specified email address.

And, the final selling point - BAM module is fully down with drush.

Filed under


Jon (not verified)
2010-08-06 - 05:58