Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Cataloging some old tapes into Netbackup 7.5.x

Created: 29 Aug 2012 • Updated: 12 Oct 2012 | 16 comments
This issue has been solved. See solution.

I have about 500 plus DLT tapes I need to inventory or Catalog to get the dates on them to determine if we need to keep them or not.

How do I go about importing them or cataloging them? And how can I see the date they were cataloged?

 

EDM

Comments 16 CommentsJump to latest comment

Mark_Solutions's picture

First you need a DLT tape library that supports them, configured in your NetBackup environment.

Next, via the Admin Console, initiate an Import (this is known as phase 1)

The Results tab of the catalog will tell you exactly what it finds on each tape (client, policy, schedule and date)

You then have the choice of whether you run a phase 2 to actually import any of the images into NetBackup so that you can restore from them

If you just want to know what is on them then the phase 1 will be enough

Hope this helps

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

SOLUTION
CNLIT's picture

Great thanks, that worked great!! But how do I import more than 1 tape at a time? When I hit enter it says i can either manually import media ID's or import through an inventory. When I do the inventory it does not let me pull in all the ID's.

 

 

Mark_Solutions's picture

I think you can only do one at a time

You could create a batch file to run through them all for you I guess:

In the robot screen highlight all of your tapes to import making sure that the media ID is the firts column - hit CTL-C and then paste these into a text file - save this as tapes.txt and put it in a directory somewhere on the Master Server:

In that directory make a new file named imports.bat and open it in notepad.

Enter the following command line (all on one line), adjusting to the correct path that you have NetBackup installed and the name of the media server to do it - it will churn through them one at a time for you when you run it:

for /f %%a in (tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpimport" -create_db_info -id %%a -server mediaservername

All assuming you are on Windows

Hope this helps

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

CNLIT's picture

Does this command need to run in a certain directory?

Does the double %% need to be in there?

 

for /f %%a in (tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpimport" -create_db_info -id %%a -server mediaservername

 

The version is on Windows NetBackup 7.1.x

Mark_Solutions's picture

You can put the script anywhere on the Master as long as the path to the bpimport command is correct and the tapes.txt file is in the same directory as the /bat file.

It does need the double %% so exactly as shown as long as the path to bpimport is correct

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

CNLIT's picture

The only way i can retrieve backup header info is when I do a tape summary report, but it will only let me do one tape at a time.  Is there any way I can do a batch file to pull all the tape header date info at one time?

EDM

Mark_Solutions's picture

Which report are you using to show you what you need - tell me that and i will work out the equivalent command and a batch file to do it for you

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

CNLIT's picture

I am doing a reports/tape reports/tape summary

 

Then I put in the Mediaowner and Media ID

CNLIT's picture

Here is the error I get on the import:

/12/2012 1:44:13 PM - begin Import
9/12/2012 1:44:14 PM - Info bpdm(pid=7048) started           
9/12/2012 1:44:14 PM - started process bpdm (7048)
9/12/2012 1:44:14 PM - Critical bpdm(pid=7048) sts_get_lsu_prop_byname on LSU tapes.txt failed: 2060013 no more entries   
9/12/2012 1:44:14 PM - Critical bpdm(pid=7048) Invalid storage device: tapes.txt no more entries     
9/12/2012 1:44:14 PM - Critical bpdm(pid=7048) failure to open disk at path tapes.txt: plug-in reports error 2060013 no more entries
9/12/2012 1:44:14 PM - Error bpimport(pid=7400) Status = file open failed.       
9/12/2012 1:44:14 PM - end Import; elapsed time: 00:00:01
file open failed(12)

I assume it was because the tapes.txt has too much text in it???

Mark_Solutions's picture

The error says the storage unit is tapes.txt - so the script is wrong somewhere

If you have changed it to have 2 rows - media owner and mediaid then the script needs to be able to read both columns from that script.

So you can either have a .bat file for each media server with just its tapes on the tapes.txt file or change the script

So if tapes.txt looks like:

abc 123      server1

abc234        server1

abc345        server2

abc456         server2

then the script would have to be:

for /f "tokens=1,2" %%a in (eject_tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpimport" -create_db_info -id %%a -server %%b

So %%a is the first column and %%b the second - and each entry must be on a new row

Hope this helps

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

CNLIT's picture

How do I do a script that will give me the header info on the tape? Media Date.

For all the media on the tapes.txt file.

 

CNLIT's picture

The script to import the media works like a champ thanks!

 

I just need a script that will show me the date header info for each tape in the tapes.txt file.

Thanks for all your help.

 

EDM

Mark_Solutions's picture

OK ... keeping me busy this one! .. so try this ... make a new file in the same directory as you tapes.txt called maybe header.bat

In that, assuming that the tapes.txt has the mediaid in the first column:

for /f %%a in (tapes.txt) do "C:\Program Files\veritas\volmgr\bin\\vmquery" -m %%a -l >>C:\header.txt

you have the choice of -l. -w or -W for this command - see which is best for you (if this gives you what you want)

-l will work best for this command - you just need to understand what the columns are

Obviously you can direct it where ever you like, but you do need the double > (so >>) to make it keep appending and not overwrite the file

Let me know if this is any good

#edit# just edited the path!

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

CNLIT's picture

Mark it's pulling the current date from the tape, I need the date it was created or backed up.

CNLIT's picture

I was hoping I could have two columns, one for the media and one for the date it was backed up.

 

EDM

Mark_Solutions's picture

if you use the -l switch the first data is when the tape was created, the second is when it was assigned (so the time and date of the first backup on that tape)

Otherwise maybe try bpimmedia with the -L switch which will show all of the backups on the tape ... so:

for /f %%a in (tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpimmedia" -mediaid %%a -L >>C:\images.txt

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.