cancel
Showing results for 
Search instead for 
Did you mean: 

How generating bch for SQL restore retrieves database informations

bordio27
Level 4

Hi,

I'm trying to make a Powershell script to automate the restore process of the SQL Server databases

It's clear for me how to do it, but the only things I can't get are the SQL path informations (TO directive) and SQL logical name informations (MOVE directive) that are generated into the bch file during restore process

Thanks in advance 

db

1 ACCEPTED SOLUTION

Accepted Solutions

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello,

you will have to "play" with bpflist command output. It returns these values (MSSQL_METADATA_FILES, MSSQL_MEDATADA_LOGFILE). For example:

bpflist -backupid <client>_1571795399 -rl <rl> -option GET_ALL_FILES

Note that this command is available on NetBackup servers only, not clients.

Regards

Michal

View solution in original post

4 REPLIES 4

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello,

you will have to "play" with bpflist command output. It returns these values (MSSQL_METADATA_FILES, MSSQL_MEDATADA_LOGFILE). For example:

bpflist -backupid <client>_1571795399 -rl <rl> -option GET_ALL_FILES

Note that this command is available on NetBackup servers only, not clients.

Regards

Michal

Marianne
Level 6
Partner    VIP    Accredited Certified

You can also use bplist command to extract database info. 

See this TN: How to manually create a SQL database restore script .....

https://www.veritas.com/content/support/en_US/article.100016506

Thank you Michal, that's what I need

Do you know if there's a way to have bpflist executable on a client?

db

Munther17
Level 0

Hi 

I know it has been a while :) 

But if its Ok, can you share that Powershell to automate the SQL restore, it will be a super helpful for me,

as we have to do a bunch of restores (move) every once in a while.

 

Thanks in Advance