Rebuild a corrupt or missing GIR pool database using nbksrv (on a Backup Server node) for 8.2.1 and newer:
Note: These steps have only been confirmed to work on DataCenter 8.2.1 and newer versions for Windows (the functionality to perform the GIR pool rebuild via nbksrv only exists in v8.2.1 and newer. The nbksrv.exe rebuildpooldb command is not supported by versions of DataCenter older than 8.2.1. The process detailed here likely will not work with earlier versions. These steps are also utilized in Step 3 in KB guide "Command line restore of Hyper-V VM using vsshyv and nbksrv (only for backups stored in GIR disk pool) for 8.2.1 and newer".
- Locate the Backup Server that has the issue with the GIR Disk Pool, if you attempt to select the GIR Disk Pool that has a corrupt or missing pool.db then that GIR Disk Pool will not be able to load the GIR Disk Pool details screen contents in the Java GUI > Storage Management > Backup Servers > select the backup server node in question and then attempt to left-click on the GIR Disk Pool in question, if it shows an error OR no VM backups are listed in the GIR Disk Pool details screen area, then the GIR pool.db will need to be rebuilt.
- Start an Admin Command Prompt on the Backup Server node in question.
- cd %ProgramFiles%\NovaStor\DataCenter\nbksrv\
- Using Windows Explorer navigate to the GIR pool folder on the backup server that has the issue, to browse to the GIR disk pool folder location (where the backups are stored under the GIR pool folder). Disable "Hide extensions for known file types" in Windows Explorer's View > Options screen, as you need to be able to see all file extensions in the next step.
- To simulate a GIR pool db config corrupt/missing issue rename or delete two files pool.db and .pool.db.chk in the target GIR disk pool folder in question on the backup server in question. In this example it is required to rename the pool.db and .pool.db.chk to append ‘_renamed_original' to the end of the filename. Note: The .pool.db.chk file may not exist in all cases, for all versions, if it does not exist then just ignore renaming that file if so.
- This is an example of what the GIR-Disk Pool details screen will show if the pool.db is corrupt or does not show any VM backups in it, from Java GUI > Storage Management > Backup Servers > Disk Pools area:
- Issue the command in Step 8 via an Admin Command Prompt session. The parameters of the nbksrv tool we will make use of are the rebuildpooldb command, and then finally --pool contains the name of the GIR disk pool in quotes. The names of all of your GIR pools can be found by loading the Java GUI and look in Storage Management, under Backup Servers > Disk Pools. Note: If the Pool name has spaces in it then quotes will be required, you can use quotes regardless of it having spaces or not. nbksrv.exe is always run directly from the Backup Server node machine, where the GIR disk pool is located on (again you need to verify what backup server that is prior to issuing the command, as you will need to run nbksrv.exe directly from that machine). Note: Command Server nodes are normally always enabled as a backup server, and your GIR pool could exist there. Using the Java GUI look in Storage Management, under "Backup Servers" listing to see which nodes are enabled as a Backup Server. The nbksrv.exe is run directly from that backup server node. If all of your GIR disk pools exist on the Command Server node then obviously run the nbksrv.exe command from that machine, but that is not usually the case.
- nbksrv.exe rebuildpooldb --pool "GIR Pool"
- Example running the nbksrv rebuildpooldb command and how it should look at this step:
- After executing the nbksrv rebuildpooldb command it should re-create the pool.db (and possibly a .pool.db.chk) files in the original GIR pool folder, verify that it did by refreshing the folder in Windows Explorer. Now refresh the Backup Server area of Storage Management, and then refresh the corrupt GIR disk pool in question from the GUI, and it should now show the backup sets stored in the GIR disk pool now that it has been rebuilt, example:
- Now VM backups that are stored in this GIR disk pool can have their details displayed via the GUI and be restored via the GUI. Done.