Bacula-users

Re: [Bacula-users] tape problems

2008-10-20 05:50:37
Subject: Re: [Bacula-users] tape problems
From: Adrian Moisey <adrian AT careerjunction.co DOT za>
To: Tilman Schmidt <t.schmidt AT phoenixsoftware DOT de>
Date: Mon, 20 Oct 2008 11:45:50 +0200
Hi

> My way around that is adding the directive:
> 
>   RunAfterJob  = "/usr/local/bin/bacula-eject"
> 
> to the (last) backup job, where /usr/local/bin/bacula-eject is the
> script:

I would like to do that, but during the week I backup to disk.
Can I get this to run only if there is a tape job that ran?

> --------8<--------8<--------8<--------8<--------8<--------8<--------
> #!/bin/sh
> 
> # eject the tape from a standalone tape drive controlled by Bacula
> 
> PATH=/bin:/usr/bin ; export PATH
> 
> TAPENAME="LTO1"
> TAPEDEV="/dev/nst0"
> 
> BCONSOLE="/usr/sbin/bconsole -c /etc/bacula/bconsole.conf"
> MT="/usr/bin/mt"
> 
> # tell Bacula to release the drive
> echo "unmount ${TAPENAME}" | ${BCONSOLE}
> 
> # tell the drive to eject the tape
> ${MT} -f ${TAPEDEV} eject
> 
> # tell Bacula to watch the drive for tape insertion
> echo "mount ${TAPENAME}" | ${BCONSOLE}
> 
> # always signal success
> exit 0
> --------8<--------8<--------8<--------8<--------8<--------8<--------

-- 
Adrian Moisey
Systems Administrator | CareerJunction | Your Future Starts Here.
Web: www.careerjunction.co.za | Email: adrian AT careerjunction.co DOT za
Phone: +27 21 818 8621 | Mobile: +27 82 858 7830 | Fax: +27 21 818 8855

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>