Back Up Linux And Windows Systems With BackupPC

Version 1.0
Author: Falko Timme

This tutorial shows how you can back up Linux and Windows systems with BackupPC. BackupPC acts as a server and is installed on a Linux system, and from there it can connect to all Linux and Windows systems in your local network to back them up and restore them without interfering with the user's work on that system. On the clients minimal to no configuration is needed. BackupPC supports full and incremental backups, and it comes with a neat web frontend for the administrator and normal user so that backups and recoveries can be managed through a web browser. It should be noted, however, that BackupPC does file-based backups, not bit-wise backups like Ghost4Linux, for example, so it is not made for disk/partition imaging.

BackupPC comes with a clever pooling scheme that minimizes disk storage and disk I/O. Identical files across multiple backups of the same or different PCs are stored only once resulting in substantial savings in disk storage and disk I/O.

I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!


1 Preliminary Note

In this tutorial I will set up BackupPC on a Debian Etch server with the static IP address and the hostname The procedure should be similar or the same on Debian Sarge and Ubuntu.

BackupPC stores the backups in /var/lib/backuppc, so I've made that an extra partition of about 90 GB on the BackupPC server. It should be noted that this is still very small, especially if you want to back up lots of machines, so bigger is better. Also, you should consider using LVM for the /var/lib/backuppc partition so that you can enlarge it whenever you need it. You can learn more about LVM in this tutorial:

I will show how to back up and restore a Ubuntu Edgy Eft desktop system with the hostname/NetBIOS name falko-desktop and a Windows XP laptop with the NetBIOS name notebook. Both get their network settings through DHCP.

BackupPC supports three transfer methods, smb, rsync/rsyncd, and tar. rsync is the recommended method for Linux systems, so I will use that for the Ubuntu desktop, and smb is the preferred method for Windows systems, so I use it for the Windows laptop.


2 Install BackupPC

On, we run this command as root to install BackupPC:

apt-get install backuppc rsync libfile-rsyncp-perl par2 smbfs

You willl be asked a few questions:

Workgroup/Domain Name: <-- WORKGROUP (in fact, it doesn't matter what you enter here)
Modify smb.conf to use WINS settings from DHCP? <-- No

Then you will see this message:

Web administration default user created

BackupPC can be managed through its web interface:

For that purpose, a web user named 'backuppc' with 'dAamcQIH' as password has been created. You can change this password by running 'htpasswd /etc/backuppc/htpasswd backuppc'. <-- Ok

Please make a note of the web frontend password (dAamcQIH in this case) for the user backuppc. If you don't like the password, you can change it by running

htpasswd /etc/backuppc/htpasswd backuppc

Then open a browser and type in (or if you have a proper DNS record for in your network). If you get a login prompt, everything is fine, if not (like on my installation), run this command:

dpkg-reconfigure backuppc

You will see this question:

Add aliases for /backuppc/ to your apache config files ? <-- Yes

Afterwards, go to again and log in with the username backuppc and backuppc's password:

Share this page:

8 Comment(s)

Add comment



Backup aborted (Unable to read 4 bytes)

This probably means that you have not authenticated to the host with the proper name/IP before.

On the backuppc do these commands...
(Remember to say YES to Continue connecting)

ssh -l root whoami

and with hostname only

ssh -l root server1 whoami

and also with the IP

ssh -l root whoami

From: jennifer

If i am able to ssh but however i am still getting the error 4 byte.


what does that means?

From: LB

How can I do this to sync computers on my network to an external VPS on the internet? I can't get it to work.

I think it is the way to specify the hosts that is the problem...

From: Anonymous

During installation, when the character-based GUI comes up and and asks you to choose apache (probably the only choice), you have to hit the spacebar to select it.  This isn't obvious and if you just hit return to go on, it'll finish installing as if everything's OK, but the web interface won't work.

From: Cristobal Ramos

Hi Man,


Thank you for the information, I have configured a BackupPC server and the backups working well, the problem is with the notifications by mail, because when an backup finished nothing happens with notifications, I did test sending mail from the console by backuppc and it works fine. I don't know why the notifications does not work.


if you have any advice for me, I would appreciate you muc

From: eugen


when I run command: "apt-get install backuppc rsync libfile-rsyncp-perl par2 smbfs"

it return:"bash: apt-get: command not found..." on centos 7 system

What to do?


From: till

The above tutorial is for Debian and Ubuntu. For CentOS, the commands will differ as centos uses the yum command instead of apt-get to install software packages.

From: MN

After much struggle, I have started my first backup of my first system.  The problem that I had was getting sshd configured properly.  My backup server is on (Debian 8.6) and my (first of several) client PCs is on (OpenSUSE 13.2).  On the client (file is /etc/ssh/sshd_conf , I commented out:

"PermitRootLogin yes""PermitRootLogin without-password"

and added

"StrictModes yes""AllowUsers [email protected]"

On the server I did:

Uncomment:PermitRootLogin yes

I added the line:AlllowUsers [email protected]

These few changed allowed me to complete the configuration and start the first backup.  Perhaps include some generic instructions for configuring ssh to the tutorial?

Many thanks for a great job!!!