Bacula-users

Re: [Bacula-users] using script output in fileset

2011-12-02 07:49:10
Subject: Re: [Bacula-users] using script output in fileset
From: Konstantin Khomoutov <flatworm AT users.sourceforge DOT net>
To: Silver Salonen <silver AT serverock DOT ee>
Date: Fri, 2 Dec 2011 16:47:38 +0400
On Fri, 02 Dec 2011 13:57:42 +0200
Silver Salonen <silver AT serverock DOT ee> wrote:

> I'm trying to get my job backing up only files that would match smth 
> like "*`date +%y%m%d`*".
> 
> It should be quite easy, but it seems to not work.
> 
> I created a script /usr/local/etc/bacula/fileset.sh which would echo 
> wildcards along with today's date:
> echo "$1/*`date +%y%m%d`*"
> 
> So "/usr/local/etc/bacula/fileset.sh /path/to/backup" gives me:
> /path/to/backup/*111202*
> 
> The fileset:
> 
> Include {
>    Options {
>      Wild = "|/usr/local/etc/bacula/fileset.sh /path/to/backup"
>    }
>    Options {
>      Exclude = yes
>      RegexFile = ".*"
>    }
>    File = "/path/to/backup"
> }
> 
> But "estimate jobid=... listing" gives only "/path/to/backup" as the 
> only thing to be backed up.
> 
> However, I get the right files when I set: Wild =
> "/path/to/backup/*111202*"
> 
> What am I doing wrong? Why does that not work with executing the
> script?
>>From the manual regarding the Bacula Director, it does not follow that
you can use "| ..." notation with Wild--you can only do this with File,
it seems.
So I'd go another route and make your script output everything that
matched your pattern in a way Bacula expects "| ..." to work, and then
just use that with File.
The script should be something like this:
#!/bin/sh
ls -1 "$1/*`date +%y%m%d`*"

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>