BackupPC

From Servfire
Jump to: navigation, search

Configuration for a Linux client

Client-side

  • Debian: apt-get install rsync
  • Create a new user for backuppc (call it backuppc or something :P)
  • Set password as blank (disables password auth for the user)
  • Copy SSH key to /home/backuppc/.ssh/authorized_keys
  • Add line to /etc/sudoers (or /etc/sudoers.d/backuppc): backuppc ALL = NOPASSWD: /bin/tar, /usr/bin/rsync

Server-side

  • Add host
  • Xfer tab:
    • Override XferMethod to rsync
    • Override BackupFilesOnly to *, with subentries of /home and /etc
    • Override BackupFilesExclude to *, no subentries
    • Override RsyncClientCmd with: $sshPath -q -x -l backuppc $host /usr/bin/sudo $rsyncPath $argList+

Troubleshooting

If I 'su - backuppc' on the client, then try to 'sudo /usr/bin/rsync', I get a password prompt

Check /usr/bin/rsync exists, if not, install for your distro.

Configuration for a Windows client

Client-side

I built a cygwin install that is barebones, just the components required to run a bash shell, openssh server and rsync, along with a script that sets up service account, sshd keys, etc. Copy the folder, run bash.bat as admin, then type ./ssh-perform-config, follow it when it prompts you to install the authorized_keys, as the script will need to fix file permissions after running.

Server-side

  • Add host
  • Xfer tab:
    • Override XferMethod to rsync
    • Override BackupFilesOnly to *, with subentries of /C and whatever other drives
    • Override BackupFilesExclude to *, with no subentries
    • Override RsyncClientCmd with: $sshPath -q -x -l backuppc $host $rsyncPath $argList+