September 10, 2024

BackupPC

BackupPC is a (usually linux/BSD based) server based backup application that can backup Windows, Mac and Linux laptops/desktops to a single server and, importantly, de-duplicate files, so if you have duplicates of the same file on a couple computers, it will only backup one, so your backups are a lot smaller. You can browse and restore your files with a web browser, and also it stores your files in standard system files (unlike Bacula, another popular backup app), so you can always get them back if your server app installation becomes screwed somehow, of if you find the backup server hard drive laying around and just want to load files from it.

Install

Installing BackupPC is easy, understanding its configuration is nuts, you have to understand what it’s trying to do before you can get a clear picture of how to make it do what you want. On the SERVER do:

apt-get install backuppc

Now figure out where you want to put all your backup files for all your different laptops, and what method you’ll use to transfer them, in this example I’m using rsync. Change the oddball path below to where you want to put all your backups. Make sure that has enough space for them all:

su backuppc
vi /etc/backuppc/config.pl
    $Conf{XferMethod} = 'rsync';
    $Conf{TopDir}     = '/path/to/where/you/want/to/put/yourbackupfiles';

Now you have to create a local file on the backuppc server to tell backuppc how to back up your remote box:

su backuppc
vi /etc/backuppc/remotehost.pl
    #
    $Conf{XferMethod} = 'rsync';
    #$Conf{FullPeriod} = 6.97;
    #$Conf{IncrPeriod} = 0.97;
    # Number of full and incremental backups to keep:
    #$Conf{FullKeepCnt} = 2;
    #$Conf{IncrKeepCnt} = 6;
    $Conf{RsyncShareName} = '/';
    # These files/paths will be excluded from the backup:
    $Conf{BackupFilesExclude} = ['/proc', '/dev', '/cdrom', '/media', '/floppy', '/mnt', '/var/lib/backuppc', '/lost+found'];
    # Level of verbosity in Xfer log files:
    $Conf{XferLogLevel} = 1;

Now add an entry into your hosts file to point backuppc to the right remote IP:

vi /etc/hosts
    1.2.3.4    remotehost

Now add an entry to the end of the backuppc host.pl file so it knows to go looking for a host named remotehost to backup:

su backuppc
vi /etc/backuppc/hosts
    remotehost   0       backuppc        root

Now you have to create a connection from Backuppc –> root on the box you want to back up. In order to do this, you have to allow root login on the remote box, which you do by adding these lines on REMOTE server

vi /etc/ssh/sshd_config
    PermitRootLogin yes
    AllowUsers root@your.backuppc.server.ip
/etc/init.d/ssh restart

now set up a password-less remote login from back on your BACKUPPC server, so log back into that box as root and do:

su backuppc
ssh-keygen -t dsa -f ~/.ssh/id_dsa -C "backuppc@backup.pc.i.p"
cat ~/.ssh/id_dsa.pub | ssh root@server.ip.tobackup.up 'cat - >> ~/.ssh/authorized_keys'

if this worked, you should be able to ssh directly to root on your remote box like

ssh root@server.ip.toback.up

and it shouldn’t prompt you for a password

Troubleshooting

The most common thing backuppc does when it fails to back some computer up is give very vague reasons. You can manually force it to attempt a backup on a single computer by doing this on your backuppc SERVER:

su backuppc
/usr/share/backuppc/bin/BackupPC_dump -v -f ip.of.remote.computer

How to logout: it seems like this would be easy, but it’s not obvious, you have to prepend another username to the URL, it will trigger a new authentication without losing all your other current sessions

https://somehost.com/backuppc => https://someuser@somehost.com/backuppc

Errors:

error what it means
CheckHostAlive: returning 0.587
Backup aborted ()
Can’t call method “getStats” on an undefined value at
./BackupPC_dump line 1143.
working on it…

88 thoughts on “BackupPC

  1. I do agree with all of the ideas you’ve offered in your post.

    They’re really convincing and can certainly work. Nonetheless, the
    posts are very quick for newbies. May just you please lengthen them a bit from next time?

    Thank you for the post.

  2. I’m not sure why but this blog is loading extremely slow for me.
    Is anyone else having this issue or is it a issue on my end?
    I’ll check back later on and see if the problem still exists.

  3. Fantastic site you have here but I was curious if you knew of
    any message boards that cover the same topics discussed in this article?
    I’d really like to be a part of group where I can get opinions from
    other experienced individuals that share the same interest.
    If you have any suggestions, please let me know. Appreciate it!

  4. Pingback: 1hackneyed
  5. [url=https://finasteride.pics/]buy generic propecia online[/url] [url=https://lasix.solutions/]lasix 40mg[/url] [url=https://abilifytab.shop/]discount abilify[/url] [url=https://anafraniltab.shop/]anafranil ocd[/url]

  6. Amazing blog! Do you have any recommendations for aspiring writers?
    I’m planning to start my own site soon but I’m a little lost
    on everything. Would you propose starting with a free platform like WordPress or go
    for a paid option? There are so many choices out there that I’m
    totally overwhelmed .. Any ideas? Thank you!

Leave a Reply