We have two hosts - one with BackupPC installed (I will call it
"backuppc_host"), and other to backup ("backup_host")...
Create a user for backup:
Become backuppc user:
Create a ssh key pair:
Copy public key to backup_host (replace 2222 with your ssh port):
ssh-copy-id '-p2222 rbackup@backup_host'
Now you should be able to log-in to backup_host without entering
ssh -p2222 rbackup@backup_host
OK, now we need to configure BackupPC... open admin web interface...
- Click Server / Edit hosts in the left menu
Click Add and enter address of backup_host, user is 'backuppc', other
fields are empty... click Save
Select Hosts / backup_host and click 'Edit config'
Select Xfer tab and set 'rsync' as XferMethod
Add paths you want to backup under RsyncShareName
If you run ssh on other port than 22, add argument like '-p 2222' to
RsyncClientCmd and RsyncClientRestoreCmd and change '-l root' to '-l
if backup_pc is not on your local LAN, you may want to increase
maximum ping response time with param PingMaxMsec under Backup Settings
That's it... Click on backup_host Home in left menu and click 'Start
Full Backup'... if everything is ok, you should be able to browse new
If you get errors like this:
Got fatal error during xfer (Unable to read 4 bytes)
Backup aborted (Unable to read 4 bytes)
try to run RsyncClientCmd manually as backuppc user to make sure that
user is able to connect to remote host.
Also make sure that remote user has permissions to read/write requested
folders. You can use sudo for that purpose, that is less secure, but it
may be necessary (e.g. for full backup of /).
Install package (if you don't already have it) on backup_host:
Then edit sudoers file:
add this line to the end of the file:
rbackup ALL=NOPASSWD: /usr/bin/rsync
add 'sudo' before \$rsyncPath in RsyncClientCmd and
RsyncClientRestoreCmd params on BackupPC admin interface. e.g.:
$sshPath -p 2222 -q -x -l rbackup $host sudo $rsyncPath $argList+
To reduce the perfomance hit on client machine, you can add 'nice'
command to RsyncClientCmd and RsyncClientRestoreCmd params, e.g.:
$sshPath -p 2222 -q -x -l rbackup $host nice -n 19 sudo $rsyncPath $argList+
It is a good idea to lock rbackup account on backup_host, since we'll
be using only key authorization.