[Techtalk] rsync backup script

Dan Shearer techtalk at shearer.org
Tue Jun 22 12:31:21 EST 2004


On Mon, Jun 21, 2004 at 07:07:53PM -0700, Carla Schroder wrote:
> On Monday 21 June 2004 6:59 pm, Dan Shearer wrote:
> > On Mon, Jun 21, 2004 at 05:00:24PM -0700, Kai MacTane wrote:
> > > At 6/21/04 04:41 PM , Carla Schroder wrote:
> > > >Does anyone have a really really cool rsync script they'd like to share? 
> > > >All I know is script 'rsync -a  -e ssh sourc dest' and slap it into cron.
> > > >
> > > >Something that does some error-checking and logging would be luverly.
> > > >It's for publication, so you'll get fame and glory. I've tested a
> > > >number of scripts I found on Google, and haven't found anything that
> > > >doesn't need a lot of babysitting, which rather defeats the purpose.
> > > >For Linux only, don't worry about exotic Unixes.
> > 
> > There is a very nice application of rsync that turns it into a
> > snapshotting facility using the basic Unix filesystem feature of links,
> > as in "cp -al" which creates a new link rather than copying a file.
> 
> I don't see the point of this. since rsync only moves diffs, why bother with 
> cp -al? 

If you want to have a record of what has changed each day for the last
week then this is a good way of doing it. Each directory tree is
complete (you could burn a CD and call it "Exact Status At End Of
Wednesday") and yet, simply put, only the differences between days are
stored.

Back in tape backup days there were "full backups" and "incremental
backups". A full restore required the last full backups plus any
incrementals taken since. This solution gives you the effect of always
having a full backup yet not taking up any more space than incrementals.
It is both clever and Unix-y.

-- 
Dan Shearer
dan at shearer.org


More information about the Techtalk mailing list