Bacula-users

Re: [Bacula-users] How to properly escape Linux shell commands for ClientRunBeforeJob?

2009-02-16 06:09:06
Subject: Re: [Bacula-users] How to properly escape Linux shell commands for ClientRunBeforeJob?
From: "Mike Holden" <bacula AT mikeholden DOT org>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 16 Feb 2009 11:06:07 -0000 (UTC)
Ralf Brinkmann wrote:
> Foo schrieb:
>
>> So I added in the job definition of the machine:
>>
>> ClientRunBeforeJob = "svnadmin --quiet dump /var/svnrepo
>>> /tmp/svnrepo_backup.svn_dump; gzip -9 /tmp/svnrepo_backup.svn_dump"
>> ClientRunAfterJob = "rm -f /tmp/svnrepo_backup.svn_dump.gz"
>>
>> This fails with:
>>
>>   ClientRunBeforeJob: svnadmin: invalid option character: 9
>>   ClientRunBeforeJob: Type 'svnadmin help' for usage.
>>   Error: Runscript: ClientRunBeforeJob returned non-zero status=1.
>> ERR=Child exited with code 1
>
> (Client)RunBefore/AfterJob:
> sticking commands one after another on one line separated by semicolon
> seems not to work propperly.

Probably better therefore to write your own shell script to do everything
you want, save it somewhere like /usr/local/bin, and then call the script
from bacula.
-- 
Mike Holden

http://www.by-ang.com - the place to shop for all manner of hand crafted
items, including Jewellery, Greetings Cards and Gifts




------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users