rsync a raw device

Matt McCutchen hashproduct at verizon.net
Thu Mar 16 21:27:08 GMT 2006


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 at verizon.net
http://hashproduct.metaesthetics.net/



More information about the rsync mailing list