Bacula-users

Re: [Bacula-users] Include Dir Containing?

2011-02-22 07:48:32
Subject: Re: [Bacula-users] Include Dir Containing?
From: Marc Schiffbauer <marc AT schiffbauer DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 22 Feb 2011 13:45:12 +0100
* Christian Manal schrieb am 22.02.11 um 12:43 Uhr:
> Am 22.02.2011 12:26, schrieb Phil Stracchino:
> > On 02/22/11 06:07, Christian Manal wrote:
> >> That's right, but not what I need. I want to include the directory
> >> containing the specific file, not the file itself like it is shown in
> >> the examples.
> >>
> >> To give an example: By default, nothing under
> >>
> >>    /export/home
> >>
> >> will be backed up. Now a user "foo" creates a file ".backmeup" in his
> >> home directory or a subdirectory of it. For example
> >>
> >>    /export/home/foo/important/.backmeup
> >>
> >> The next backup should then include the directory
> >>
> >>    /export/home/foo/important
> > 
> > There is not, to my knowledge, any built-in functionality to do this at
> > this time.  You'd have to use a script to generate the fileset on demand.
> > 
> 
> I feared as much. Thanks for the replies anyway.

Christian,

before bacula had the "Exclude Dir Containing" feature I used
something very similra to you example like that:

File = "\\|sh -c 'for D in /home; do find $D -xdev -name .BACULA_NO_BACKUP \
        -type f -printf \"%h\\n\"; done | tee /root/bacula_excluded_dirs.log'"

That worked very well over years.

So I think something like that for include should work well for you.

File = "\\|sh -c 'for D in /home; do find $D -xdev -name .BACULA_BACKUP \
        -type f -printf \"%h\\n\"; done | tee /root/bacula_included_dirs.log'"


-Marc
-- 
8AAC 5F46 83B4 DB70 8317  3723 296C 6CCA 35A6 4134

------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users