Don't stop if database.sql.gz already exists
The existing behavior of the backups is to overwrite whatever data was still there in the scratch directories. This broke when we added a 'gzip' step because 'gzip database.sql' will fail if 'database.sql.gz' already exists. Doing 'rm -f database.sql.gz' before the 'gzip' avoids this failure.
This commit is contained in:
parent
57f9a1ccd4
commit
346b074979
1 changed files with 1 additions and 0 deletions
|
@ -25,6 +25,7 @@ module Backup
|
|||
abort 'Backup failed' unless success
|
||||
|
||||
$progress.print 'Compressing database ... '
|
||||
FileUtils.rm_f db_file_name_gz
|
||||
success = system('gzip', db_file_name)
|
||||
report_success(success)
|
||||
abort 'Backup failed: compress error' unless success
|
||||
|
|
Loading…
Reference in a new issue