Re: Backups w/ rsync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dean S. Messing wrote:
> Michael Tokarev writes:
[]
> : the procedure is something like this:
> : 
> :   cd /backups
> :   rm -rf tmp/
> :   cp -al $yesterday tmp/
> :   rsync -r --delete -t ... /filesystem tmp
> :   mv tmp $today
> : 
> : That is, link the previous backup to temp (which takes no space
> : except directories), rsync current files to there (rsync will
> : break links for changed files), and rename temp to $today.
> 
> Very nice.  The breaking of the hardlink is the key.  I wondered about
> this when Michal using rsync yesterday.  I just tested the idea. It
> does indeed work.

Well, others in this thread already presented other, simpler ways,
namely using --link-dest rsync option.  I was just too lazy to read
the man page, but I already knew other tools can do the work ;)

> One question: why do you not use "-a" instead of "-r -t"?  It would
> seem that one would want to preserve permissions, and group and user
> ownerships.  Also, is there a reason to _not_ preserve sym-links
> in the backup.  Your script appears to copy the referent.

Note the above -- "SOMETHING like this".  I was typing from memory,
it's not an actual script, just to show an idea.  Sure real script
does more than that, including error checking too.

/mjt
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux