jeudi 25 juin 2015

BackupPC second install

Backuppc setup summary

Had to reinstall Ubuntu due to disk crash (!) on the backup server :-)

Installed 14.10, upgraded to 15.04
Removed unity then xorg to keep a text-only server.
Added openssh-server, backuppc, and their required packages.

Reset password for users admin & backuppc:

cd /etc/backuppc
sudo htpasswd htpasswd admin
sudo htpasswd htpasswd backuppc

Problem 1

Connecting to http://base.lan/backuppc says I want to download a bin file...
Actually Apache2 knows only the hostname base not base.lan
Added base.lan to /etc/hosts as alias for base: still only the BIN file for base?lan (but base/backuppc works :)
Might be a browser cache issue, in the meantime I can use the short hostname fine.

Problem 2

Copied localhost.pl from the previous installation, it doesn't work.  This is a tar backup and its getting permission denied on a number of directories/files under /etc
So added a permission via visudo as explained in the FAQ http://backuppc.sourceforge.net/faq/localhost.html

Problem 3

Now adding another (linux, ssh+rsync) <host>.pl file.  Also need to add it through the web interface otherwise it's not recognized. Then also need to create a subdir for the host under /var/lib/backuppc/pc/<host> to hold the log file etc... (should the web interface do this?)
After this the new host still doesn't backup (ping failed)
Turns out that the permissions for the directory /var/lib/backuppc/pc/<host> need to be 750 not the default 755.

Problem 4

Now the backup is starting and immediately failing for the new rsync host.  Which was expected since the ssh key stuff has not yet been done.  So followed instructions as per https://help.ubuntu.com/community/SSH/OpenSSH/Keys to generate a new key pair for backuppc and then scp the .pub to <host> and append it to authorized_keys in root's .ssh directory.  That seems to do the trick now the first full backup is running.
The first backup took a really long time (>24h) but this was my main data storage PC and I'm happy to have it backed up again :).  The next backup (incremental) took only 30 minutes which is fine.

Problem 5

Added a new (Windows+SMB) host.  Didn't work initially, the problem was in the both the config file (username, password, sharename, directory names) and on the client itself (match all of the above with the actual disk and OS configuration).  For example I had to reset the user's password on the OS side and put the new value in the config file.  Now the first backup is running.