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 šŸ™‚


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

ScriptAlias /cgi-bin/ “/Library/WebServer/CGI-Executables/”
<Directory “/Library/WebServer/CGI-Executables”>
AllowOverride None
Options None
Order allow,deny
Allow from all

The main point is that BackupPC 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 )

user backuppc
group www

<Directory /Library/WebServer/CGI-Executables/>
AuthName “Backup Admin”
AuthType Basic
AuthUserFile /Library/WebServer/.htpasswd
Require valid-user

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

> hostname2



— Added June 26 —


I’ve been using rsync as the transport and it requires installation of perl module RsyncP. The File::RsyncP module is available from 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


6 Replies to “BackupPC on Mac OS X – part 2”

  1. 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…

    1. Sam,

      I am trying to use backuppc to backup macs onto a Linux box. Did you get this to work? If so what are the tips?

  2. There really isn’t a need to enable the root user account for login – doing so is a security risk, and you can do everything you need to under your regular account – just prefix those root-specific commands with “sudo” as you did earlier.

Comments are closed.