Hi all - is there some magic flag i'm missing that will allow me to rsync a raw device? Not the dev entry, but the device itself? I have a filesystem (backuppc data store) that does not respond well to directory traversal due to an extremely high number of hard links (which generate lots of disk seeks), and probably would not work well with rsync anyway due to a large number of actual files in the first place. I'd like to mirror this data store to a remote location for DR purposes. ideally the target would be a raw device as well, but a loopback mount would probably solve my problem if that's not possible. Obviously, the filesystems would need to be unmounted while doing the sync. thanks danno -- dan pritts - systems administrator - internet2 734/352-4953 office 734/834-7224 mobile
On Mon, 2006-03-13 17:42:18 -0500, Dan Pritts <danno@internet2.edu> wrote:> I'd like to mirror this data store to a remote location for DR purposes. > ideally the target would be a raw device as well, but a loopback mount > would probably solve my problem if that's not possible.# cat /dev/sda | ssh root@backupbox "cat > /dev/sda" Of course, change the device name as needed on both sides... MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O f?r einen Freien Staat voll Freier B?rger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)); -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.samba.org/archive/rsync/attachments/20060314/83d70371/attachment.bin
On Mon, 2006-03-13 at 17:42 -0500, Dan Pritts wrote:> is there some magic flag i'm missing that will allow me to rsync > a raw device? Not the dev entry, but the device itself?I don't know of any such flag, but it would be easy to add one. There's a nice analogy between symlinks and device nodes: each points somewhere (to a path or a device), and rsync can either follow or reproduce the pointer. Thus, I would add options --copy-devices and --keep-devices that make the sender read devices as regular files and make the receiver write existing devices instead of replacing them with regular files, respectively. It may or may not be desirable to implement these in the do_* abstraction layer. When the receiver writes to a device because of --keep-devices, it needs to use inplace mode. That reduces the effectiveness of incremental transfer. Thus, in some cases, it might be useful to copy the device to a regular file on the receiver beforehand and get rsync to use the copy as a basis file. In some cases, it might be useful for rsync to create a second device node and move it over the first, even though the device nodes point to the same device (and thus the incremental transfer code operates as it would for inplace). -- Matt McCutchen hashproduct@verizon.net http://hashproduct.metaesthetics.net/