BackupPC Web Interface

Jump to navigation Jump to search


BackupPC includes a very powerful web interface from which all administrative tasks can be done. The setup of BackupPC's CGI library is quite versatile, and requires execution on the local machine.

Built-In Apache Configuration

BackupPC Community Edition is bundled with scripts to automatically configure an existing apache server and suidperl to accept connections from the local machine.

By default, BackupPC Community Edition comes with htpasswd authentication. In order to use the BackupPC web interface, these are the steps you need to follow:

Adding a CGI Administrator to BackupPC

Before you start BackupPC Community Edition, as the root user, open up /etc/BackupPC/ and go to line 2020, which should look like this:

$Conf{CgiAdminUsers} = ;

Change this line to

$Conf{CgiAdminUsers} = 'admin';

or some other name of your choosing. The name is irrelevant and is not related to the users of the machine.

Modifying the BackupPC.users file

Adding a User

By default, BackupPC Community Edition uses htpasswd for user authentication. The file Apache checks against is named BackupPC.users located in the conf.d directory within the Apache configuration folder. For Red Hat and derivative distributions, this is /etc/httpd/conf.d, for Suse, it is /etc/apache2/conf.d.

We can add users to BackupPC via the command line. For Red Hat systems, htpasswd is available in the path:

htpasswd /etc/httpd/conf.d/BackupPC.users $USER

On Suse, htpasswd is not in the default path.

/usr/sbin/htpasswd2 /etc/apache2/conf.d/BackupPC.users $USER

You will then be prompted for a password for the user, which will then be available the next time Apache starts.

Removing a User

By default, there is a user named "backuppc" with the password of "backuppc" that has no privileges to change settings. If you would like to remove this user on a Red Hat-based system, type:

htpasswd -D /etc/httpd/conf.d/BackupPC.users backuppc

For Suse users, use

/usr/sbin/htpasswd2 -D /etc/apache2/conf.d/BackupPC.users backuppc

Enabling Machine Access

For security reasons, BackupPC Community Edition is very restrictive as to which IPs have access to the server. By default, only the localhost is allowed to open the user interface. If you would like to change this to your local network's IP range, while still in the apache open up BackupPC.conf with your text editor of choice and go to line 15:

allow from

Change the access level to what you you feel is appropriate.

Apache Setup

Detailed instructions, technical overview, etc. can be found in the BackupPC Documentation: Step 9 CGI Interface.

Lighttpd Setup

A popular option for users running BackupPC on dedicated storage units. Documentation on installation for Debian can be found on the BackupPC wiki.