rsync for transferring harddrive images
Jim Kleckner
jek-rsync1 at kleckner.net
Wed Oct 15 06:08:25 EST 2003
jw schultz wrote:
> On Wed, Oct 08, 2003 at 01:14:37PM +0200, chris at chrisburkert.de wrote:
>
>>Hi,
>>
>>I have a project where I have to backup (copy /dev/hda on a server) and
>>recover (copy back) hardrives from the clients. I tried this with rsync
>>using:
>>
>> BACKUP: rsync /dev/hda user at host:/path/to/image
>> RECOVER: rsync user at host:/path/to/image /dev/hda
>>
>>There is a problem when accessing devices like /dev/hda. The transfer
>>aborts after a few seconds with the error message:
>>
>> write failed on /dev/hda: Success
>> unexpected EOF in read timeout
>>
>>Any suggestions?
>>
>>Also I want to save those images zipped at the server. Is this possible? I
>>thought of using a pipe or a fifo. Can the algorithm of rsync work
>>correctly then?
>>
>
> Rsync sees /dev/hda as a device special file in the /dev
> directory. Rsync cannot operate on block devices. Device
> nodes are a little like symlinks in that a decision must be
> made whether to operate on the the device (follow the link)
> or simply copy the node.
>
> Rsync also does not support having the source and
> destination not be bit-for-bit the same, including size
> so you cannot sync an uncompressed file with a compressed
> one.
>
> It may be there is another utility that can do what you
> wish. Perhaps pysync could be tweaked (significant tweak)
> to do it. To do it with rsync you would need to copy the
> device into a file prior to sycing, perhaps using bzip2
> on it.
If you can get by with non-incremental, try g4u or partimage:
http://www.feyrer.de/g4u/
http://www.partimage.org/
Knoppix is a good way to do this off line.
I used g4u successfully to resize a notebook disk with bad
blocks:
http://sourceforge.net/mailarchive/message.php?msg_id=5704707
g4u will zip the archive by default but you need to zero the
unallocated space for it to be really effective.
Jim
More information about the rsync
mailing list