NetWorker NMM - How to perform a command-line restore of Hyper-V Exchange backups
Summary: NetWorker Module for Microsoft (NMM) can perform restores of Hyper-V Virtual Machine (VM) backups from the command-line. This article explains how to use command-line restore with NMM starting from 9.x and later up to and including the latest 19.x release and later. ...
Instructions
NetWorker Module for Microsoft (NMM) enables command-line restores of Hyper-V and Exchange backups.
Use the nsrnmmrc command for restores. The following steps detail how to perform this restore:
1. List the backups of the Hyper-V client using the mminfo command:
mminfo -avot -q client=fmpcluster.aqua.local HyperVPool.001 Data Domain fmpcluster.aqua.local 9/23/2016 12:32:50 AM 9081 MB 14987381 cb full APPLICATIONS:\Microsoft Hyper-V\VM1\B27CFD53-AD61-4639-88B3-3717 C1227922 HyperVPool.001 Data Domain fmpcluster.aqua.local 9/23/2016 12:32:51 AM 58 MB 4293177461 cb full APPLICATIONS:\Microsoft Hyper-V\VM1\ConfigFiles HyperVPool.001 Data Domain fmpcluster.aqua.local 9/23/2016 12:37:21 AM 23 KB 4276400513 cb full APPLICATIONS:\Microsoft Hyper-V\VM1
2. Locate the required Virtual Machine (VM) and the backup time from this output. In the above example, we want to restore the VM 'VM1'. (APPLICATIONS:\Microsoft Hyper-V\VM1)
Note the saveset id (4276400513) of this backup and run the following command to obtain the 'nsavetime' required with the nsrnmmrc command.
mminfo -avot -q ssid=4276400513 -r name(50),ssid,savetime,nsavetime name ssid date save time APPLICATIONS:\Microsoft Hyper-V\VM1 4276400513 9/23/2016 1474605441 Another way to obtain the nsavetime would be as below:
mminfo -avot -S -q ssid=4276400513 ssid=4276400513 savetime=9/23/2016 12:37:21 AM (1474605441) fmpcluster.aqua.local:APPLICATIONS:\Microsoft Hyper-V\VM1 level=full sflags=vF size=22704 files=8 insert=9/23/2016 create=9/23/2016 complete=9/23/2016 browse=10/23/2016 11:59:59 PM retent=10/23/2016 11:59:59 PM clientid=8c9945a5-00000004-577042c4-577042c3-00015000-0c75a456 *backup start time: 1474605441; *NSR_BACKUP_GENERATIONID: 1474605081; *NSR_PRIMARY_VOLUME_ID: \ c293a7f9-00000005-007043ff-577043ff-00045000-0c75a456; *POLICY ACTION JOBID: 2; *POLICY ACTION NAME: "backup: 1474605441"; *POLICY NAME: "HyperV-Pol: 1474605441"; *POLICY WORKFLOW NAME: "HyperV-Wkfl: 1474605441"; *ss data domain backup cloneid: 1474605441; *ss data domain dedup statistics: "v1:1474605441:22804:22804:5402"; group: HyperV; saveset features: CLIENT_SAVETIME; Clone #1: cloneid=1474605441 time=9/23/2016 12:37:21 AM retent=10/23/2016 flags= frag@ 0 volid= 7357439 file/rec= 0/0 rn=0 last=9/23/2016
3. Run the 'nsrnmmrc' command as below to run the VM restore:
nsrnmmrc.exe -s vmmsrv -c fmpcluster.aqua.local -x c:\recover -t 1474605441 "APPLICATIONS:\Microsoft Hyper-V\VM1\\"
- The '\\' added to the end of the saveset name is required for the command to function.
- The 'saveset name' in the command is also case-sensitive. The name should match the case as seen in the 'mminfo' output. The recover command fails if the case does not match.
- For example, the following command would fail because the VM name 'vm1' does not match for case with the name 'VM1' registered in the media database:
nsrnmmrc.exe -s vmmsrv -c fmpcluster.aqua.local -x c:\recover -t 1474605441 "APPLICATIONS:\Microsoft Hyper-V\vm1\\"
The failure message is "Recovery process has filed to locate correct logical savetime for requested selections -- error 0x80004005..".
For Exchange backups, perform similar steps. The key is to find the nsavetime for the required backups and append '\\' to the saveset name. An example of exchange restore would be:
nsrnmmrc -s nsr-server -c jetsdag -x c:\recover -t 1474585250 "APPLICATIONS:\Microsoft Exchange 2013\MyDb\\"
If the command does not work and if all the provided options are correct, try typing out the command manually on the command line. A copy and paste of the command may not work correctly.
See KB How to recover NMM savesets using command line saveset recovery tool 'nsrsnap_vss_ssrecover' if saveset restore of backups done with NMM 8.x are required.
ADDITIONAL INFORMATION
The following example illustrates when a backup is taken of a virtual machine "win", that mminfo displays three savesets for that backup:
- One saveset for a datafile (and there could be more than one datafile)
- One single saveset for "ConfigFiles"
- One single saveset for the "cover set", which is the name "APPLICATIONS:\Microsoft Hyper-V\VirtualMachineName"
In this example, the last saveset is the COVER set:
volume type client date time size ssid fl lvl name dd1amerlan.001 Data Domain windows.amer.lan 04/17/2025 08:39:02 AM 34 GB 3154190429 cb full APPLICATIONS:\Microsoft Hyper-V\win\5F546B6E-0BC5-4880-B3AE-44A765486033 dd1amerlan.001 Data Domain windows.amer.lan 04/17/2025 08:39:03 AM 54 MB 3137413214 cb full APPLICATIONS:\Microsoft Hyper-V\win\ConfigFiles (cover)***** dd1amerlan.001 Data Domain windows.amer.lan 04/17/2025 08:47:31 AM 7 KB 3120636505 cb full APPLICATIONS:\Microsoft Hyper-V\win
If the cover set is deleted, or if the savesets are cloned and the cover set is mistakenly not cloned and then expires on the original backup device, then the cover set will be missing on the clone device. In that case, restores will NOT be possible. It is important to clone all NMM APPLICATION savesets including the cover set to prevent restore failures.
Videos
Video: Command Line restore if Hyper-V/Exchange backups.
Watch on YouTube