BackupPC Setup

Prerequisites

Set config as follow:

$Conf{RsyncSshArgs} = [
  '-e',
  '$sshPath -l backuppc'
];
$Conf{RsyncClientPath} = 'sudo /usr/bin/rsync';

Assumption

  • BackupPC Server Public Key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzk3XD+iMc/jtmhPcYXNWAuOi9DqZba9YYVwkgCXQci [email protected]
  • Client IP: 10.0.2.45
  • Rsync dir on Client Machine: /usr/bin/rsync

On Client Machine

sudo useradd -d /home/backuppc backuppc
sudo mkdir -p /home/backuppc/.ssh
sudo chown backuppc:backuppc /home/backuppc/.ssh
sudo chmod 700 /home/backuppc/.ssh
sudo touch /home/backuppc/.ssh/authorized_keys
sudo chown backuppc:backuppc /home/backuppc/.ssh/authorized_keys
sudo chmod 600 /home/backuppc/.ssh/authorized_keys
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzk3XD+iMc/jtmhPcYXNWAuOi9DqZba9YYVwkgCXQci [email protected]" | sudo tee -a /home/backuppc/.ssh/authorized_keys
sudo visudo
  # inside visudo
  backuppc ALL=NOPASSWD: /usr/bin/rsync

On UNRAID Machine

docker exec -it backuppc bash
  # inside docker bash
  su - backuppc -s /bin/bash
    # inside su bash
    # NOTE: ensure to add known host during this step
    ssh -l backuppc 10.0.2.45 whoami

On BackupPC WebUI

Add host 10.0.2.45 with user backuppc

References