Hi,
let me describe our use case a little more detailed:
Our systems provide something we call "job notification"; imagine some kind of
popup window that displays what the system is currently doing. "Our systems"
can mean bacula servers (dir/sd combination) as well as bacula clients (fd) --
and obviously a combination of both. Additionally, the servers support non-
Collax clients (Windows, standard linux, ...).
When a job is initiated, such a job notification is initiated through a
RunScript {
command = foo
...
}
section in the respective jobs. This notification is issued both on the client
as well as on the server, if both support it, i.e., the client is a Collax
system; otherwise, the runscript is executed only on the server.
To distiguish between these two cases (client supports the respective
RunScript vs. client does not support it), we need two different restore job
specifications.
I am attaching a sample of the respective job definitions in our
bacula-dir.conf
Am Montag, 3. Dezember 2012, 15:44:46 schrieb Kern Sibbald:
> I may be missing something here, but I think almost everything one
> needs is already in Bacula for restores. The "restore" command is fully
> command
> line driven, and it is primarily based on the Client rather than a Job (they
> amount to the same thing).
Well, the job name of the restore job is not part of that command line ...
> Since at restore time, one is pretty much obligated to give all the details
> of what you want to restore, starting with the Client name, I don't see
> any real need to have multiple Restore jobs, other than possibly using
> them as "templates" to reduce the amount typed by specifying defaults.
Again: The (only) difference between the (exactly two, at the moment) restore
jobs is the set of RunScripts they contain.
> If one is scripting restores, I personally *much* prefer to specify
> everything
> rather than rely on defaults
>
> Can you clearly explain what is missing in the current implementation?
> Start by thinking about restoring Clients rather than Jobs.
>
> It isn't a really big patch, so that is not the issue, but I am a bit
> worried that
> users may not realize that the job specified is a restore job rather than a
> backup job and all the ramifications of that.
The patch takes care that no backup (or other non-restore) jobs are used for
restore statements.
Thx & best regards
Bastian
--
Collax GmbH . Basler Str. 115a . 79115 Freiburg . Germany
p: +49 (0) 89-990 157-28 www.collax.com
Geschäftsführer: Falk Birkner, Ralf Elias
AG München HRB 173695. Ust.-IdNr: DE270819312
\ "He who is in love with himself has at least this advantage -- he
\ won't encounter many rivals."
\ Georg Lichtenberg, "Aphorisms"
Job {
Name = "RestoreFiles"
Type = Restore
Client=dev-fd
FileSet = "Full Set"
Pool = Default
Messages = Standard
Where = /data/bacula-restores
RunScript {
Command = "/usr/lib/akconfig/bin/bacula-job-notify.pl --action \"update\"
--c \"%c\" --d \"%d\" --e \"%e\" --i \"%i\" --l \"%l\" --t \"Restore\" --P
\"%P\" --f \"%f\" --D \"%D\""
Runs When = Before
Runs On Client = No
Runs On Failure = Yes
}
RunScript {
Command = "/usr/lib/akconfig/bin/bacula-job-notify.pl --action \"done\" --c
\"%c\" --d \"%d\" --e \"%e\" --i \"%i\" --l \"%l\" --t \"Restore\" --P \"%P\"
--f \"%f\" --D \"%D\""
Runs When = After
Runs On Client = No
Runs On Failure = Yes
}
}
Job {
Name = "RestoreFiles_ClientNotify"
Type = Restore
Client=dev-fd
FileSet = "Full Set"
Pool = Default
Messages = Standard
Where = /data/bacula-restores
RunScript {
Command = "/usr/lib/akconfig/bin/bacula-job-notify.pl --action \"update\"
--c \"%c\" --d \"%d\" --e \"%e\" --i \"%i\" --l \"%l\" --t \"Restore\" --P
\"%P\" --f \"%f\" --D \"%D\""
Runs When = Before
Runs On Client = No
Runs On Failure = Yes
}
RunScript {
Command = "/usr/lib/akconfig/bin/bacula-job-notify.pl --action \"done\" --c
\"%c\" --d \"%d\" --e \"%e\" --i \"%i\" --l \"%l\" --t \"Restore\" --P \"%P\"
--f \"%f\" --D \"%D\""
Runs When = After
Runs On Client = No
Runs On Failure = Yes
}
RunScript {
Command = "/usr/lib/akconfig/bin/bacula-job-notify.pl --action \"update\"
--c \"%c\" --d \"%d\" --e \"%e\" --i \"%i\" --l \"%l\" --t \"Restore\" --P
\"%P\" --f \"%f\" --D \"%D\""
Runs When = Before
Runs On Client = Yes
Runs On Failure = Yes
}
RunScript {
Command = "/usr/lib/akconfig/bin/bacula-job-notify.pl --action \"done\" --c
\"%c\" --d \"%d\" --e \"%e\" --i \"%i\" --l \"%l\" --t \"Restore\" --P \"%P\"
--f \"%f\" --D \"%D\""
Runs When = After
Runs On Client = Yes
Runs On Failure = Yes
}
}
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel:
BUILD Helping you discover the best ways to construct your parallel projects.
http://goparallel.sourceforge.net
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel