Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scanner -i scripts 2

Status
Not open for further replies.

Cimm

Technical User
Feb 17, 2005
69
US
Hi,
I havent found anything regarding a problem one of my customers has.

Problem: Several hundred's of Tapes need's to be indexed.

I have several tape drives connected to the backup server.

I would like to create some kind of queue, so it will continue index the tapes while afk. It takes approx 1-2 hours to index a complete tape. So I would really like to make this run 24/7.

Any suggestions?

I am aware that scanner -i is the command I have to use. Just checking if someone here has been experience a similar thing and found a way around to make this as painless as possible or if you have an idea how this could be solved.

Thanks in advance
Mike
 
Haven't done this but couldn't you just create a script
that does a loop here, after you load up the tapes in your silo:


for EACH in $(cat file); #or use mminfo here....

do

scanner -i $EACH

done


-John
 
Hello Mike,

I have recent experience with this type of index recovery
using the scanner command. There are several issues that make this process difficult.

One major difficulty is with the process of loading the tapes into tape drives. If you are using Tape Silos or Autoloaders Legato will not automatically load tapes in a tape drive when you are running a scanner command. You must
mount the tapes using the Administration GUI or the "nsrjb"
line command.

The scanner command is an interactive dialog process. There are prompts you must reply to. When the scanner
process spans between tape volumes you must reply to
prompts about the next tape you need to scan.

If you are using the "scanner -i" command to scan for backups that span multiple tape volumes you must mount the
tapes for the scanner process in the correct sequence. The
correct sequence is the same sequence in which the tapes
were used when the backup ran. The scanner process will fail if you scan the tapes in the wrong sequence.

If the tape volumes are not in the media index then when
the scanner command asks for a continuation tape volume it
will not ask for a specific volume. It justs says it requires you to mount the next volume. It won't tell you
what volume is required.

If you are using Tape Silos or Autoloaders you can not use the Administration Graphic user interface to mount the tapes into tape drives if the volumes are not in the media index. You must use the "nsrjb" Line command to Load the tapes into the drives.

You can use scripts to automate the process of creating
the scanner command and starting the scanner process but
using scanner requires operator intervention so it can not
be totaly automated.

I hope this helps.


 
Thanks for the explaination bigmikeo, a few more questions.

You saying IF the tapes arent numbered then I would have test each tapes to see if it is the correct tape it need's to continue the index'ing?.

There is no media index what so ever . Just a new backup server with a pile of tapes.
Im starting it from scratch.

No silo/library either, it will be a few tape drives which I will need to load tapes into manually. Do I need to load the tapes with the nsrjb command or wont it be enough doing

scanner -i /dev/rmt/0
scanner -1 /dev/rmt/1 etc , once the above scanning has been completed.

//Mike
 
What do you really have to do? Recover a broken server or moving the old one to a new machine?

In any case, the fastest and easiest way would be a 'normal' server recovery (mmrecov). However you must be aware of the bootstrap tape. Is there really no chance to get a hold of it?
 
Hello Again Mike,

If you have no information what so ever about the contents of the backup tapes this process gets much longer.

The tapes must be scanned twice.

The first scan will be with "scanner -m". That will add the tapes to the media index.

Then you can run Legato mminfo reports to see what is on each tape. You need to anaylze this information so you can
see if there are any backups continued from one tape volume to another. Once you have that information you can
plot the correct sequence for the next scanner.

The second scan will be with "scanner -i" to re-build the
backup client index information. Here is where you must
be careful about the sequence of the backups that are on
more then one tape volume.

If you are not using a Tape Silo or Autoloader you do not
need to mount the tapes in Legato. You just need to put the
tape into the tape drive and run the scanner command.

Here is a good point. If this is a new Backup Server and you want to add the tapes to the index there is a faster way to do that. If possible you must locate a Media index
Bootstrap backup from the Legato Backup Server that created
the backup tapes. If you can find a Bootstrap backup you
maybe able to recover the media index using the Legato
"mmrecov" command. After that you maybe able to recover the
client indexes from available backups using the Legato
"nsrck" command. This all depends on the version of Legato
that created the backup tapes and the version the new backup server is using. You can locate Bootstrap media index backups using the "scanner -B" command. You will have
to run that scanner command on each tape to find all the
bootstrap backups. You will have to recover the most recent
bootstrap backup you can find. Not the oldest one.
 
Lots of useful information here, thanks alot.

The customer I am working for doesnt want any restore , just index the tapes, I suspect they looking for a file but doesnt know in which tape it is in, or when it was changed.

So if I understand you correctly now.

1, I need a media index before I can create a tape index.
scanner -m

2, Use mminfo for each tape to find out the sequence.

3, scanner -i, starting with tape 1, to ....

There is no indication that this customer have been taking a backup of the backupserver itself which is unbelieveable.
A simply backup of the /nsr/ directory and this problem wouldnt have occured at all.
 
Hello Mike,

That is about it. Run the "scanner -m" on all the tapes first.

Use mminfo to see what is on each tape. Analyse the mminfo
reports. You need to identify backups than spanned multiple
volumes. You need to know what sequence of tapes was used.

Then "scanner -i" on the tapes in the correct sequence to
build the client index. Make sure you create the backup
client definitions for the clients with backups on the tapes before you run "scanner -i".

Recovery of the media index can only be accomplished using
"mmrecov" to restore the Bootstrap backup. The bootstrap
backup which runs on the backup server is the only time the
media index is backed up.

Backups of the client indexes are created after a successful backup of the client or when the "savegrp -O"
command is used. The client indexes can not be backed up
anyother way using Legato. If you try backing up the /nsr
dirtectory using Legato it will not backup the index files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top