Commit e8419fb5 authored by Frederic Van Espen's avatar Frederic Van Espen

set the --rsyncable option for gzip

parent 7a58eb2e
......@@ -17,7 +17,7 @@ module Backup
FileUtils.mkdir_p(File.dirname(db_file_name))
FileUtils.rm_f(db_file_name)
compress_rd, compress_wr = IO.pipe
compress_pid = spawn(*%w(gzip -1 -c), in: compress_rd, out: [db_file_name, 'w', 0600])
compress_pid = spawn(*%w(gzip --rsyncable -1 -c), in: compress_rd, out: [db_file_name, 'w', 0600])
compress_rd.close
dump_pid =
......
......@@ -31,10 +31,10 @@ module Backup
raise Backup::Error, 'Backup failed'
end
run_pipeline!([%W(#{tar} --exclude=lost+found -C #{@backup_files_dir} -cf - .), %w(gzip -c -1)], out: [backup_tarball, 'w', 0600])
run_pipeline!([%W(#{tar} --exclude=lost+found -C #{@backup_files_dir} -cf - .), %w(gzip --rsyncable -c -1)], out: [backup_tarball, 'w', 0600])
FileUtils.rm_rf(@backup_files_dir)
else
run_pipeline!([%W(#{tar} --exclude=lost+found -C #{app_files_dir} -cf - .), %w(gzip -c -1)], out: [backup_tarball, 'w', 0600])
run_pipeline!([%W(#{tar} --exclude=lost+found -C #{app_files_dir} -cf - .), %w(gzip --rsyncable -c -1)], out: [backup_tarball, 'w', 0600])
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment