BackupPC-users

Re: [BackupPC-users] How do I configure DumpPreUserCmd to have multiple commands

2011-08-08 21:22:24
Subject: Re: [BackupPC-users] How do I configure DumpPreUserCmd to have multiple commands
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: Holger Parplies <wbppc AT parplies DOT de>
Date: Mon, 08 Aug 2011 21:19:11 -0400
Holger Parplies wrote at about 02:58:57 +0200 on Tuesday, August 9, 2011:
 > Hi,
 > 
 > Jeffrey J. Kosowsky wrote on 2011-08-05 12:08:47 -0400 [Re: [BackupPC-users] 
 > How do I configure DumpPreUserCmd to have?multiple?commands]:
 > > You are exactly right that 'bash -c "blah blah blah"' fails since the
 > > quote mechanism doesn't work without a shell. It's too bad that there
 > > isn't an option that allows a "bash -c" like construction to interpret
 > > everything that follows (up to perhaps a delimitter) to be interpreted
 > > as part of the command line (though white space would need to be escaped).
 > 
 > If you're really desperate, there is a way, though I'm *not* going to suggest
 > $sshPath -q -x localhost ... that would be a really ugly hack :).
 > 

Don't tempt me... LOL...

Remember, I'm the guy that uses the following DumpPreUserCmd to
avoid having to keep a cleartext version of RsyncdPasswd in my
BackupPC config file... (and thanks to you again for helping me figure
out how to get it finally working)...
                 $Conf{DumpPreUserCmd} = ["&{sub { 
chomp(\$bpc->{Conf}{RsyncdPasswd} = `$Conf{SshPath} -q -x -l 
$Conf{RsyncdUserName} \$args[0]->{hostIP} /usr/local/bin/shadowmountrsync 
$shadowmountparams`); return(\$? . '\n'); }}"];

Then again my config.pl files have lots of perl code that takes
advantage of the "undocumented"/"unrecommended" fact that the file is
executable perl...

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
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/