Bacula-users

[Bacula-users] Shell script to label new tape in changer with barcodes

2010-10-12 02:53:11
Subject: [Bacula-users] Shell script to label new tape in changer with barcodes
From: Rumato <rumato163 AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 11 Oct 2010 23:48:57 -0700 (PDT)
If anybody need this staff i wrote some script to label new unlabeled tape
with barcodes and register it in Bacula system in Pool "Scratch"
This script can be used if you want to label new tape using it's barcode and
create a volume with the same name in some Bacula's pool. By default in this
script used a pool "Scratch"
Script create a .log file in /var/log/barcode_label.{current date}.log

Usage: barcode_label.sh [options] -s [1-8]
Tape Barcode Label tool ver $VER
OPTIONS:
-h | --help              Show this message
-v | --version          Show version only
-n | --notify            Send notification to "Backup group" by email
-s | --slot               Set the slot number with unlabeled tape [1-8]
-e | --exch-slot       Load unlabeled tape from EE-slot to changer

You just need to set the following variables in section "Variables":

MT=/bin/mt
MTX=/usr/local/sbin/mtx
MTX_CH=/usr/local/bacula/etc/scripts/mtx-changer
ctl=/dev/changer
device=/dev/nst0
drive=0
bconsole_cmd="/usr/local/bacula/sbin/bconsole -c
/usr/local/bacula/etc/bconsole.conf"
recipient=backup@localhost
send_mail="no"
load_from_ee="no"
ee_slot=10
log_file="/var/log/barcode_label.`date +\"%Y%m%d-%H:%M:%S\"`.log"

The script in attach  http://old.nabble.com/file/p29934340/barcode_label.sh
barcode_label.sh 

Hope this staff will be usefull to somebody.
-- 
View this message in context: 
http://old.nabble.com/Shell-script-to-label-new-tape-in-changer-with-barcodes-tp29934340p29934340.html
Sent from the Bacula - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
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>
  • [Bacula-users] Shell script to label new tape in changer with barcodes, Rumato <=