Bacula-users

Re: [Bacula-users] pick tape from scratch pool?

2008-06-27 12:06:50
Subject: Re: [Bacula-users] pick tape from scratch pool?
From: Brian Debelius <bdebelius AT intelesyscorp DOT com>
To: Michael Galloway <mgx AT ornl DOT gov>
Date: Fri, 27 Jun 2008 12:06:42 -0400
Michael Galloway wrote:
> hmmm 
>
> more of this:
>
> 26-Jun 20:05 molbio-sd JobId 1058: Please mount Volume "000291L4" or label a 
> new one for:
>     Job:          molbio.2008-06-26_20.05.58
>     Storage:      "LTO4" (/dev/nst0)
>     Pool:         Inc
>     Media type:   LTO4
>
> when there are available tapes in the scratch pool. is there a way to 
> configure bacula to 
> take a tape from scratch in cases like this?
>
> 1000 OK: molbio-dir Version: 2.2.6 (10 November 2007)
>
> -- michael
I run an 'update slots' admin job before each nights run.  I just 
modified it to disable all media, and then enable the inchanger media, 
based off of info from these posts, and bacula's make_mysql_tables script.

#!/bin/sh
#watch for my typos

#adminjob-update_slots.sh

bconsole="/root/bin/bacula/bin/bconsole"
bconsole_cfg="/root/bin/bacula/etc/bconsole.conf"
BCONSOLE="${bconsole} -c ${bconsole_cfg}"

mysql="/usr/bin/mysql"
mysql_user="-u bacula"
mysql_pass="-p ******"
mysql_db="bacula"
MYSQL="${MYSQL} $mysql_user $mysql_pass"

storage="YourStorageHere"

#update slots
echo "update slots storage=$storage quit" | ${BCONSOLE}

#use bacula db
if ${MYSQL} <<END-OF-DATA
USE $mysql_db;

#disable all media
UPDATE Media SET Enabled=0;

#enable inchanger media
UPDATE Media SET Enabled=1 WHERE InChanger=1;

#Display update
#SELECT Enabled,InChanger FROM Media;

END-OF-DATA
then
  echo "All Good"
else
  echo "Failed"
fi
exit 0

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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>