Support for removal of old backups automatically via a site setting

This commit is contained in:
Robin Ward
2014-03-11 17:28:12 -04:00
parent cf630207b7
commit dc1d6decf5
8 changed files with 86 additions and 21 deletions

View File

@@ -38,6 +38,8 @@ module Export
create_archive
remove_old
notify_user
rescue SystemExit
log "Backup process was cancelled!"
@@ -240,6 +242,11 @@ module Export
SystemMessage.create(@user, :export_succeeded)
end
def remove_old
log "Removing old backups..."
Backup.remove_old
end
def clean_up
log "Cleaning stuff up..."
remove_tmp_directory