backup system rsync <-> dump

Howard Jones howie at thingy.com
Tue May 2 17:20:50 UTC 2006


Philip Hallstrom wrote:
>> I have two disks; one is the fbsd system drive, the other is for backup
>> purposes.
>>
>> I'm in doubt about what to use: dump or rsync
>>
>> I guess I can do something like:
>> mount /dev/ad1s3a /backup/root
>> mount /dev/ad1s3d /backup/var
>> mount /dev/ad1s3f /backup/usr
>> /usr/local/bin/rsync -avHxS --delete /usr /backup/usr
>> for /usr / and var
>
> If you do go with rsync, watch the "-delete".  If for some reason you 
> blow away /usr/local/etc and then run your backup you'll blow away 
> your backed up /usr/local/etc as well.  Probably not what you want :)
>
> With the right settings of --backup --backup-dir you can easily create 
> a week (or two or three or whatever) archive of the "daily" changed 
> files. So, for example..
>
> /backup/usr - contains identical copy
> /backup/dailys/usr/Mon - contains files that changed on /usr on Monday.
>
> Then just set things up to rotate/expire the old copies and you have 
> an easy way to get files back you deleted that you didn't mean to.
>
> I can post the whole script if you're interested...
If you'd like to go down that route (of incremental backups), then 
consider rdiff-backup, which makes a 'live backup' in the same way that 
rsync does but also saves the rsync 'transaction log' so you can produce 
a previous day's image easily, and store the differences compactly - the 
saving on the network in rsync becomes the saving in disk space for the 
incremental backups.

http://www.nongnu.org/rdiff-backup/
http://www.howtoforge.com/linux_rdiff_backup

I've been using this for a few dozen machines with no problems so far.

Cheers,

Howie


More information about the freebsd-questions mailing list