BackupPC-users

Re: [BackupPC-users] Backing up localhost nfs share with rsync

2011-07-21 11:30:11
Subject: Re: [BackupPC-users] Backing up localhost nfs share with rsync
From: Ghislain <gadnet AT aqueos DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 21 Jul 2011 17:26:30 +0200
Le 21/07/2011 16:46, Holger Parplies a écrit :
Hi,

Ghislain wrote on 2011-07-21 13:38:22 +0200 [[BackupPC-users] Backing up localhost nfs share with rsync]:
[...]
----------------------------------------backupserver.mydomain.com.pl--------------------------------------------
# include default config
do '/etc/backuppc/config.pl';
unrelated to your problem, but this is pointless. The global config is
included anyway. You can use 'do ...' to include a config for a group of hosts
(e.g. "do '/etc/backuppc/all_my_servers.pl';"), but for the global config this
is meaningless.
 
oh yes will remove that thanks. Should not change anything but is pointless if the config is allways added so better keep clean :)
 

#
# Path to rsync executable on the client
#
$Conf{RsyncClientPath} = '/usr/bin/sudo -n /usr/bin/rsync';
This is wrong, as you see in the error message. The RsyncClientPath is
/usr/bin/rsync. The sudo comes into the game in RsyncClientCmd.
As a side note, the '-n' option to sudo is sort of pointless. You need to
configure sudo correctly. '-n' just makes it fail in a perhaps more obvious
way. Adding the '-n' is sort of saying "I'm expressly preparing for this to be
wrong". Use it for debugging, but then remove it (well, my opinion).
 
  Moving sudo on the command instead of the path seems to make it as the backup is running fine right now (willl have to wait for the end to be sure but at least it des not fail 10 seconds after i launch it). Thanks for pointing this.


  For the -n it just specify to sudo that nothing should need interaction and provide a corresponding message. I do not think it is in any case a problem to let it like this. For me it is just to say " i am not expecting any interaction but if you need one then warn me about this explicitly without trying to ask me for a password" ;-)
 
I thnik this way sudo fail more nicely to backuppc than with the timeout of the prompt when it fail, even if it should not but Your Milage May Vary.
 
 

[...]
# rsync client commands
$Conf{RsyncClientCmd}           = '$rsyncPath $argList+';
$Conf{RsyncClientCmd} = '/usr/bin/sudo $rsyncPath $argList';

Note that I removed the '+'. sudo does *not* add an additional shell level, so
you don't want extra quoting.

$Conf{RsyncClientRestoreCmd}    = '$rsyncPath $argList+';
Same here. Add 'sudo', remove '+'.

 
ok i just left it from the exemple i do not even know what this does :)
surely it was from the ssh part.



  have the error  "/Fatal error (bad version): Exec failed for 
/usr/bin/sudo -n /usr/bin/rsync/..." :
[...]
full backup started for directory / (baseline backup #8)
started full dump, share=/
Running: /usr/bin/sudo\ -n\ /usr/bin/rsync --server --sender 
--numeric-ids --perms --owner --group -D --links --hard-links --times 
--recursive --checksum-seed=32761 --protocol=28 --ignore-times . /
You likely don't have a command 'sudo -n /usr/bin/rsync' in /usr/bin, or
rather, you probably don't have a directory 'sudo -n ' in /usr/bin, which
in turn contains 'rsync' within subdirectories 'usr/bin'.

The incorrect escaping is due to the fact that you specified RsyncClientPath
incorrectly above.

Apart from that, everything looks good.

Hope that helps.

yes it helped a lot , thanks for your help on this !

-- 

Cordialement,
Ghislain
------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
<Prev in Thread] Current Thread [Next in Thread>