Using rsync to generate diff/patches

Chris Shoemaker c.shoemaker at cox.net
Wed Jan 26 16:50:57 GMT 2005


On Wed, Jan 26, 2005 at 07:41:36AM -0600, Dave Whitinger wrote:
> I've been using rsync to remotely backup my MySQL databases
> (totalling over 3 gigabytes) and it works nice and fast.
> 
> Now I'm trying to setup my system to save yesterday's backup
> before applying today's backup, but it's not really feasible to
> keep a 3gig backup for each day, and I'd rather just store diffs
> from the previous day.  This way, I can just go back in time by
> applying the diffs.
> 
> I'm wondering if rsync can be used for this; here's how I
> envision it working:
> 
> 1) The rsync process works just like normal, except instead of
> applying the changes to the destination files, it instead
> generates one big file that contains all the TODO changes.
> 
> 2) The administrator later can run rsync with a certain switch,
> and feed it this generated file through stdin, and those changes
> are applied.
> 
> Great idea, no?

Look at "batch mode."  Except it actually applys changes, too.

-chris


More information about the rsync mailing list