This post is more than 5 years old
2 Intern
•
161 Posts
0
1133
January 24th, 2013 07:00
Scanner script
Hey guys,
I'm not much of a scripter but now I need a script to scan a few old tapes.
I know all the barcodes of the jukebox and I tried to script a shell script by myself which won't work well.
I just put these three commands into the script:
nsrjb -s -j -f -ln -T
wait
scanner -i -s
wait
nsrjb -s -j -f 1 -u
Then I copied the lines a few times and changed the barcode-info.
But apparently it won't work well. After the first scan, the scripts hangs.
I'm sure there are a thousands better solutions ou there and may be one can help me out.
Appreciate it.
Regards
Jan
No Events found!



jkernagh
35 Posts
0
January 24th, 2013 09:00
Hi Jan, scanner doesn't really lend itself to scripting unfortunately; it's an internal tool that's found its way into regular use.
You should consider adding yourself to some of the RFEs out there which are intended to add scanner to the regular NetWorker framework (NW115549 and NW125261). If you open a case you will be able to request adding your name to the list of interested customers.
In general, this shouldn't lead to hangs, but you might consider an mt -f status command as a sort of sanity check before the scanner command, just to ensure the drive is ready.
As it hangs - is the scanner command running? Can you truss / strace / tusc it to see if it's doing anything?
We don't of course support scripts, but it will help to separate the functions to determine what specific activity immediately precedes the hang, and troubleshoot that. You may want to increase waits after load/no mount, scanner completion and unload to something high to ensure operations aren't tripping over one another (like 30 seconds).
Last - because scanner isn't properly integrated into NetWorker, NetWorker may unwittingly unmount a volume being scanned either due to Idle Device Timeout being reached, or because another operation requires a drive. You can prevent this by updating the device value to Service Mode AFTER load/no mounting, and then back to Enabled before unmounting.
HTH!
James
bingo.1
2.4K Posts
0
January 25th, 2013 02:00
Also, do not forget that scanner may ask for a specific tape because a save set will continue on that one. So in general it is not a good idea to run 'automated' scan processes.
ble1
4 Operator
•
14.3K Posts
0
January 30th, 2013 09:00
Agreed with bingo. If you really wish this tape by tape, then -z option might be your friend, but you will miss few backup sets by doing it so.