At the moment it is not possible to give a backup filename as a command line parameter when using drush bam-backup command.

Usecase:
I want to automate the process of updating the staging server from dev. This would include these steps:

  1. drush sql-sync and rsync from dev server
  2. git pull and drush bam-backup on staging server

It would be very convenient to put the git commit id and commit message to the backup filename so it would be easily identified afterwards.

Example:
---Add-views-module.mysql.gz

Solution:
Add a file name parameter to bam-backup command that would override the default naming scheme if defined.

Comments

jiv_e’s picture

Assigned: Unassigned » jiv_e
amanire’s picture

Hi jiv_e,
I had been using a custom drush script to concatenate the git commit branch and hash into filenames. I realized that this could and probably should be done with backup and migrate, with a few custom tokens, but the random profile IDs used by BAM were a bit of a disappointing setback. However, I discovered that I could just manually change them in the backup_migrate database tables. So once I set up the profile and destination, I can just use

drush bb db backup_dir gitstamp

or something to that effect.

amanire’s picture

Actually, I'm now realizing that the fact that Backup and Migrate stores the profile settings in custom tables is a real limitation with the profile approach, since I want local environments settings.php to be able to override the paths in the DB.

amanire’s picture

Issue summary: View changes

Fixed typos

JordanMagnuson’s picture

Issue summary: View changes

Has any work been done on this? Would a patch be accepted?

I also want to be able to define a custom file name when backing up via drush bam-backup.

jiv_e’s picture

Assigned: jiv_e » Unassigned
jiv_e’s picture

I was going to do this, but it wasn't crucial so I forgot it. Sorry that I didn't unassign.

Patches welcome!

couturier’s picture

Status: Active » Closed (outdated)