Transparent Compression

Jonathan Duncan jonathan at jkdwebmagic.com
Mon Jun 12 16:05:01 MDT 2006


On Mon, 12 Jun 2006, Richard K Miller wrote:

> Here is the backup statement we use at work:
>
> rsync -aruvz --delete --link-dest=/backup/`date -v -1d +'%d'` 
> --files-from=/list_of_paths_to_backup / 
> backupmachine.domain.com:/backup/`date +'%d'`
>
> Our entire server gets backed up to another machine each day and then rotates 
> each month, so we have 31 incremental copies of the data.  The secret to not 
> wasting hard drive space is the --link-dest argument, which tell rsync to 
> make a hardlink to the previous copy of the data if it's identical.  (`date 
> +'%d` returns a numeric version of today's day of the month (01-31) while 
> `date -v -1d +1'%d'` returns yesterday's day of the month.)    This means we 
> get 31 full copies of the data, but it only takes up as much space as 1 copy 
> of the data + incremental changes (which isn't very much in our case.)  I've 
> found this to be very useful.
>
> You could change %d to %w to do 7 backups, one for each day of the week.
>
> Richard
>

That is awesome!  I was unaware of that option.  That just makes me love 
rsync more.  Thanks for that tip.

Jonathan



More information about the PLUG mailing list