FIX: ensure we always remove old backups

This commit is contained in:
Régis Hanol 2015-09-21 10:52:03 +02:00
parent 45ab42dea9
commit a726f5efea

View File

@ -47,8 +47,6 @@ module BackupRestore
create_archive create_archive
after_create_hook after_create_hook
remove_old
rescue SystemExit rescue SystemExit
log "Backup process was cancelled!" log "Backup process was cancelled!"
rescue Exception => ex rescue Exception => ex
@ -59,6 +57,7 @@ module BackupRestore
"#{@archive_basename}.tar.gz" "#{@archive_basename}.tar.gz"
ensure ensure
notify_user rescue nil notify_user rescue nil
remove_old rescue nil
clean_up clean_up
@success ? log("[SUCCESS]") : log("[FAILED]") @success ? log("[SUCCESS]") : log("[FAILED]")
end end