Difference between revisions of "BackupPC"

From Wiki
Jump to navigation Jump to search
Line 1: Line 1:
== Location ==
== Location ==
== Server ==
== Server ==

Revision as of 17:00, 1 April 2019





Configuration and keys are stored in /var/lib/BackupPC and in /etc/BackupPC on m13.umassmed.edu

All backup files are stored in /storage/big0/BackupPC on m13.umassmed.edu

Those files are backed up nightly to /storage/big5 on alcor.umassmed.edu

Excluded Files

The files are excluded because they are either temporary or backed up independently

$Conf{BackupFilesExclude} = {
 '*' => [
   '/storage', # linked to home, which is backed up, and where it is a separate drive, it is backed up by a different mechanism

SSH Keys

Client SSHD

sudo vi /etc/ssh/sshd_config

Change PermitRootLogin yes

sudo service sshd restart

Server public key on Client machine


copy m13.umassmed.edu BackupPC key to client located at /var/lib/BackupPC/.ssh/id_rsa.pub, as backuppc

su -s /bin/bash backuppc
scp ~/.ssh/BackupPC_id_rsa.pub root@<host>:/root/.ssh/


Append the key, as root to authorized_keys (authorized_keys2 is deprecated, Fedora >= 17)

cat /root/.ssh/BackupPC_id_rsa.pub >> /root/.ssh/authorized_keys

edit /root/.ssh/authorized_keys2 and add before ssh-rsa...

rm /root/.ssh/BackupPC_id_rsa.pub
chmod -R go-rwx ~/.ssh

Client public key on Server machine


Done as root if backing up entire system

Generate a key

ssh-keygen -t rsa

copy the key from the client to the server, as root

scp /root/.ssh/id_rsa.pub root@m13.umassmed.edu:/var/lib/BackupPC/.ssh/client_id_rsa.pub


Append the key, as user backuppc on m13.umassmed.edu

cat ~/.ssh/client_id_rsa.pub >> ~/.ssh/known_hosts

as root

chmod -R go-rwx /var/lib/BackupPC/.ssh
rm /var/lib/BackupPC/.ssh/client_id_rsa.pub

Client SSHD

sudo vi /etc/ssh/sshd_config

change PermitRootLogin without-password

sudo service sshd restart

Also consider restrict AllowUsers


On m13.umassmed.edu as backuppc

ssh -l root <client Machine> whoami

Use just hostname, without domainname (i.e. big, and not big.umassmed.edu) Should return as "root" without prompting for a password

Users and Machines

Administrator creates a user account in /etc/BackupPC/apache.users :

htpasswd /etc/BackupPC/apache.users username

username must also have a normal linux account

If they are an admin, then they must be added to

vi /etc/BackupPC/config.pl

Add their client's machine and username to

vi /etc/BackupPC/hosts

Linux machines should install nmbd, part of the samba suite. Edit /etc/samba/smb.conf and put in an appropriate "netbios name =" entry and then confirm you can either find the machine with:

nmblookup <name>


nmblookup -A <ip>

If it is the latter, then the DHCP IP range must be put in the configuration file