Why can't I save/restore block devices?

Ph. Marek marek at bmlv.gv.at
Fri Jul 5 04:30:02 EST 2002


Hello everybody,

I'd like to save/restore some partitions on my harddrive via rsync.
(They happen to contain other os'es, so I can't safely mount the partitions 
read/write).

So, I'd like to do something like
	rsync /dev/hda1 server::images/part_1.image -c -z -B65536 -S
but:
- "skipping non-regular file part_1" is misleading. Not the destination is not 
a file, the source is.
- I know that it won't be possible to use rsync on character devices - but it 
could operate on block devices.
- Is there a way to say "Don't check the complete checksum, instead send the 
sums of the individual block at once" so that rsync doesn't read the data 
sets on both ends? (which could take a time, given that partitions are some 
MB in size). I'd like rsync to just send the checksums and whenever some part 
is different it is replaced in the file.
- Maybe it would make sense not to use a temporary file but to write into the 
original. How can I do that?
- At last a wish: if this copy could be compressed (as discussed in the last 
few days) I'd be very happy. But that won't work if something in the middle 
changes - then we'd have to rewrite the complete file .... How about using a 
compressed filesystem? (is there a current patch to ext2 anywhere? It's a 
long time since I heard about a compressed ext2).
- As I'd plan to zero-out the unused parts of the partition before I could use 
the parameter -S which should allow not to save the many 0's which come from 
the source partition .... That could be a little substitute for compression.


Any help appreciated!


Regards,

Phil






More information about the rsync mailing list