From: Craig B. <cba...@us...> - 2004-04-28 06:53:35
|
Dan D Niles writes: > I have been using a simple rsync script that I wrote to do backups. > Somebody told me about BackupPC so I thought I'd check it out. It has > some nice advantages over using rsync normally. The use of one file > to represent identical files across multiple systems will be a huge > boon. Also, getting the benefits of rsync while still being able to > compress the files is awesome. Three Cheers! 8^) > > I have some questions that I hope you can help with. > > Is there any way to get BackupPC to preserve hard links? This would > be useful if you had to do a "bare metal" restore. Solaris for > example makes hard links between /etc/init.d/* and /etc/rc3.d/*. > Having them not be hard links causes problems when patching and/or > making changes. Yes, adding hardlink support for rsync in BackupPC is next on the list after 2.1 gets released. Happily, rsync 2.6.1 just got released (which includes my performance tweaks), but more importantly it has significantly improved how rsync's -H (hardlink) option is implemented. Now -H can be specified with little overhead when there are few hardlinks. So File::RsyncP and BackupPC::Xfer::RsyncFileIO need to be updated to handle hardlinks and the new protocol version 28. By the way, the tar XferMethod correctly supports hardlinks. > Newer versions of rsync have an option --link-dest. I'm not sure it > would be useful for BackupPC, but I thought I'd point it out. It has > proven very useful in my use of rsync. --link-dest is very useful for standalone rsync backup scripts, but not directly useful for BackupPC. > Currently, I backup some hosts to machine A and some to machine B. > Each machine (server) keeps 1 very old copy (monthly), 3 old copies > (weekly), and 7 recent copies (daily) of the clients it backs up. > Additionally, the other server has one copy of the other's clients for > disaster recovery. Server A and Server B are geographically distant. > To keep from pulling two backups off each client, the secondary server > pulls from the primary. So, if server A backs up client x, there will > be 11 "snapshots" of x on server A and one snapshot on server B. > Server B gets its data from server A and not from client x. I would > like to retain this functionality whith BackupPC. How hard would this > be to implement? Something along these lines could be done using tar rather than rsync. Run BackupPC on server A and B. Setup the direct clients in the normal way. For the redundant clients, eg: client X normally backed up by A, create a client X on B, and set XferMethod to tar. Then set $Conf{TarClientCmd} to run BackupPC_tarCreate on server A to generate a tar file of the most recent backup of client X (In 2.1.0beta1 BackupPC_tarCreate takes a -1 value for the backup number to mean the most recent backup). The drawbacks with this approach is the network bandwidth from using tar vs rsync, plus there isn't a good way to make incrementals work, but you might not need that if you are just taking, say, a weekly full. Craig |