So, I recently discovered the wonderful backup tool called BackupPC (Thanks, Hans!) and have set it up to backup all the workstations at my office to a central server with a large storage capacity. However, I’ve only set it to backup the important work-related files from each workstation. I would like to be able to backup other files that are important to me from my laptop (family pictures, music, source code, mail, etc), but I would quickly fill up our backup storage space at the office if I tried to do so on our current backup server. So, I’ve decided to try to set up BackupPC locally on my laptop (Mac OS X 10.4 running on a MacBook Pro 17" Core 2 Duo). One catch is that I don’t want to have to drag a large external firewire disk around with me, so I want BackupPC to just backup when the disk is present. I’ve asked if this is possible on the BackupPC forums, and it appears that if the disk is not present when a backup is requested, BackupPC will just fail, which is fine for me in this case, as it will succeed the next time when the disk is connected. So, on with the steps I had to take to get it going:
1. Get a copy of BackupPC from sourceforge.
2. Unpack it somewhere convenient.
3. Read the README – where you will find that it requries a perl module that you may not already have installed (I didn’t).
4. Install File::RsyncP. (Caveat – I’m NOT a perl guy at all, so I just poked around for about 30 seconds on Google to learn how to install File::RsyncP, and followed the CPAN method described here
5. Once perl is all set up with the right modules, just enter the unpacked archive of BackupPC and type:
perl configure.pl
This will ask a lot of questions. Pay attention to them. Answer as well as you can. If you don’t know the answer, take the time to figure it out. Once it is finished installing, there are still a few items you will need to do manually. Namely (Taken from instructions given by the config.pl script):
– Browse through the config file, /etc/BackupPC/config.pl, and make sure all the
settings are correct. In particular, you will need to set $Conf{CgiAdminUsers} so you have administration privileges in the CGI interface.
– Edit the list of hosts to backup in /etc/BackupPC/hosts.
– Read the documentation in /usr/local/BackupPC/doc/BackupPC.html.
Please pay special attention to the security section.
– Verify that the CGI script BackupPC_Admin runs correctly. You might need to change the permissions or group ownership of BackupPC_Admin. If this is an upgrade and you are using mod_perl, you will need to restart Apache. Otherwise it will have stale code.
– BackupPC should be ready to start. Don’t forget to run it as user kimball! The installation also contains an init.d/backuppc script that can be copied to /etc/init.d so that BackupPC can auto-start on boot. This will also enable administrative users to start the server from the CGI interface. See init.d/README.
Now, the CGI script did not work for me initially (at least, I could not invoke it via a browser no matter what I tried) so off to the mailing list I went to see if I could find answers there.
Hrm. This is beginning to not look too hot. It appears that getting this thing running
on OS X will require either recompiling Apache from source with different options selected, or recompiling Perl from source to enable setuid compatibility. Ugh. I just want backups, not recompiling major packages on my system. I sent this to the mailing list:
So, I’ve been trying for a few hours now to get BackupPC working correctly on a mac – (not as a client, but as a *server*). The end goal here is to get backuppc to make backups of localhost to an external firewire drive. However, I’m having a dickens of a time getting the CGI interface to work – it appears that I have to either use mod_perl (which does not appear to be available in this version of apache) or setuid (which this flavor of perl does not have compiled in) Now, I’m all for getting it done right, but at some point the complexity involved in setting up a tool makes the barrier to entry of using the tool much too high for the usefulness of the tool – in other words, this is too hard to get set up in OS X.
I’ve poked around in the history of this mailing list, and found only suggestions that other tools should be used instead – namely PSyncX (which does not do incremental backups, as far as I can tell). Should I be looking elsewhere (Amanda, PSyncX, etc) for an easier-to-install backup daemon for OS X? I guess I’ll wait for a response and check into alternatives in the mean time.
UPDATE:
I did eventually get this shebang up and going. But it had a fatal flaw – backuppc does not deal well with a missing backup repository – consequently, when the backup drive was not connected, nasty-bad™ things would happen.
So, I dug a little more, found rdiff-backup, and have been happily using it ever since.
Leave a Reply