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 up to 8.2.18 versions (as well as DC 9.1.7 with slight differences, see note below) 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". Note: The same instruction set will also apply to DC 9.x (tested with DC 9.1.7 specifically) for rebuilding "Image pools" ("Image pools" are the same as "GIR pools", in DC 9.x, basically just renamed), the only differences are since DC 9.x is a web based UI, so it looks different when viewing the Disk Pool Details, the example screenshots in this guide were taken with DC 8.x, and that there will never be a .pool.db.chk file to delete prior to running the rebuild command. In DC 9.x, the pool.db is auto backed up for you (as a renamed file in the same pool folder) and so you do not need to delete or rename that file prior to issuing the rebuildpooldb command.
- 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 file will never existing on DC 9.x).
- 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.