Showing results for 
Search instead for 
Did you mean: 

solaris netbackup command for retireving media ID -- But I need only those with specific folder

I am trying to run a query from Solaris that has the netbackup DB that will list all the media ID for any servers within the policy type within some dates, Full backups, and with a certain / specific folder within the media (tape catlog)

Example. from the GUI on client you open backup archive and restore
Click on file
Specify netbackup machines and policy type
Specify server to use for backups and restores
Policy Type
Then select the date range.

It will the open the server under all folders and allow you to pic the directory. Once directory has been picked, you can slect Actions - preview media and it will list what media IDs are needed for restore...

In my Example. ServerA had this listed under all folders

             Microsoft Information Store
                                 and etc.

Two issues with this approach is 1. While the preview media does show, it doesn't allow you to copy and paste into txt. And on top of that I need to run query on bunch of servers, for different date ranges.... Very very cumbersome and tedious...

So I looked up the netbackup commands and came across something that gets me partially there using the bpimagelist command
In my example below I am running bpimagelist with dates ranged from Nov 1 - Nov 21 2011
I want all servers included that have a policy type MS-Exchange-Server and only Full backups. I want the media ID for this range.... While this works... It is too much...
I only want the tapes with the date with folders like this  Microsoft Information Store \ 001
And only 001, not 002, 0003, 004 and etc...

Is there a way to script this so it does what I need and pull the information...

Here is my example.

bpimagelist -L -d 11/1/2011 -e 11/21/2011 -pt MS-Exchange-Server -st Full -media |grep "Media ID:"

But like I mentioned, it includes all information stores.... I only need 001.


Version Netbackup 6.5.6
OS: Solaris 10 10/09

---One other question --- Is there a way to connect to the Solaris Netbackup DB remotely like SQL studio Manager and run scripts and queries against the DB?  What are the steps to do that... But the first part of my post is most critical... Again thanks



6 Replies

Once i researched for similar

Once i researched for similar request here in which one would like to get media list of file backups shown in 'preview media' from comand line - resulting no luck. I could not find any command in debug logs. So what i can tell you here is to use bpimagelist while i shows all tapes for paticular backup image.

For adfitional question: administration commands can be fired on the Windows Administration Console host.

Hi Indyrb, You are on the

Hi Indyrb,

You are on the right track. Just add -preview switch at the end of your bpimagelist line ;)





Hi Indyrb, You are searching

Hi Indyrb,

You are searching for the illusive "Holy Grail" of NetBackup reporting. :) I know because I have also been on this quest and come up empty handed. 

The -preview will not get you what you are seeking as it does not list the contents of the media ids which is what you are really looking for. It does give you a single line output.

As to the copy & paste from the preview mode in the GUI... this works for me using the JAVA GUI on a windows desktop, but there is no way to export the information. Click in the tape list, Ctrl-A, Ctrl-C ... open a text document and Ctrl-V.

Also, there is no way to connect to the NetBackup database from a remote server. I believe that is really more security related than technical.

Good luck in your search though.



Is there any commands that

Is there any commands that will show perhaps the backupid from dates -d 11/1/2011 -e 12/1/2011 with a certain policy type -pt MS-Exchange-Server with conents = Mailbox DataStore DB = 001 or folder path...

and then it gives that backup id... then can up run bpimagelist against all the backup ids to get the media for only those wiuth 001..  can this be scripted or in powershell, vbscript, or shell for solaris....


bplist ?, i dont know how to parse reults from one into another cammnd... need help please.

There is no way I know of to

There is no way I know of to list the contents of a backup via command line. That is the crux of the problem. Maybe someone else knows a way to do that. However if I do find a way to, I'll announce it here for sure.

Parcing output in Solaris is pretty easy to do. I suggest the use of arrays or even temporary text files.

bplist or bflist will list

bplist or bflist will list the contents of a backup id Also, it is possible to connect to the NBDB from a remote server - SQLAnywhere is one product that will do it, though if I recall correctly this requires a license. I will hazard a guess that there may be other 'free' similar products out there.