I Need To Make A Change With My IT Support! Call (225) 706-8414

Using BackupPC to backup a Linux Network

BackupPC is a great tool for Linux/UNIX backups. It’s network-aware and can rely on several transfer packages, ranging from rsync or ftp to smbclient. Technically, BackupPC works with Windows via smb, but we’ve found it’s best for a Linux-heavy network.


To use BackupPC, you need the following:

  • A Linux-based server, preferably something standard like CentOS, Debian, etc.
  • An external USB disk or a remote iSCSI disk. Don’t use a local hard-disk unless the backup server is dedicated to nothing other than running BackupPC.
  • Some knowledge of using SSH keys.


You need to install BackupPC. How this is done depends on which Linux distro you are using. In a Debian environment, you would run:

# apt-get install backuppc

This should install all of the needed BackupPC packages, ranging from rsync to Apache.

Once installed, you should be able to access the admin page at the URL of http://localhost/backuppc

The installation directories vary on the Linux distro, but generally you will find:

  • /etc/apache2/conf.d/ – Will include the Apache vhost setup for BackupPC.
  • /etc/backuppc/ – The BackupPC configuration files.
  • /var/lib/backuppc/ – The BackupPC data files.
After apt-get (or whatever) installs everything, you should actually move /etc/backuppc/ and /var/lib/backuppc/ to your USB disk and then symlink everything back the way it was. This way you can lose the local server but not your configuration or data.
Next, setup a good password for your BackupPC admin user:
# htpasswd /etc/backuppc/htpasswd backuppc
You’ll use this to log into the BackupPC web-based admin page.
Protecting a Host
To protect a host, add it to /etc/backuppc/hosts. The format is well documented once you open the file. Be sure to setup the host to use rsync via the BackupPC web-admin page.
Here is the big trick: You need to setup SSH keys for the BackupPC Linux user to use to connect to the local and remote hosts.

root@dev backuppc # su – backuppc
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/backuppc/.ssh/id_rsa): 

Once this is done, cat the pub key to the root user on each Linux server to protect:

root@dev backuppc # cd ~backuppc
root@dev backuppc # cat .ssh/id_rsa.pub >> /root/.ssh/authorized_keys2

Also, make sure you get past the initial login prompt to accept the remote key by doing a SSH:

root@dev backuppc # su – backuppc
$ ssh root@localhost
The authenticity of host ‘localhost (::1)’ can’t be established.
RSA key fingerprint is xxx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘localhost’ (RSA) to the list of known hosts.
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-16-generic-pae i686)

* Documentation: https://help.ubuntu.com/
New release ‘oneiric’ available.
Run ‘do-release-upgrade’ to upgrade to it.

No mail.
Last login: Fri Feb 1 12:05:25 2013 from localhost

Some good notes on using BackupPC on an Ubuntu server.


Concerned About Cyber Attacks?


Want to Migrate to the Cloud?

Office 365

Ready to Experience Microsoft Office 365?

Want the latest IT news directly in your inbox? Subscribe now!