mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Support for removal of old backups automatically via a site setting
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user