For safety, it would be a good idea to take a backup before doing a restore operation that overwrites everything, just in case the restore occurred erroneously.
Proposed implementation:
Make buendia-backup accept a command-line flag, -f for "force"
-f has two effects:
(a) it skips the file-descriptor locking step (so that it can be run while buendia-restore is already running)
(b) it uses the full timestamp in the backup_id ('%Y-%m-%dT%H-%M-%S') so that the backup does not replace an earlier one done the same day
In buendia-restore, add the line buendia-backup -f /var/backups/pre-restore immediately after the point where a backup directory has been found, before the restore operation begins
For safety, it would be a good idea to take a backup before doing a restore operation that overwrites everything, just in case the restore occurred erroneously.
Proposed implementation:
Make
buendia-backup
accept a command-line flag,-f
for "force"-f
has two effects:buendia-restore
is already running)In
buendia-restore
, add the linebuendia-backup -f /var/backups/pre-restore
immediately after the point where a backup directory has been found, before the restore operation begins