Jamie, you're a gentle man and a scholar! Thank you, thank you.
Works wonderfully.
On Tuesday, May 6th, 2025 at 11:00 AM, Jamie Burchell <ja...@ib3.uk> wrote:
> Relevant rsync config (note use of sudo):
>
> $Conf{RsyncClientPath} = 'sudo /usr/bin/rsync';
>
> $Conf{RsyncBackupPCPath} = '/usr/bin/rsync_bpc';
>
> $Conf{RsyncSshArgs} = [
>
> '-e',
>
> '$sshPath -l backuppc'
>
> ];
>
> $Conf{RsyncArgs} = [
>
> '--super',
>
> '--recursive',
>
> '--protect-args',
>
> '--numeric-ids',
>
> '--perms',
>
> '--owner',
>
> '--group',
>
> '-D',
>
> '--times',
>
> '--links',
>
> '--hard-links',
>
> '--delete',
>
> '--delete-excluded',
>
> '--one-file-system',
>
> '--partial',
>
> '--log-format=log: %o %i %B %8U,%8G %9l %f%L',
>
> '--stats',
>
> '--acls',
>
> '--xattrs'
>
> ];
>
> $Conf{RsyncRestoreArgs} = [
>
> '--recursive',
>
> '--super',
>
> '--protect-args',
>
> '--numeric-ids',
>
> '--perms',
>
> '--owner',
>
> '--group',
>
> '-D',
>
> '--times',
>
> '--links',
>
> '--hard-links',
>
> '--delete',
>
> '--partial',
>
> '--log-format=log: %o %i %B %8U,%8G %9l %f%L',
>
> '--stats',
>
> '--acls',
>
> '--xattrs'
>
> ];
>
> /etc/sudoers file:
>
> backuppc ALL=NOPASSWD: /usr/bin/rsync --server *
>
> Also you need to SSH from the backuppc server (using the backuppc user) to
> each client once manually to populate authorized_keys.
>
> Hope that helps.
>
> From: Michael Vincent via BackupPC-users
> <backuppc-users@lists.sourceforge.net>
> Sent: 06 May 2025 15:37
> To: BackupPC-users@lists.sourceforge.net
> Cc: Michael Vincent <michaelvincent-backu...@proton.me>
> Subject: [BackupPC-users] BackupPC 4.4.0 on Linux - sudo / rsync possible?
>
> I see references in the documentation on the ability to backup via rsync
> combined with sudo but have been unable to make it work. Would anyone that
> has it working with BackupPC 4.4.0 mind sending their
> /etc/BackupPC/pc/servername.example.com.pl file please?
>
> I have BackupPC 4 installed via RPM on Rocky Linux 9 in AWS on an ARM
> instance.
>
> Trying to backup many Intel and ARM based Rocky Linux 9 servers via rsync &
> ssh.
>
> - BackupPC-XS-0.62-11.el9.aarch64
> - BackupPC-4.4.0-9.el9.aarch64
> - rsync-bpc-3.1.3.0-6.el9.aarch64
>
> Here's my config for the server to be backed up.
>
> [root@backuppcserver ~]# cat remoteserver.example.com.pl
> $Conf{BackupPCNightlyPeriod} = 1;
> $Conf{ClientNameAlias} = [
> '172.30.3.159'
> ];
> $Conf{XferMethod} = 'rsync';
> $Conf{RsyncClientPath} = '/usr/bin/rsync';
> $Conf{RsyncClientCmd} = '/usr/bin/ssh -l rsyncbackuppc $host /usr/bin/sudo
> /usr/bin/rsync';
> $Conf{RsyncSshArgs} = [
> '-e', '/usr/bin/ssh -l rsyncbackuppc'
> ];
> $Conf{BackupFilesExclude} = [
> '/proc',
> '/sys',
> '/dev',
> '/tmp'
> ];
> [root@backuppcserver ~]#
>
> Here's my sudo config on the server being backed up.
>
> [root@remoteserver sudoers.d]#
> [root@remoteserver sudoers.d]# cat /etc/sudoers.d/rsyncbackuppc
> # Allow BackupPC to run rsync as root without password
> rsyncbackuppc ALL=(ALL) NOPASSWD: /usr/bin/rsync --server *
> Defaults:rsyncbackuppc !requiretty
> [root@remoteserver sudoers.d]#
> [root@remoteserver sudoers.d]#
>
> Thank you Craig for the software, and thank you list members for your
> assistance!
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/