FEATURE: remove any .tar leftovers when backing up
This commit is contained in:
parent
aca05267cd
commit
49b02287dc
|
@ -283,6 +283,7 @@ module BackupRestore
|
|||
|
||||
def clean_up
|
||||
log "Cleaning stuff up..."
|
||||
remove_tar_leftovers
|
||||
remove_tmp_directory
|
||||
unpause_sidekiq
|
||||
disable_readonly_mode if Discourse.readonly_mode?
|
||||
|
@ -290,6 +291,11 @@ module BackupRestore
|
|||
log "Finished!"
|
||||
end
|
||||
|
||||
def remove_tar_leftovers
|
||||
log "Removing '.tar' leftovers..."
|
||||
`rm -f #{@archive_directory}/*.tar`
|
||||
end
|
||||
|
||||
def remove_tmp_directory
|
||||
log "Removing tmp '#{@tmp_directory}' directory..."
|
||||
FileUtils.rm_rf(@tmp_directory) if Dir[@tmp_directory].present?
|
||||
|
|
Loading…
Reference in New Issue