Forum Discussion

bordio27's avatar
bordio27
Level 4
6 years ago

How generating bch for SQL restore retrieves database informations

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

  • 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

  • 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

    • bordio27's avatar
      bordio27
      Level 4

      Thank you Michal, that's what I need

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

      db

  • 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