2000-09-13-09:03:13 Michael Bramer:
> A fast solution is this:
> rsync server::images/$IP.imag /dev/hda1
> but this don't work, or did it?
>
> Is there a principle reason, that this don't work? Would a patch
> for this disk-image-rsync be large or very complex?
I can't help with a specific patch, but I doubt this will be easy to
achieve. Think of it in terms of different aspects of the problem.
There's an easy part: that would be an option to tell rsync not to
pay any attention to the file type bits on the dst, so it'd ignore
the fact that the dst is actually a disk raw partition.
There's a medium-hard problem: ensuring that the writing side will
always do block sized and aligned writes.
And there's the nearly impossible part, and that is that rsync's
writing side needs to have a spare copy of the dst file to work
with. It normally creates an initially empty tmp file, then receives
chunks of new data and instructions to take chunks from the old file
to assemble the new file. Once it's all assembled the writer moves
it into place. Raw disk partitions don't work that way.
I think what you have now is about as efficient as you can hope to
get.
-Bennett
PGP signature