Quick question: If put a RunAfterJob in the COPY job (Disk=>Tape), does
that get executed for EVERY copy job it creates? If so, how do create
it to run after the LAST copy job? Just create another job that runs at
a lower priority? (e.g., 99)
Steve Hammond
On 10/21/2014 2:23 PM, Josh Fisher wrote:
On 10/21/2014 1:06 PM, Steven Hammond wrote:
Thanks. I was considering using the PSEUDO JOB concept since there
is a bacula-fd on the storage server. However, I was wondering if I
need to issue a RELEASE command to the DIRECTOR before rewinding and
ejecting the tape. When everything was on one system I essentially
did a RELEASE, followed by a tape rewind and then eject.
Yes, but that should be run on the DIR machine using a console command.
RunScript {
RunsWhen = before
RunsOnClient = No
console = "release storage=Whatever"
}
A RELEASE command does not necessarily close the device though. If the
mt command blocks, then the UMOUNT command should be used instead of
RELEASE. I'm not sure what the exact criteria is for when RELEASE can
be used instead of UMOUNT.
Steve Hammond
Venus, TX
On 10/21/2014 6:45 AM, Josh Fisher wrote:
On 10/20/2014 6:53 PM, hei...@bacula.com.br wrote:
Ana and Steven,
If you have a bacula-fd installed on the storage machine you can
always use:
ClientRunBeforeJob = "mt -f /dev/st0 eject"
Unless it has changed, a Type=Admin job cannot execute scripts on
the client machine. To run a script on a client as a "psuedo" admin
job, define a second Type=Backup job for the SD that selects no
files to backup and add the ClientRunAfterJob script to that job,
scheduling/prioritizing the "psuedo" admin job to be the last job to
run.
I also suggest redirecting stdXXX for the mt command and running it
in the background.
RunScript {
RunsWhen = After
RunsOnClient = Yes
Command = "/usr/local/bin/bacula-eject.sh"
}
#!/bin/bash
# /usr/local/bin/my-eject.sh on the SD machine
mt -f /dev/st0 eject >/var/log/bacula/eject.log 2>&1 < /dev/null &
# eof
------------------------------------------------------------------------
*De: *"Ana Emília M. Arruda" <emiliaarr...@gmail.com>
*Para: *"Steven Hammond" <bcf1...@gmail.com>
*Cc: *"Bacula-users@lists.sourceforge.net"
<bacula-users@lists.sourceforge.net>
*Enviadas: *Segunda-feira, 20 de outubro de 2014 20:11:01
*Assunto: *Re: [Bacula-users] Help with Tape Eject
Hi Steven,
Maybe this could help you:
RunAfterJob = "ssh user@yourstoragedaemonhost mt -f /dev/st0 eject"
It´s defined on the last backup job.
Regards,
Ana
On Mon, Oct 20, 2014 at 2:58 PM, Steven Hammond <bcf1...@gmail.com
<mailto:bcf1...@gmail.com>> wrote:
I had a script that ran after the last job that would release,
rewind,
and eject the tape. It worked great. However, I've rebuilt
the server
and now have the STORAGE DAEMON and DIRECTOR on two separate
servers.
Any ideas how can now eject the tape on the storage server
after the
last job runs on the director?
Steve Hammond
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users