Adding backuppc using backports

apt-get install backuppc/lucid-backports
Change backuppc password
sudo htpasswd /etc/backuppc/htpasswd backuppc

??Change user home dir to /home/backuppc ? so i do not have to update sshid everytime i reinstall backuppc to fix the external drive setup
??Change user uid and gid to match proxmox? dosnt really matter anymore not using bindmounts or nfs

Windozes client

Add a backuppc Administrator user and add him to the Backup Group I do not think Backup Operator Group is nessary and rarely works!

net localgroup "Backup Operators" "" /add
mkdir c:\cygwin\packages

For the rest of the windows installation follow this post which i will condense here someday in case remote site goes away. Setup (Windows 7/Vista/XP)

Linux Client

aptitude install sudo rsync
adduser backuppc
echo "backuppc ALL=NOPASSWD: /usr/bin/rsync" >> /etc/sudoers

Do this on the backuppc server

Create the key

sudo -i
su backuppc
ssh-keygen -t rsa

Copy the key
sudo -i
su backuppc
ssh-copy-id ‘-p highport username@client’

if you don’t have ssh-copy-id, use the following.

scp -P highport /var/lib/backuppc/.ssh/ username@client:~/.ssh/
ssh -p highport username@client
cat ~/.ssh/ >> ~/.ssh/authorized_keys
rm ~/.ssh/

Add a backuppc web user i usually make them match the email address
htpasswd /etc/backuppc/htpasswd clientemail

RsyncCmd lines for backup on local machine preferably to another hard drive

$sshPath -q -x -l backuppc -p 22 $host sudo $rsyncPath $argList+

RsyncCmd Lines for remote systems

$sshPath -q -x -l backuppc -p 22 $host $rsyncPath $argList+

Some Useful commands

wish i could figure out a way to make this work with tail -f seen it once somewhere, but never been able to find it since. If anyone know how please leave me a comment.

/usr/share/backuppc/bin/BackupPC_zcat /var/lib/backuppc/pc/

tail -f /var/lib/backuppc/pc/

The .pl file i am using to backup the local host still trying to figure out how to get the * excludes to work!

$Conf{RsyncShareName} = [
$Conf{BackupFilesExclude} = {
  '/' => [
  '/var/lib/vz' => [
  '*' => [
$Conf{RsyncClientCmd} = '$sshPath -q -x -l backuppc -p 22 $host sudo $rsyncPath $argList+';
$Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l backuppc -p 22 $host sudo $rsyncPath $argList+';
$Conf{BackupFilesOnly} = {};
$Conf{RsyncArgs} = [

1. Use keys (which represent the transfer root) for greater clarity
2. Exclude needs to be relative to the transfer root
3. Make sure you’re using rsync exclude syntax properly!

For example, I have a RsyncShareName /service, under which is a chroot environment containing /proc, /var/lib/mysql etc. I want those folders to exist in my backup, but not their contents (for obvious reasons). Therefore, I made a BackupFilesExclude key /service and for it I added /proc/** and /var/lib/mysql/**. Works as intended.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.