diff options
author | Frederic Van Espen <fes@escaux.com> | 2018-12-26 17:35:20 +0300 |
---|---|---|
committer | Frederic Van Espen <fes@escaux.com> | 2018-12-26 17:35:20 +0300 |
commit | e8419fb5bba0e5ba9247983ad24ee5bc2e7b8115 (patch) | |
tree | dc46385324d76a2024f40198369d56e666198e0a /lib | |
parent | 7a58eb2e1612cef1178c9b35df9aaea71cbe04aa (diff) |
set the --rsyncable option for gzip
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backup/database.rb | 2 | ||||
-rw-r--r-- | lib/backup/files.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/backup/database.rb b/lib/backup/database.rb index e6bf3d1856f..8baca500546 100644 --- a/lib/backup/database.rb +++ b/lib/backup/database.rb @@ -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 = diff --git a/lib/backup/files.rb b/lib/backup/files.rb index 0032ae8f84b..998fa5a1a92 100644 --- a/lib/backup/files.rb +++ b/lib/backup/files.rb @@ -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 |