acquia / acsf-tools

Command line tools for working with Acquia Cloud Site Factory
20 stars 25 forks source link

acsf-tools-dump override existing dumps if exists #107

Open vbouchet31 opened 4 years ago

vbouchet31 commented 4 years ago

Due some recent change, acsf-tools-dump is automatically creating a folder yyyymmdd (20200722 for example) inside the given --result-folder (drush acsf-tools-dump --result-folder=/backup will store the dumps in backup/20200722).

As of now, running the command twice a day will generate a unique folder and hence the first dumps will be override by the second execution. The pattern should be yyyymmdd-hhmm so running the command twice in a day does not override the dumps.

Also, I am sure which recent change included it but I am not 100% convinced by this automatic flow. I am used for example to take databases dumps before a code release and I was using the tag name in the folder name (for example drush acsf-tools-dump --result-folder=/backup/pre_1.0.0 --gzip). With the new flow, this same command will store the dumps inside /backup/pre_1.0.0/20200722. The result-folder argument name is confusing because it is actually not the result folder anymore.

vbouchet31 commented 3 years ago

The linked PR is reverting the behavior by using the given --result-folder as the real folder to share the dumps. It does not add the "yyyymmdd" sub-folder anymore. The default behavior in case no --result-folder is given has been updated to be ~/drush_backup/yyyymmdd-hhmm so it does not override anymore.

I am keeping this ticket open because we may want to improve the behavior so it warn in case the result folder is not empty (and maybe add an option --override to bypass the confirmation step).