cleanup continues even on tar failure
Bug #264089 reported by
Matthew
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mylvmbackup |
Fix Released
|
Wishlist
|
Lenz Grimmer |
Bug Description
I haven't actually encountered this yet, but just by reading over the code I can see it may happen. The function do_backup_tar() doesn't exit/die on failure. It simply says 'unable to tar' returns back to the main() which then continues to cleanup().
So the possibility exists that a tar/rsync may fail and then cleaup() fires off, deleting everything including the snapshot.
I realized this when looking for a hook that will run after 'successful' backup. I have a script I'd like to run that purges all of the binlog's (we don't need them anymore since we just took a full backup) but only purge them on successful tar'ing of the snapshot.
Related branches
To post a comment you must log in.
Hi Matthew, you are right. Currently it would log the failure and proceed with cleaning up the snapshot (as keeping the snapshot around may have a performance impact). What is your suggestion? Should it abort and leave it up to the admin to sort out the problem instead?