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
Source/Destination
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

ServerA
             Microsoft Information Store
                                 001
                                 002
                                 003
                                 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.


Thanks


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
LVL 5
IndyrbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

IndyrbAuthor Commented:
working with Symantec Support. (listing some notes incase someone else comes across this or has additional ideas.:)


I ran

bpimagelist -L -d 11/12/2011 -e 11/24/2011 -pt MS-Exchange-Server -v

This queried the catalog for all servers with the policy type "MS-Exchange-Server
inbetween the dates specified...(in verbose)
We had lots of exchange servers, so this was needed to get all of them..

I found a few different policys per the policy type MS-Exchange-Server.

When using the -v I found other fields, but definately the policy name I wanted to sort/query by -policy "EXCH_SOMEEXCHSERVERMB1"

When I run this command it gives all the Media IDs for all the servers with policy name
"EXCH_SOMEEXCHSERVERMB1"  --- way to much

bpimagelist -L -d 11/12/2011 -e 11/24/2011 -policy EXCH_SOMEEXCHSERVERMB1 |grep "ID:"

This is the policy name I wish to query.

It reports the Media IDs: for that policy name... Which is good, but I want to further filter the Media ID list to only MEDIA IDS with the folder\directory on the Media "Microsoft Information Store" DB/Site:  001

Even when I add the -C client (SERVERMB1) to the syntax it list all the media for server name SERVERMB1 and policy name "EXCH_SOMEEXCHSERVERMB1"... The only thing is there are different folders\dbs\sites on this media... I dont want everything.. Matter of fact getting everything is a lot of media....
I want to browse and filter based on
the conents within this media so only my DB name (folder name) 001 in Microsoft Information Store \ is listed and only list media IDs with the name \ site 001

I even ran the -v to see possible fields, and Unless I am missing something In the tech doc, I am not seeing it.

http://www.symantec.com/docs/TECH91133 

Maybe a combination of "bplist and bpimagelist"

How to use the "bpimagelist" utility to browse for images and media_id where they are written to

Using the [-policy policy_name] switch and naming the policy based on the selection you might be able to get the desired output.





When I run this command it gives all the Media IDs for all the servers with policy type: MS-Exchange-Server ((POLICY TYPE))

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

When I run this command it gives all the Media IDs for all the servers with policy name "EXCH_SOMEEXCHSERVERMB1"

bpimagelist -L -d 11/12/2011 -e 11/24/2011 -policy EXCH_SOMEEXCHSERVERMB1 -st Full -media |grep "ID:”

When I run this command it gives all the Media IDs for the server named ServerMB1 with policy name "EXCH_SOMEEXCHSERVERMB1"

bpimagelist -L -d 11/12/2011 -e 11/24/2011 -client SERVERMB1 -policy EXCH_SOMEEXCHSERVERMB1 -st Full -media |grep "ID:”

When I run this command it gives all the Backup Status for the server named SERVERMB1 with policy name EXCH_SOMEEXCHSERVERMB1

bpimagelist -L -d 11/12/2011 -e 11/24/2011 -client SERVERMB1 -policy EXCH_SOMEEXCHSERVERMB1 |grep "Backup Status:"

All of them are zero: 0

I also know how to get the backup id: by grepping Backup ID:
bpimagelist -L -d 11/12/2011 -e 11/24/2011 -client SERVERMB1 -policy EXCH_SOMEEXCHSERVERMB1 |grep "Backup ID:"

Any idea on how to filter on folders within the media. of only the Microsoft Information Store (DB\Site 001)

I have hundreds to do, and the GUI interface is way to clumpsy and tedious....
Even the Java Admin Console isn't ideal.... But the Java Admin console allows you to export and copy and paste, which is a plus, but still not ideall..
Server name: SERVERMB1
Policy name: EXCH_SOMEEXCHSERVERMB1
policy type: MS-Exchange-Server
start date: 11/12/2011
end date: 11/24/2011
Schedule Type "Full"
0
IndyrbAuthor Commented:
going to accept my own comment -- per Symantec this could not be done.

Per Symantec:

I have researched and worked with one of our SMEs and found there is no way to get the information you are requesting using a script.

The information below is what is provided and given to the GUI when doing the browsing, which basically is a preview function.

From the BAR GUI using the Java we get the following when browsing for DBs:

(SR)bplist:
Protocol Code: 224
Status: 0
Time Taken: 608ms
Error Msg:
Server Locale: en_US
TO[0]: -S nbmastercl -C dag1 -granular_proxy dag1 -Listpolicy -l -b -P -W -R 1 -t 16 -E -unix_files -X -s 1381415225 -e 1381809599 -keyword "" "/Microsoft Exchange Database Availability Groups/dag1.HONSHU.DOM/Microsoft Information Store/Mailbox Database 0798711890/"
FROM[0]: 62038 0 0 0 0 4 18 -1 40 16832 root root 0 1381415272 1381415259 1381415259 1381415259 0 13 EXCH_2010_DAG 121 /Microsoft Exchange Database Availability Groups/dag1.HONSHU.DOM/Microsoft Information Store/Mailbox Database 0798711890/ 1 0
FROM[1]: 8459410 0 0 0 8459050 5 148 -1 40 33216 root root 8459050 1381415272 1381415260 1381415260 1381415260 0 13 EXCH_2010_DAG 129 /Microsoft Exchange Database Availability Groups/dag1.HONSHU.DOM/Microsoft Information Store/Mailbox Database 0798711890/Database 1 0
FROM[2]: 46179014 0 0 0 46178662 7 16685 -1 40 33216 root root 46178662 1381415272 1381415260 1381415260 1381415260 0 13 EXCH_2010_DAG 136 /Microsoft Exchange Database Availability Groups/dag1.HONSHU.DOM/Microsoft Information Store/Mailbox Database 0798711890/Logs_1381415173 1 0
Aux data: null

<snip....>

(SR-1)writeFile:
Protocol Code: 5
Status: 0
Time Taken: 422ms
Error Msg:
Server Locale: en_US
TO[0]: 1381415285
TO[1]: 1381415272
TO[2]: 1381415225
FROM[0]: C:\Program Files\Veritas\NetBackup\Logs\user_ops\Administrator\logs\jbp3A1F.tmp
Aux data: null

"C:\Program Files\Veritas\netbackup\bin\bpclimagelist" -X -preview "C:\Program Files\Veritas\NetBackup\Logs\user_ops\Administrator\logs\jbp3A1F.tmp" -client dag1 -server nbmastercl
(SR-1)execCommand:
Protocol Code: 1
Status: 0
Time Taken: 967ms
Error Msg:
Server Locale: en_US
TO[0]: "C:\Program Files\Veritas\netbackup\bin\bpclimagelist" -X -preview "C:\Program Files\Veritas\NetBackup\Logs\user_ops\Administrator\logs\jbp3A1F.tmp" -client dag1 -server nbmastercl
FROM[0]: E01007
FROM[1]: E01006
FROM[2]: E01008
Aux data: null
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IndyrbAuthor Commented:
Worked with Symantec on my own -- updated ee with all notes, just incase someone else comes across same issue. accepting my own comment and closing request.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.