I am using (trying) gzip to compress an SQL file in an rsyncable way in order to transfer the backup with minimal delay.
However it appears that this is not working, since the speedup is always 1.00.
The archive is created by dumping the database to a .sql
file and then issuing gzip -f3 --rsyncable file.sql
.
Next the remote machine does an rsync against the last backup with the following flags:
rsync -avhhiP --inplace
Why might my speedup be 1.00? Should I not be recreating the archive each time and instead updating it perhaps? I have seen no mention of this method from online guidance about the usage of the –rsyncable flag.
I am using:
# gzip -V
gzip 1.5
Best Answer
The question is already somewhat old, but maybe my answer still helps one or the other:
Debian Wheezy has the aforementioned bug in gzip which renders the
--rsyncable
-flag non-functional.See the corresponding Debian bug.
You can use
pigz
as a replacement, which is a parallelizinggzip
-replacement which uses multiple CPUs, can compress slightly more efficiently if you manually specify larger block sizes and officially provides an--rsyncable
implementation which is supposed to be better than the one provided by thegzip
patch.Additionally,
rsync
s--inplace
parameter reduces the efficiency of the delta-transmission algorithm - to quote the manpage: