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@host:/path/to/image RECOVER: rsync user@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? Regards Chris Burkert ----------------------------------------- powered by beine computer http://www.beine-computer.de/
chris@chrisburkert.de [chris@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@host:/path/to/image > RECOVER: rsync user@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 timeoutI'm *NOT* an rsync expert, but here's what I found in the rsync manpage(man rsync): rsync -avz foo:src/bar /data/tmp this would recursively transfer all files from the directory src/bar on the machine foo into the /data/tmp/bar directory on the local machine. The files are transferred in "archive" mode, which ensures that symbolic links, devices, attributes, permissions, ownerships etc are preserved in the transfer. Additionally, compression will be used to reduce the size of data portions of the transfer. Notice where it says "The files are transferred in "archive" mode, which ensures that symbolic links, devices, attributes, permissions, ownerships etc are preserved in the transfer. My guess is that if you add the "-a" parameter to your rsync that your device files will work in the rsync. The -v will add verbosity to the output and will help show you what rsync is doing.> 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?Not sure about this one - wait for someone else to respond. HTH. -- Hardy Merrill Red Hat, Inc.
On Wed, Oct 08, 2003 at 01:14:37PM +0200, chris@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@host:/path/to/image > RECOVER: rsync user@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. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
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@host:/path/to/image >> RECOVER: rsync user@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