Tim writes:

> Some time ago, someone e-mailed a script that performed a dd/netcat in
> an rsync-like manner:  it hashed blocks of the disk and if they matched
> between the two sides they were not sent.  If they didn't, the block was
> sent.  The idea was to limit the amount of data that would be sent in a
> dd to the relative minimum amount of data that has changed.
> 
> I've tried and tried to find this thing, but I just plain cannot--either
> in the list archives or anywhere else Google searches.  Does anyone have
> such a script--or even know what I'm talking about?
> 
> I think this might have been a home-grown script, but it would be very
> useful, given that currently the only way to effectively clone a backup
> server is dd, and dd'ing a 500GB partition is not exactly practical,
> especially when only a few gig has actually changed from the last time...

I've always wondered why we can't just use rsync directly to do this.
Starting with rsync 2.6.2 the --inplace option allows updating of a
file in place.  This restricts the matching to blocks that are at or
later than the current file position, since the earlier part of the
file might already be updated.  For the raw disk case that doesn't
reduce the performance since most data doesn't shift, it just gets
replaced.

The problem is that rsync transfers the raw disk device as a
special file, and doesn't open it to transfer the contents.

This requires another command-line option.  I'm sure someone must
have tried this before.  Here's an example of a submitted patch:

    http://www.mail-archive.com/[EMAIL PROTECTED]/msg19075.html

that adds --copy-devices.  I don't think this has made it into the
official rsync.  It's certainly dangerous.  If the target of the
rsync is a raw disk you will definitely need to specify --inplace.
And of course both the source and destination disks need to be
unmounted.  Finally, this doesn't make a lot of sense if the disk
is not very full, since you are synching all of the disk - not
just the parts that are being used.

Craig

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to