Re: [BackupPC-users] backup localhost: Permission denied

2022-02-06 Thread thveillon

Le 06/02/2022 à 18:54, corona_24 a écrit :

Hi,

I have still v3.3.2 on an ubuntu 20.04 LTS server.

I tried

backuppc  ALL=(ALL:ALL) NOPASSWD: /usr/bin/rsync --server --sender *

but same error.

Your other config settings seem not to be available at v3.3.2, like:

$Conf{RsyncSshArgs}
$Conf{RsyncBackupPCPath}

Anyway, I solved it.

I am using these settings now:

$Conf{RsyncClientCmd} = '$rsyncPath $argList+';
$Conf{RsyncClientPath} = '/usr/bin/rsync';

and for visudo:

backuppc  ALL= NOPASSWD: /usr/bin/rsync

Thanks all for supporting!



Am 06.02.2022 um 15:20 schrieb thveillon:


Le 05/02/2022 à 14:36, corona_24 a écrit :

Hello,

I try to backup my local host.
I made these settings:

$Conf{RsyncClientCmd} = ' /usr/bin/sudo $rsyncPath $argList+';

and allow backuppc user to run rsync with sudo without password
(visudo):

backuppc ALL=NOPASSWD :/usr/bin/rsync

Anyway, I got the following errors:

incr backup started back to 2022-01-29 01:00:01 (backup #677) for
directory /etc/
Running: /usr/bin/rsync --server --sender --numeric-ids --perms
--owner --group -D --links --hard-links --times --block-size=2048
--recursive . /etc/
Xfer PIDs are now 21378
Got remote protocol 31
Negotiated protocol version 28
Remote[1]: rsync: opendir "/etc/polkit-1/localauthority" failed:
Permission denied (13)
Remote[1]: rsync: opendir "/etc/multipath" failed: Permission denied
(13)
...(list is actually longer)

It seems, everything what can only accessed by root, failed by backup:
drwx--   7 root root  4096 Dez  4  2016 localauthority/

Which settings are missing?




___
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/


Hello,

I will assume we are talking about BackupPC 4.x . For my localhost I
have this in the host config:

$Conf{RsyncSshArgs} = [
  '-e',
  '/usr/bin/sudo -p'
];

On the server config:

$Conf{RsyncClientPath} = 'sudo /usr/bin/rsync';

$Conf{RsyncBackupPCPath} = '/usr/libexec/backuppc-rsync/rsync_bpc';

In "sudoers", depending on your sudo version you may need to either
specify the exact full command (get it from the error message), or use
a wildcard:

backuppc  ALL=(ALL:ALL) NOPASSWD: /usr/bin/rsync --server --sender *


This is "certified to work" for me at least (on Debian).

Hope it helps.


___
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/




___
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/


Ok, for the record my example config is for BPC 4. Good you could fix 
your setup.



___
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/


Re: [BackupPC-users] backup localhost: Permission denied

2022-02-06 Thread corona_24

Hi,

I have still v3.3.2 on an ubuntu 20.04 LTS server.

I tried

backuppc  ALL=(ALL:ALL) NOPASSWD: /usr/bin/rsync --server --sender *

but same error.

Your other config settings seem not to be available at v3.3.2, like:

$Conf{RsyncSshArgs}
$Conf{RsyncBackupPCPath}

Anyway, I solved it.

I am using these settings now:

$Conf{RsyncClientCmd} = '$rsyncPath $argList+';
$Conf{RsyncClientPath} = '/usr/bin/rsync';

and for visudo:

backuppc  ALL= NOPASSWD: /usr/bin/rsync

Thanks all for supporting!



Am 06.02.2022 um 15:20 schrieb thveillon:


Le 05/02/2022 à 14:36, corona_24 a écrit :

Hello,

I try to backup my local host.
I made these settings:

$Conf{RsyncClientCmd} = ' /usr/bin/sudo $rsyncPath $argList+';

and allow backuppc user to run rsync with sudo without password
(visudo):

backuppc ALL=NOPASSWD :/usr/bin/rsync

Anyway, I got the following errors:

incr backup started back to 2022-01-29 01:00:01 (backup #677) for
directory /etc/
Running: /usr/bin/rsync --server --sender --numeric-ids --perms
--owner --group -D --links --hard-links --times --block-size=2048
--recursive . /etc/
Xfer PIDs are now 21378
Got remote protocol 31
Negotiated protocol version 28
Remote[1]: rsync: opendir "/etc/polkit-1/localauthority" failed:
Permission denied (13)
Remote[1]: rsync: opendir "/etc/multipath" failed: Permission denied
(13)
...(list is actually longer)

It seems, everything what can only accessed by root, failed by backup:
drwx--   7 root root  4096 Dez  4  2016 localauthority/

Which settings are missing?




___
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/


Hello,

I will assume we are talking about BackupPC 4.x . For my localhost I
have this in the host config:

$Conf{RsyncSshArgs} = [
  '-e',
  '/usr/bin/sudo -p'
];

On the server config:

$Conf{RsyncClientPath} = 'sudo /usr/bin/rsync';

$Conf{RsyncBackupPCPath} = '/usr/libexec/backuppc-rsync/rsync_bpc';

In "sudoers", depending on your sudo version you may need to either
specify the exact full command (get it from the error message), or use
a wildcard:

backuppc  ALL=(ALL:ALL) NOPASSWD: /usr/bin/rsync --server --sender *


This is "certified to work" for me at least (on Debian).

Hope it helps.


___
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/




___
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/


Re: [BackupPC-users] backup localhost: Permission denied

2022-02-06 Thread thveillon


Le 05/02/2022 à 14:36, corona_24 a écrit :

Hello,

I try to backup my local host.
I made these settings:

$Conf{RsyncClientCmd} = ' /usr/bin/sudo $rsyncPath $argList+';

and allow backuppc user to run rsync with sudo without password
(visudo):

backuppc ALL=NOPASSWD :/usr/bin/rsync

Anyway, I got the following errors:

incr backup started back to 2022-01-29 01:00:01 (backup #677) for 
directory /etc/
Running: /usr/bin/rsync --server --sender --numeric-ids --perms --owner 
--group -D --links --hard-links --times --block-size=2048 --recursive . 
/etc/

Xfer PIDs are now 21378
Got remote protocol 31
Negotiated protocol version 28
Remote[1]: rsync: opendir "/etc/polkit-1/localauthority" failed: 
Permission denied (13)

Remote[1]: rsync: opendir "/etc/multipath" failed: Permission denied (13)
...(list is actually longer)

It seems, everything what can only accessed by root, failed by backup:
drwx--   7 root root  4096 Dez  4  2016 localauthority/

Which settings are missing?




___
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/


Hello,

I will assume we are talking about BackupPC 4.x . For my localhost I 
have this in the host config:


$Conf{RsyncSshArgs} = [
  '-e',
  '/usr/bin/sudo -p'
];

On the server config:

$Conf{RsyncClientPath} = 'sudo /usr/bin/rsync';

$Conf{RsyncBackupPCPath} = '/usr/libexec/backuppc-rsync/rsync_bpc';

In "sudoers", depending on your sudo version you may need to either 
specify the exact full command (get it from the error message), or use a 
wildcard:


backuppc  ALL=(ALL:ALL) NOPASSWD: /usr/bin/rsync --server --sender *


This is "certified to work" for me at least (on Debian).

Hope it helps.


___
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/


Re: [BackupPC-users] backup localhost: Permission denied

2022-02-06 Thread corona_24

Thanks Falko!
I tried your suggestion:

$Conf{RsyncClientPath} = '/usr/bin/sudo /usr/bin/rsync';
and
$Conf{RsyncClientCmd} = ' $rsyncPath $argList+';

but now the backup aborted:

full backup started for directory /etc/ (baseline backup #685)
Running: /usr/bin/sudo\ /usr/bin/rsync --server --sender --numeric-ids --perms 
--owner --group -D --links --hard-links --times --block-size=2048 --recursive 
--ignore-times . /etc/
Xfer PIDs are now 72477
Got remote protocol 1667594309
Fatal error (bad version): Exec failed for /usr/bin/sudo /usr/bin/rsync 
--server --sender --numeric-ids --perms --owner --group -D --links --hard-links 
--times --block-size=2048 --recursive --ignore-times . /etc/

Read EOF: Connection reset by peer
Tried again: got 0 bytes
fileListReceive() failed
Done: 0 files, 0 bytes
Got fatal error during xfer (fileListReceive failed)
Backup aborted (fileListReceive failed)
Not saving this as a partial backup since it has fewer files than the prior one 
(got 0 and 0 files versus 0)

So I checked:

su backuppc /usr/bin/sudo /usr/bin/rsync

and it is asking me for a password.

There a two points unclear to me:
1. shouldn't it be avoided by:

backuppc ALL=NOPASSWD :/usr/bin/rsync

2. I don't remember setting any password for user backuppc, at all.
Only for the web interface, which is different.

Or is something totally different wrong?


Am 05.02.2022 um 19:47 schrieb Falko Trojahn:

Hi,


I try to backup my local host.
I made these settings:

$Conf{RsyncClientCmd} = ' /usr/bin/sudo $rsyncPath $argList+';



Using:

$Conf{RsyncClientPath} = '/usr/bin/sudo /usr/bin/rsync';

works for me


Which settings are missing?



F.

___
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/


Re: [BackupPC-users] backup localhost: Permission denied

2022-02-05 Thread Falko Trojahn via BackupPC-users

Hi,


I try to backup my local host.
I made these settings:

$Conf{RsyncClientCmd} = ' /usr/bin/sudo $rsyncPath $argList+';



Using:

$Conf{RsyncClientPath} = '/usr/bin/sudo /usr/bin/rsync';

works for me


Which settings are missing?



F.



___
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/