Howto Install backuppc on a Raspberry-Pi
After having no real no backups of my private infrastructure for quite some time, a colleague recommended backuppc. It may look like coming directly from the 90's, but it is so straight forward in what it does that it single-handedly smashed all my half-assed-not-fully-thought-through bash scripts to pieces.
Basically it does exactly what my half-assed-not-fully-thought-through bash scripts tried to do as well: rsync directories from several machines to a central place, where it gets stored incrementally. – Only that this one works.
Install on Raspbian
Unfortunately the install routine is completely messed up and after I've been through that a couple of times, I've decided to document it here, so that I know where to find it next time.
By the way:
The install routine on Ubuntu is just as messed up and so everything I write here, is also valid for Ubuntu 19.10.
The Problem
The dependencies of the Debian package for backuppc seem to lack quite some important packages. I don't know if and how this works for anybody who is testing this, but I wasn't able to install backuppc from the package repos on a fresh Ubuntu or a fresh Raspbian.
But fear not, help is near!
The Solution
Figuring this out is a pretty tidious process, that involves a lot of $ sudo apt remove backuppc
and $ sudo rm -rf /var/lb/backuppc/localhost
.
Once you have it, it's completely trivial. Samba (especially the Samba Client) and the Perl(!) rsync bindings are missing and installing them alongside backuppc simply does the job.
So here we go:
$ sudo apt install samba-common samba smbclient libfile-rsyncp-perl backuppc
Afterwards still nothing works, unless you edit the Apache conf of backuppc:
$ sudo nano /etc/apache2/conf-enabled/backuppc.conf
and comment out the Require local
(which of course is meant to be there as a security measure to persuade us properly securing the Web Interface!).
<RequireAll>
# Comment out this line once you have setup HTTPS and uncommented SSLRequireSSL
#Require local
# This line ensures that only authenticated users may access your backups
Require valid-user
</RequireAll>
Only thing left is restarting everything, and then you're good to go:
$ sudo service backuppc restart
$ sudo service apache2 restart
Further Reading
While doing what I was doing, I came across a couple of links, that might be helpful for anybody trying to install the software:
- a good starting point: https://wiki.ubuntuusers.de/BackupPC/
- if you want to store data on an external drive: http://tristram.squarespace.com/home/2012/3/11/moving-the-backuppc-data-directory-to-an-external-hard-disk.html
- fixing localhost backups, when they fail: https://sourceforge.net/p/backuppc/mailman/message/30416338/