BackupPC, as the name already says

BackupPC is the name of a Debian package, with which Backups can be provided. Large information, in particular a good documentation can be found also at :

It should be installed with:

# aptitude install backuppc 

Here it is a password given to you, which you please accurately note ;-) After successful installation as the first step, we must stop backuppc.

# /etc/init.d/backuppc stop 

BackupPC configuration steps


Put a link into the folder /etc/apache2/conf.d/ to backuppc's webserver configuration file:

# ln -s /etc/backuppc/apache.conf /etc/apache2/conf.d/backuppc.conf 


Importantly to know, it is already a backupprogramm active, which was shipped with DebianEdu during the installation and activated. It's the slbackup package which is based on the backuptool rdiff-backup. This applies to switch it off, since it would backup otherwise our new data pool again.

# vim /etc/cron.d/slbackup 

For simplicity we commentate the initial instruction out here. Thus this file looks then in such a way:

# cron job for Skolelinux Backup (once A day)
# 00 01 * * * root if [ -x /usr/share/slbackup/slbackup-cron -a -f /etc/slbackup/slbackup.conf ]; then /usr/share/slbackup/slbackup-cron; fi

We use now simply the storage place, which was already put on for slbackup. In the Etch version is this: /skole/backup like already in the Sarge version. We use it in such a way:

With this we secure what already was put on by BackupPC while it's installation.

# cp -a /var/lib/backuppc/* /skole/backup/

Then we delete the origin (only after have copied it before ;-) :

# rm -rf /var/lib/backuppc

At least we provide the symbolic link:

# ln - s /skole/backup /var/lib/backuppc 

Configuration of BackupPC

Now the configuration of BackupPC at DebianEdu. For this we change with # cd /etc/backuppc into the configuration folder of BackupPC. This command # ls - al shows us the files being there.

tjener: /etc/backuppc# ls -al
total 143
drwxr-xr-x   2 root root  1024 2007-04-10 23:28 .
drwxr-xr-x 128 root root  8192 2007-04-10 16:53 ..
-rw-r--r--   1 root root   414 2007-02-06 19:46 apache.conf
-rw-r--r--   1 root root 64733 2007-04-10 23:28
-rw-r--r--   1 root root 64397 2007-02-06 19:46
-rw-r--r--   1 root root  2368 2007-04-10 22:33 hosts
-rw-r--r--   1 root root     0 2007-04-10 10:00 htgroup 
-rw-r--r--   1 root root    23 2007-04-10 10:04 htpasswd 

In detail we see the following:

This file should copied first times, before we change it with our attitudes by doing # cp -a , so that we later always have a reference on the original file ;-) In this file are now the system-far changes made, which appear meaningful for a use of BackupPC on tjener. I selected first times these changes here (possibly a little finetuning must be made in use of BackupPC). Here are my changes:

# to specify two pools ( and
$Conf{DHCPAddressRanges} = [
            ipAddrBase => '10.0.2',
            first => 10,
            last  => 29,
            ipAddrBase => '10.0.2',
            first => 50,
            last  => 99,
$Conf{BackupZeroFilesIsFatal} = 0;
$Conf{XferLogLevel} = 2;
$Conf{EMailAdminUserName} = 'root';
$Conf{EMailUserDestDomain} = '@intern';
$Conf{Language} = 'de';

Next we extend the file of hosts by the following entries, so that BackupPC also knows, which machines it has to backup:

host        dhcp    user    moreUsers     # <--- do not edit this line
tjener.intern   0       root              # <--- mainserver
ltspserver00.intern     1       root      # <--- first ltspserver
static00.intern 1       root              # <--- first workstation client

Since tjener has to backup itself, I provided it with its own configuration file. This is called first times and lies likewise in the folder /etc/backuppc. In order to backup a certain machine differently than with the system standard, one provides simply a configuration file and puts it into the backup pool of the machine. Since this does not exist however yet, we provide it simply with:

# mkdir -p /skole/backup/pc/tjener.intern

With # cd /skole/backup/pc/tjener.intern we change into the desired folder and produce it there with e.g. # vim We fill it as follows with this content:

# Local server backup of /etc and /skole/tjener as user root
$Conf{XferMethod} = 'rsync';
$Conf{RsyncShareName} = ['/etc', '/skole/tjener'];
$Conf{RsyncClientCmd} = '/usr/bin/sudo $rsyncPath $argList+ $shareName';
$Conf{RsyncClientRestoreCmd} = '/usr/bin/sudo $rsyncPath $argList+ $shareName';

As one can see from above, we use rsync with sudo, in order to backup /etc and /skole/tjener. In addition, from this it follows that we must still configure sudo and install for rsync a library, which was not installed automatically by BackupPC, since BackupPC works according to standard with tar. Just install it with # aptitude install libfile-rsyncp-perl. Afterwards we can add the following entry now with # visudo to the file /etc/sudoers (add it only in this way!).

backuppc ALL=NOPASSWD: /usr/bin/rsync --server --transmitter * 

So, that should have been it now with the configuration. We thus still start the server processes of BackupPC with # /etc/init.d/backuppc start.

Backup and Restore

Now it becomes excitingly. We want to see, what BackupPC can do for us. We announce ourselves thus first times at the Web interface. This can take place from our tjener, if he is installed the workstation- or terminalserver profile, or from a client in the net. We direct our Browser towards http://tjener.intern/backuppc and announce ourselves to the user registration appearing now with the user: “backuppc” and the password assigned with the installation of BackupPC. (You had accurately noted and/or had by heart learned it, or?)

Before us now the world of BackupPC opens itself. First point we do there is, we press on the left side the link: Documentation ;-)

After we read and understood these, the remainder explains itself as from alone. Therefore this introduction here also stops :-)


It is absolutely recommended to read this: (it is on English, but they should do themselves that as Admin more tjener times!)

Testing and trying

Which I wanted to have at least still mentioned however in any case, that you must do tests and tries. Provide Backups, delete files, and completely importantly, you must be able to re-establish them also. If you practice this, it examines you all functionalities. Continue to tune the system after your needs and do NOT enjoy then the security of a good backupsystem. You will continue to observe it and look after irregularities, read log files, in order to always know about your data.

That's all for now!

PS: … how to change a password for the Login of BackupPC? Yes, like always with htpasswd. (# man htpasswd helps also here ;-) )

# htpasswd /etc/backuppc/htpasswd backuppc

to be expanded if needed