/usr/share/doc/backuppc/examples/tarssh-sudo.pl is in backuppc 3.3.1-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #
# Tar backup over ssh using SUDO with user 'backuppc'
#
# You should generate an SSH key pair to allow the local 'backuppc' user
# to connect as 'backuppc' on the target host.
# Please refer to the BackupPC's manual for key generation details.
#
# Then on the client host added the following line to 'sudoers' with 'visudo':
# backuppc ALL=NOPASSWD: /bin/tar
#
$Conf{XferMethod} = 'tar';
$Conf{TarClientCmd} = '$sshPath -q -x -n -l backuppc $host'
. ' /usr/bin/env LC_ALL=C sudo $tarPath -c -v -f - -C $shareName+'
. ' --totals';
$Conf{TarClientRestoreCmd} = '$sshPath -q -x -l backuppc $host'
. ' /usr/bin/env LC_ALL=C sudo $tarPath -x -p --numeric-owner --same-owner'
. ' -v -f - -C $shareName+';
$Conf{BackupFilesOnly} = [ '/onedir', '/anotherdir' ];
|