Dear John Drescher, In message <387ee2020909210749o48d1fd07qd829c661ae7af...@mail.gmail.com> you wrote: > > > I believe putting a barcode label on a tape that already has a manual > > label will not delete the tape however executing the label barcode > > command will fail because the tape already has a label in its bacula > > header. > > I do not know a the solution to this problem. > > I would however over time recycle/delete the tapes with manual labels > so that you can add proper barcode labels to all your volumes.
An alternative solution is a small modification to the "mtx" script to allow mapping of barcode labels to arbitrary volume names. This is working fine for me: # # Map barcode label into a more comprehensive volume name # # Input: "2:" or "4:ABC123" ==> Output: "2:" resp. "4:K-H-4" # # Slot: ${line%%:*}, Barcode: ${line##*:} # map_barcode() { while read line ; do if [ \! -r /etc/bacula/Barcodes.conf ] ; then echo "$line" continue fi if [ -z "${line##*:}" ] ; then echo "$line" continue fi echo "${line%%:*}:`grep "^${line##*:}" /etc/bacula/Barcodes.conf | sed -e "s/${line##*:}[ ][ ]*//"`" done } plus this tiny patch: @@ -173,12 +193,12 @@ fi ${MTX} -f $ctl status >${TMPFILE} rtn=$? - if test ${vxa_packetloader} -ne 0 ; then - cat ${TMPFILE} | grep " *Storage Element [0-9]*:.*Full" | sed "s/ Storage Element //" | sed "s/Full :VolumeTag=//" - else - cat ${TMPFILE} | grep " Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//" - fi - cat ${TMPFILE} | grep "^Data Transfer Element [0-9]*:Full (Storage Element [0-9]" | awk '{printf "%s:%s\n",$7,$10}' + { grep ' *Storage Element [0-9]*:.*Full' <${TMPFILE} | \ + awk '{print $3 $4}' | \ + sed 's/Full *\(:VolumeTag=\)*//' + grep '^Data Transfer Element [0-9]*:Full (Storage Element [0-9]' <${TMPFILE} | \ + awk '{printf "%s:%s\n",$7,$10}' + } | map_barcode My "/etc/bacula/Barcodes.conf" looks something like that: Barcode VolumeID ======= ======== ABV101 I-001 ABV102 I-002 ABV103 I-003 ABV104 I-004 ABV105 I-005 ABV106 I-006 ... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de An expert is a person who avoids the small errors while sweeping on to the grand fallacy. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users