Skip to content
Snippets Groups Projects
Commit ab94ed08 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab) Committed by Valery Sizov
Browse files

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.
parent 6f3c99e4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment