BackupPC

From Indie IT Wiki

BackupPC is a high-performance, enterprise-grade system for backing up Linux, WinXX and MacOSX PCs and laptops to a server's disk. It is both highly configurable and easy to install and maintain.

https://github.com/backuppc/backuppc

Quick Start Guide

https://help.ubuntu.com/community/BackupPC/smb

Documentation

https://backuppc.github.io/backuppc/BackupPC.html

Installing BackupPC 4 from tarball or git on Ubuntu

https://github.com/backuppc/backuppc/wiki/Installing-BackupPC-4-from-tarball-or-git-on-Ubuntu

Send TEST Email

sudo -u backuppc /usr/share/backuppc/bin/BackupPC_sendEmail -u me@domain.co.uk

FIX Error: Backup Failed No Files Dumped

Edit 3 files that backupPC uses and set the following in /etc/backuppc/config.pl

$Conf{BackupZeroFilesIsFatal} = '0';

https://sourceforge.net/p/backuppc/mailman/backuppc-users/

https://bugzilla.redhat.com/attachment.cgi?id=1111264&action=diff

FIX Error: backuppc tarmode is now full

sudo cp -av /usr/share/backuppc/bin/BackupPC_dump /usr/share/backuppc/bin/BackupPC_dump.BACKUP
sudo nano +866 /usr/share/backuppc/bin/BackupPC_dump
sudo nano +1674 /usr/share/backuppc/bin/BackupPC_dump

https://bugzilla.redhat.com/show_bug.cgi?id=1294761

https://bugzilla.redhat.com/attachment.cgi?id=1192784&action=diff

https://bugzilla.redhat.com/attachment.cgi?id=1192784

Moving The Data Directory

In this example, we will move the backuppc data directory to /home so that we can include this in a typical USB nightly backup.

sudo service backuppc stop
sudo service apache2 stop
sudo mkdir /home/backuppc
sudo chmod g-w /home/backuppc
sudo cp -av /var/lib/backuppc/* /home/backuppc/
sudo rm -rfv /var/lib/backuppc
sudo ln -s /home/backuppc /var/lib/backuppc
sudo chown -h backuppc:backuppc /var/lib/backuppc
sudo service apache2 restart
sudo service backuppc restart

Thanks - http://tristram.squarespace.com/home/2012/3/11/moving-the-backuppc-data-directory-to-an-external-hard-disk.html

Delete Backups From Pool

cd /home/backuppc/pc/<name>
rm -rfv <backup#>
su -c '/usr/bin/BackupPC_nightly 0 255' backuppc
nano backups (and remove line with backup#)

Thanks - http://blackbird.si/deleting-backup-from-backuppc-manually/

Wake On Lan

sudo apt-get wakeonlan

Run a script or command before the backup takes place...

 $Conf{DumpPreUserCmd} = '/usr/bin/wakeonlan $host';

Change Web Admin Password

htpasswd /etc/BackupPC/users.htpasswd backuppc

Variables

          $type         type of dump (incr or full)
          $xferOK       1 if the dump succeeded, 0 if it didn't
          $client       client name being backed up
          $host         host name (could be different from client name if
                                   $Conf{ClientNameAlias} is set)
          $hostIP       IP address of host
          $user         user name from the hosts file
          $moreUsers    list of additional users from the hosts file
          $share        the first share name (or current share for
                          $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd})
          $shares       list of all the share names
          $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
          $sshPath      value of $Conf{SshPath},
          $cmdType      set to DumpPreUserCmd or DumpPostUserCmd

Location of Backup Files

/var/lib/backuppc/pc/