----- Original Message ----
From: Arno Lehmann <al@...>
Sent: Tuesday, August 26, 2008 9:02:32 PM
Subject: Re: [Bacula-users] Defining a job to backup files "unknown" at fire time
26.08.2008 11:07, Bill Damage wrote:
> The setup is a remote host creating backups via an sh script running on
> that machine. These are then ftp'd to a local one. I've just set up
> bacula on the local machine and want it to then store these files to tape.
> The script creating these backups is an ideal candidate for RunScript
> but what I can't figure out is how to pass the new path & filename to
> the jobdef because its created each time by the script. The path looks
> with each directory & filename being created accordingly. This is a
> simple example, I realise I could just do incrementals from the tree
> downwards but there are more cases when the new path truly is unknown.
> We get away with this because the remote script executes then returns
> the newly created path and file separated by a space, thats how the
> local one can then do the ncftpget to retrieve it.
> Current sequence:
> Local machine executes ssh remotely to create zip
> Remote machine returns "path filename"
> Local machine does ncftpget on "path filename"
> As above but then local machine uses bacula to store "path filename"
I'm not sure I completely understand what you have and want, but read
Given: A script fetches files from somewhere and puts them somewhere
on the local system.
Needed: A backup job that saves just these files.
Let your script write the list of files it fetched to a text file. Use
that text file as an include file in the fileset resource in Bacula.
See the manual:
"Any name beginning with a vertical bar (|) is assumed to be the name
of a program. This program will be executed on the Director's machine
at the time the Job starts (not when the Director reads the
configuration file), and any output from that program will be assumed
to be a list of files or directories, one per line, to be included."
So, a file set definition that contains
"|/usr/bin/sort -u /etc/autobackups/bacula.list" will read the given
file list and back up those files.
If you dynamically manage that list - i.e., a full backup could
truncate that file by a "run after job" script and your fetching
script appends to it - you should have a good starting point to solve
Perfect! Thanks very much