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
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
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