Bacula-users

Re: [Bacula-users] Defining a job to backup files "unknown" at fire time

2008-08-28 04:31:33
Subject: Re: [Bacula-users] Defining a job to backup files "unknown" at fire time
From: Bill Damage <bill.damage AT yahoo DOT com>
To: Arno Lehmann <al AT its-lehmann DOT de>, bacula-users AT lists.sourceforge DOT net
Date: Thu, 28 Aug 2008 01:31:20 -0700 (PDT)
----- Original Message ----
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Sent: Tuesday, August 26, 2008 9:02:32 PM
Subject: Re: [Bacula-users] Defining a job to backup files "unknown" at fire time

Hi,

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
> like
> /data/Vol2/Daily/example.com/2008/08/26/Daily-SQLDump-2008-06-26.zip,
> 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"
>
> Requirement:
> 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
on...

Given: A script fetches files from somewhere and puts them somewhere
on the local system.
Needed: A backup job that saves just these files.

Solution:
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:
In
http://www.bacula.org/en/dev-manual/Configuring_Director.html#SECTION001470000000000000000
"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
your problem.

Arno

Perfect! Thanks very much


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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>
  • Re: [Bacula-users] Defining a job to backup files "unknown" at fire time, Bill Damage <=