Bruno Friedmann <friedmann.bruno <at> gmail.com> writes:

> 
> I've a doubt and don't find what's wrong inside my definition
> 
> In jobs I've those instruction
> 
>  # Create a lvm dump of configuration
>   RunScript {
>     RunsWhen = Before
>     RunsOnClient = Yes
>     FailJobOnError = No
>     Command = "/sbin/lvmdump -m"
>   }
> 
>   # Remove the configuration dump
>   RunScript {
>     RunsWhen = After
>     RunsOnClient = Yes
>     FailJobOnError = No
>     Command = "/usr/bin/rm -f /root/lvmdump-*.tgz"
>   }
> 

> 
> But unfortunately, the *.tgz are still there after.
> 
> Can a fresh pair of eyes point me what's I've done wrong ?
You fell into the known pitfall that every external program run
by Bacula and Bareos is done using execvp() so your shell expansion
will never happen as execvp() willo just execute the rm command
with as arguments -f /root/lvmdump-*.tgz

So you have two options:

- wrap things in a shell script and run that.
- Use the following construct: sh -c '/usr/bin/rm -f /root/lvmdump-*.tgz'

-- 
Marco van Wieringen                   [email protected]
Bareos GmbH & Co. KG                  Phone: +49-221-63069389
http://www.bareos.com                     

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens,
                 P. Storz, M. v. Wieringen

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to