> To unmount and eject the tape you need to use the "Run After Job" > Director attribute. > > Check out > http://www.bacula.org/en/dev-manual/main/main/Configuring_Director.html# 7123 > > There is an example on this Server Fault page: > http://serverfault.com/questions/7242/bacula-tape-changing > > I'm not sure how you could run a job/mount operation when a tape is > inserted. To do this you would probably want to run a cronjob to see if > there has been a tape status change (i.e. mt -f /dev/nst0 status returns > something rather than nothing) and then trigger the job through shell > scripting bconsole. >
I find that it is sufficient just to do a mount after the eject operation, eg: " #!/bin/sh TAPEDEV=/dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:6:0-nst-nst BCONSOLE=/usr/bin/bconsole SDNAME=bitvs2 echo "unmount storage=bitvs2-tape-sd" | $BCONSOLE -n -c /etc/bacula/bconsole.conf >/dev/null 2>/dev/null ssh $SDNAME "/bin/mt -f $TAPEDEV eject 2>/dev/null >/dev/null" echo "mount storage=bitvs2-tape-sd" | $BCONSOLE -n -c /etc/bacula/bconsole.conf >/dev/null 2>/dev/null " even though there is no media, bacula still takes control of the tape drive again on mount and just uses whatever media is in there when the next job starts. My SD and DIR are different machines, hence the requirement to use ssh rather than just use mt directly. James ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users