BackupPC on Mac OS X - part 2
Here are some Mac OS X specific items for BackupPC install. They include: configuring Apache, enabling root, and setting up the hosts file. Hope this helps. Enjoy
Apache
I found this the most challenging part of the install. The main challenge was simply overcoming the intimidation created by seeing all the configuration options in “httpd.conf” and hoping that I could make the right choices without having to spend hours getting up to speed. I ended up on the hours side because Mac OS X is slightly different than Linux installs. Not much, but for the first timer it was enough
BackupPC uses Apache which is included with OS X and is enabled by selecting “Personal Web Sharing” in System Preferences. Note that the OS X version is configured in a “slightly” different way than for Linux examples I found on the net. Specifically “cgi-bin” and “Documents” are stored in “/Library/WebServer”.
It looks like this in the Apache config file (/etc/httpd/httpd.conf)
DocumentRoot “/Library/WebServer/Documents”
<Directory “/Library/WebServer/Documents”>
All the alias’ need to point to this directory as well. This is in the <IfModule mod_alias.c> section.
Alias /manual/ “/Library/WebServer/Documents/manual/”
<Directory “/Library/WebServer/Documents/manual”>
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>ScriptAlias /cgi-bin/ “/Library/WebServer/CGI-Executables/”
<Directory “/Library/WebServer/CGI-Executables”>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
The main point is that BackupPC config.pl requires the user to specify this location and on the Mac it is different than for Linux/Unix.
The second point is that BackupPC wants the user to “login”. This can be done with .htaccess files or via modification of the httpd.conf file. I modified the httpd.conf file by adding the following to the end of the file. I Also commented out the previous setting for “user” and “group” which are set to “www” by default. For some reason I was not able to get the .htaccess file method to work. (Nov 2 edit … I have now got .htaccess to work for users. I found this very helpful http://httpd.apache.org/docs/2.2/howto/auth.html )
user backuppc
group wwwServerName “YOUR_SERVER_NAME”
<Directory /Library/WebServer/CGI-Executables/>
AuthName “Backup Admin”
AuthType Basic
AuthUserFile /Library/WebServer/.htpasswd
Require valid-user
</Directory>
Enabling Root
This is done via the “NetInfo Manager Utility” — /Applications/Utilities/NetInfo Manager
Enabling /etc/hosts
Edit /etc/hosts directly via “root” or use the following to load it into NetInfo database. Here is an example:
$ sudo niload hosts . <<EOF
> 192.168.1.101 hostname2
> EOF
$
– Added June 26 –
RsyncP
I’ve been using rsync as the transport and it requires installation of perl module RsyncP. The File::RsyncP module is available from http://perlrsync.sourceforge.net or CPAN.
SSH Keys
this howto really helped me with ssh set up. The other gotcha with Mac is that ssh needs to be enabled via System Preferences. System Preferences -> Sharing -> Remote Login
System Preferences -> Sharing -> Remote Login







June 27, 2007 at 10:28 am
Thanks for these precious informations (i’m struggling with backuppc as well). DO you have any tips on backing up my macs on a linux server using backuppc… i succeed in manually transfer files through ssh but not with backuppc, i always end up with a “no files dump” error message…
November 2, 2007 at 12:36 pm
I’ve been able to get .htaccess to work. this link was very helpful
http://httpd.apache.org/docs/2.2/howto/auth.html