Hi Daniel,
Did you happen to investigate why rsync -S is taking so much time? If it
doesn't deal with sparse file the way one expects, this option is probably
broken. Also have you already tried something like the advice in
http://lists.samba.org/archive/rsync/2003-August/007000.html ?Anyway, I think the way to go is using tar. It preserves the sparseness
property of the files, so something like this could work: If you tar the
file without using compression, you would get a file the size of the
sparsefile, with a lot of zeroes in it. Then use a run-length encoding on it
to collapse the zeroes.Sync this file with rsync.
On the destination machine do it in reverse. Using pipes you don't even need
the physical space of the whole sparse file, just the space requirement of
the actual data in the sparse file; or transfer it immediately you don't
need any space at all.Example (with a pseudo rle program):
tar cf - sparsefile | rle -input - -output sparsefile.tar.rle
The code for run-length encoding is there in zlib, but unfortunately
compress/gzip doesn't have an option to use it. You'd either need to hack
this in yourself, or use one of the many implementations found when
searching for rle. This would give you the option to modify it, to just
rl-encode the zeroes.David
| Greg Kroah-Hartman | [PATCH 008/196] Chinese: add translation of volatile-considered-harmful.txt |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | Re: [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in |
| Andrew Morton | -mm merge plans for 2.6.23 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Herbert Xu | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Rémi Denis-Courmont | [PATCH 01/14] Phonet global definitions |
