Bacula-users

Re: [Bacula-users] Automatic Eject tape once job finishes

2010-05-15 08:08:49
Subject: Re: [Bacula-users] Automatic Eject tape once job finishes
From: "James Harper" <james.harper AT bendigoit.com DOT au>
To: "Koldo Santisteban" <ksantisteban AT gmail DOT com>, <bacula-users AT lists.sourceforge DOT net>
Date: Sat, 15 May 2010 22:06:34 +1000
> 
> Try using "RunAfterJob" option on the Job definition with a command
like "mt -
> f /dev/st0 eject" (using you scsi device path of course)
> 

I don't think there is a StorageRunAfterJob, so your suggestion would
run it on the director which only works if the sd and the director are
the same machine.

I suggest something like:

. Create an account on the sd with a minimum of privileges
. Set up ssh public key authentication so that the account the director
is running as can ssh to the new account on the sd
. Configure the RunAfterJob to ssh to the sd and run the required
command (eg the mt -f /dev/st0 command)

You will either need to make the new account on the sd a member of the
group that owns the tape device, or use sudo. Sudo might be better as it
would restrict the account to only ejecting. Your eject script may need
to issue bconsole commands to do the right things with the tape library
too if required.

James


------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users