I submitted this script on the Bacula users mail list but it is probably better
to list here in devel.
Some of us need a way to "fire off" a bunch of bacula jobs from a script,
invoked at the command line. This is a special case asynchronous mode to start
backup up operations. In my case the back up operations are directed to tape.
I am just now looking into a method to batch one or more backup operations. The
script below works without the loop. With the loop, the scripts fails with a
"syntax error: unexpected end of file" error. If one of 'you' fine bash script
programmers can overcome this and report your solution, we should all have a way
to add batching operations our Bacula platforms.
# This script will loop though a list of bacula tape jobs
# and 'batch' or submit backup operations using
# the bconsole client.
# Date: 06/29/2006
# rleche at srcc.lsu.edu
for job-number in " 1 2 4 6 7 8 9 10 "
/etc/bacula/bconsole -c /etc/bacula/bconsole.conf <<END_OF_DATA