Lets set up some directories that we are going to use later.
My backuppc server has a raid10 array mounted at /data/. I am going to use this to store the data for backuppc. Lets create the backuppc folder on my raid. Note: this folder can grow to be extremely large.
1
mkdir -p /data/backuppc
Now lets create one more folder for BackupPC to store some web interface files.
1
mkdir -p /var/www/html/backuppc
And create the cgi-bin directory for backuppc
1
mkdir -p /var/www/cgi-bin/backuppc
Make note of those 2 directories. The installer will ask for them if we don’t explicitly set them below.
Create and setup the backuppc user.
Create group backuppc.
1
groupadd backuppc
Create backuppc user, and tell it where its home folder is. My backuppc user’s home folder is /opt/backuppc. Change this to whatever you’d like.
Alternatively, you can execute the perl script with no arguments and it will walk you through the install step by step. This is the preferred method if you are upgrading a version 3.X install. (Not supported by this guide)
- install the binaries, lib and docs in /usr/local/BackupPC - create the data directory /data/BackupPC - optionally install the cgi-bin interface - create/update the config.pl file /etc/BackupPC/config.pl --> Do you want to continue? [y]? Created /usr/local/BackupPC/bin Created /usr/local/BackupPC/share Created /usr/local/BackupPC/share/doc Created /usr/local/BackupPC/share/doc/BackupPC Created /usr/local/BackupPC/lib Created /usr/local/BackupPC/lib/BackupPC Created /usr/local/BackupPC/lib/BackupPC/CGI Created /usr/local/BackupPC/lib/BackupPC/Config Created /usr/local/BackupPC/lib/BackupPC/Lang Created /usr/local/BackupPC/lib/BackupPC/Storage Created /usr/local/BackupPC/lib/BackupPC/Xfer Created /usr/local/BackupPC/lib/BackupPC/Zip Created /usr/local/BackupPC/lib/Net Created /usr/local/BackupPC/lib/Net/FTP Created /data/BackupPC Created /data/BackupPC/pool Created /data/BackupPC/cpool Created /data/BackupPC/pc Created /etc/BackupPC Created /var/log/BackupPC Created /var/run/BackupPC Installing binaries in /usr/local/BackupPC/bin Installing library in /usr/local/BackupPC/lib Making systemd and init.d scripts Making Apache configuration file for suid-perl Installing docs in /usr/local/BackupPC/share/doc/BackupPC Installing cgi script BackupPC_Admin in /var/www/cgi-bin/backuppc Installing config.pl and hosts in /etc/BackupPC
Ok, it looks like we are finished. There are several more things you will need to do:
- 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 backuppc! The installation also contains a systemd/backuppc.service script that can be installed so that BackupPC can auto-start on boot. This will also enable administrative users to start the server from the CGI interface. See systemd/README.
Enjoy!
Apache config
I chose the CGI route (not S-CGI) and chose the directory /var/www/cgi-bin/backuppc for my CGI directory. I chose /var/www/html/backuppc as my images directory. You may need to set this path in the config if you ran the configure.pl script with no arguments.
Now we need to copy the Apache config into the apache conf.d directory.