Commands
bam-backup - Backup the site's database with Backup and Migrate.
bam-backups - Get a list of previously created backup files.
bam-destinations - Get a list of available destinations.
bam-profiles - Get a list of available settings profiles.
bam-restore - Restore the site's database with Backup and Migrate.
bam-sources - Get a list of available sources.
bam-backup
Backup the site's database using default settings.
Examples:
drush bam-backup - Backup the default databse to the manual backup directory using the default settings.
drush bam-backup db scheduled mysettings - Backup the database to the scheduled directory using a settings profile called "mysettings"
drush bam-backup files - Backup the files directory to the manual directory using the default settings. The Backup and Migrate Files module is required for files backups.
Arguments:
source - Optional. The id of the source (usually a database) to backup. Use 'drush bam-sources' to get a list of sources. Defaults to 'db'
destination - Optional. The id of destination to send the backup file to. Use 'drush bam-destinations' to get a list of destinations. Defaults to 'manual'
profile - Optional. The id of a settings profile to use. Use 'drush bam-profiles' to get a list of available profiles. Defaults to 'default'
bam-backups
Get a list of previously created backup files.
Examples:
drush bam-backups manual - List of backup files currently in the destination called "manual"
Arguments:
destination - Required. The id of destination to list backups from. Use 'drush bam-destinations' to get a list of destinations.
bam-destinations
Get a list of available destinations.
bam-profiles
Get a list of available settings profiles.
bam-restore
Restore the site's database with Backup and Migrate.
Examples:
drush bam-restore db manual "LCC-31.03.2011-14.01.59.mysql.gz" - restore the default database using the given dump file, which can be found in the destination called "manual"
Arguments:
source - Required. The id of the source (usually a database) to restore the backup to. Use 'drush bam-sources' to get a list of sources. Defaults to 'db'
destination - Required. The id of destination to send the backup file to. Use 'drush bam-destinations' to get a list of destinations. Defaults to 'manual'
backup id - Required. The id of a backup file restore. Use 'drush bam-backups' to get a list of available backup files.
bam-sources
Get a list of available sources.
Closing Notes
I'm not sure if this is out of date or something, but in my experience you provide the name and not the id for all of the arguments.
How do you install bam using drush?
ReplyDeleteI've tried "drush dl bam" without any result
I struggled with module names using drush as well. You need to use drush's list feature to see what name to use i.e.
ReplyDeletedrush pm-list | grep backup
and you should see the Backup and Migrate module listed, followed by it's drush name in brackets i.e backup_migrate. So the command you are looking for is this:
drush dl backup_migrate
bam is a 'Backup and Migrate' (backup_migrate) module.
ReplyDeleteuse drush dl backup_migrate
What if the restore file is on the filesystem and not in the bam list?
ReplyDelete