[CentOS] evaluating backup systems: rsync

Gordon Messmer yinyang at eburg.com
Sun Jan 13 08:39:49 UTC 2013


On 01/11/2013 01:47 PM, ken wrote:
> Cool.  Thanks for mentioning time-stamps.  I've been assuming that rsync
> would maintain the source files' original permissions and timestamps.

It will if you specify -t/--times and -p/--perms (or -a, which implies 
both).

> It's good to hear too that I can configure how
> long to keep files on destination which have been deleted from the
> source (if that's what you meant).

rsync doesn't do that on its own.  Mark was referring to his home-rolled 
system.  If you want that, it's best to use rsnapshot or backuppc (or 
something like them).

> Mark, maybe you could explain what a "parm" is and how using hard links
> saves space.

Consider a simple configuration of rsnapshot, in which there are 7 daily 
backups.  When rsnapshot runs, it will check the directory to find out 
how many snapshots exist and remove the oldest if there are already 7. 
It then renames daily.1 through daily.5, such that they are daily.2 
through daily.6 afterward.  It then runs "cp -al daily.0 daily.1".  At 
that point, daily.0 and daily.1 are identical trees of hard links to the 
same files.  They are both complete, full backups of the source data, 
but the disk space used is only slightly more than the space used for 
daily.0.  rsnapshot then runs rsync with daily.0 as the destination. 
Any files which are updated are overwritten by new files rather than 
updating in place, in order to keep the data in daily.1 from being modified.

The space saving referenced is the ability to have full backups on a 
regular filesystem without duplicating data for files that have not changed.



More information about the CentOS mailing list