The scanner command retrieves missing file and media index information which you should have present and which will be backed up automatically at least once a day. So why do you want to run scanner at all?
It is not intended to scan a bunch of media at all, although this could be made possible of course.
Keep in mind that, in case scanner will detect an error, it will most likely not proceed. Consequently, a script will stop here.
But most important:
Scanner will not be able to detect everything. And what you will discover depends very much upon the type of error:
- If it is a media read error, the drive should already detect it (thanks to CRC/ECC) and come up with a read problem.
Can you move beyond this point - the answer most likely depends on the error type.
- If there is an error in the file (changed data, but fine checksums, which already is hard to believe), then no product will be able to discover it.
- If it is a problem on the block header (again, changed data with checksums o.k.), NetWorker will come up with problems during the scan. Most like it will fail to recover the save set as well.
Sit down on a test system and backup a larger text-only file (1MB is enough) to a standard (not advanced) file device. Then, with a hex editor, manipulate the file and try to run scanner and recover
- Manipulate the file data
- Run "scanner -i -S ssid" and "recover -S ssid"
I bet you will not see any problem at all!
- Now manipulate a block header (they are embedded but can
easily be detected)
- Run "scanner -i -S ssid" and "recover -S ssid" again
Most likely you will see errors here.
So what you really need to do is a test-read (recover -n) for each save set!!! to see whether all data can be retrieved fine.
But before you go and script something, make sure that you will be able to detect what you are after.
Good luck.