[Bacula-users] "ClientRunBeforeJob" - spaces in pathnames on Windows. ARGH...Help (again/more)?
2009-10-29 10:48:11
ebollengier wrote:
Sean M Clark wrote:
[...]
The problem is, I could never manage to get "ClientRunBeforeJob" to
correctly pass the full pathname with spaces in it, despite trying every
combination of single-quotes, double-quotes, escaped spaces (i.e.
"C:\\Program\ Files\\" or for that matter "C:/Program\ Files") that I
could think of. I was able to get it to work using the old-school
mangled DOS filenames ("C:\Progra~1\Symant~1\Smc.exe"). However, these
clients appear to have been moved to new "Vista 64" boxes, and bacula-fd
is complaining that these paths don't exist anymore.
Rather than muddling around with guessing the mangling of THIS set of
directories (or watching backups run at ~200kB/s for days...), can
anyone give me some hints about how to properly pass pathnames with
spaces to the Windows bacula-fd in ClientRun(Before|After)Job directives?
Perhaps you can start reading the manual section about RunScript on windows,
it gives advices and example on how to handle spaces, accent and other funny
things on Micro$oft environment.
http://www.bacula.org/3.0.x-manuals/en/install/install/Configuring_Director.html#SECTION00630000000000000000
Bye
Now that I've finally had time to revisit this...
I would have sworn that the syntax used in that page of the manual was
the first thing I tried. Sure enough, testing that syntax last night
demonstrates the original problem again:
28-Oct 22:40 client-fd JobId 20824: shell command: run
ClientRunBeforeJob ""C:/Program Files/Symantec/Symantec Endpoint
Protection/Smc.exe -stop -p InsertSecretPasswordHere""
28-Oct 22:40 client-fd JobId 20824: ClientRunBeforeJob: 'C:/Program'
is not recognized as an internal or external command,
28-Oct 22:40 client-fd JobId 20824: ClientRunBeforeJob: operable
program or batch file.
28-Oct 22:40 client-fd JobId 20824: Error: Runscript:
ClientRunBeforeJob returned non-zero status=1. ERR=Unknown error
28-Oct 22:38 bacula-dir JobId 20824: Fatal error: Bad response to
ClientRunBeforeJob command: wanted 2000 OK RunBefore
, got 2905 Bad RunBeforeJob command.
28-Oct 22:38 bacula-dir JobId 20824: Fatal error: Client "client-fd"
RunScript failed.
I thought I had correctly imitated the
exampled from the bacula documentation - the entries in the job
resource look like this:
ClientRunBeforeJob = "\"C:/Program Files/Symantec/Symantec
Endpoint Protection/Smc.exe -stop -p InsertSecretPasswordHere\""
ClientRunAfterJob = "\"C:/Program Files/Symantec/Symantec
Endpoint Protection/Smc.exe -start\""
Which APPEARS (to me) to match the syntax specified in the
documentation example:
"[...]
So if you have a script in the Bacula
bin directory then the following lines should work fine:
Client Run Before Job = systemstate
[...]
or
ClientRunBeforeJob = "\"C:/Program
Files/Bacula/systemstate.bat\""
"
I seem to recall that last time I tried every variation of escaping
spaces, quotes, and inserting escaped \'s (i.e. "\"C:/Program\\
Files[...]\"") and so on that I could think of, but nothing seemed to
work - though at this point I admit I can't say for sure exactly what I
tested.
Is this is bug/misfeature in bacula-fd.exe, or an error in the
documentation, or is Steve Ballmer conspiring against me, or am I just
missing something stupid? (Or is this not an "or" situation?...)
|
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference _______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
|
|