Metadata from SQL Server backup image

When creating a move template for a restore in the GUI client, it is able to quickly generate a listing of the SQL Server logical and physical filenames for you to change:

MOVE  "DBNAME"
#TO  "d:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\DBNAME.mdf"
# 
# 
#  Replace the file path <d:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\DBNAME.ldf>
#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "DBNAME_Log". 
MOVE  "DBNAME_Log"
#TO  "d:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\DBNAME_Log.ldf"

I am wondering where or how it get's this information?  Is it stored in metadata somewhere in the backup image?  I am working on scripting out a restore so would like to find if there is a command line command I can use to get that metadata to build a move .bch script.  I know I could go to the source SQL Server, and find the information, but I need to do this without the process having access to the source sql server database.

I use bplist to get the image names to restore, I just don't know how to get this metadata.

 

Any ideas?

 

Thanks.

 

4 Replies
Highlighted

Technote

Technote http://www.symantec.com/docs/TECH23166 explains what the image name consists of. The database name among other things.

 

The standard questions: Have you checked: 1) What has changed. 2) The manual 3) If there are any tech notes or VOX posts regarding the issue
Highlighted

Yes, and I use that to get

Yes, and I use that to get the dbname, backup level, etc.  However, it does not give me the info I need to redirect the files.  For SQL Server Move scripts I need to get the logical and physical file names included in the image.  I am wondering if there is a place that is stored that I have access to.

Highlighted

See if this post helps? Where

See if this post helps?

Where is netbackup hold the information of sql backups 

It seems that this metadata is stored in the SQL master db, not in NBU.

 

Highlighted

Thanks for the link, that

Thanks for the link, that lead down a useful rabit hole, that got me a little closer:

I agree that I can find the info in the master database for the SQL Server instance that the backup was taken on.  However, that can't be the only place that it's stored, as if the original master db was no longer available Netbackup would not be able to restore the image.  Also, I do not want to have to rely on that master being available in my script.

Looking through those links I came to: http://www.mass.dk/netbackup-quick-hints/converting-ms-sqls-nbimage-to-netbackup-backupid/.  Which shows that this information is available from the bpflist command. It  lists out the mdf and ldf files along with the logical names. The only problem is that that command is not available on the client, just the master server.  So I need to find if there is any way to get this same information from Netbackup from the client.

Thanks.