NetWorker: How to restore multiple Exchange databases in parallel using command line
Summary: This article describes how to restore multiple Exchange databases in parallel from a Windows command line using the NetWorker Module for Microsoft (NMM). NMM restores are typically performed from the user interface, but the NMM user interface by design only supports restoring one database at a time. Restoring multiple databases from the command line is not typically recommended. In rare cases, a command-line restore is needed when the UI does not display save sets or for urgent restores that do not require log replay. ...
Instructions
Exchange Server databases backed up with NetWorker Module for Microsoft (NMM) are typically restored from the Exchange server using the NMM user interface.
The user interface can browse and select the existing backups to restore. The user interface then launches the "nsrnmmrc" command which restores both the Database Files and Log Files.
In addition, once the restore of the files is complete, the user interface informs Exchange that it can replay the logs and bring the database online.
The limitation of the NMM user interface Is that only one database can be restored at a time.
This is only problematic if there are multiple databases to recover and the restores are time-sensitive.
In that case, the backup administrator can perform manual command-line restore of databases using the nsrnmmrc command from a command prompt.
IMPORTANT DIFFERENCES BETWEEN user interface and Command Line Restores
- User interface: When restores are performed from the user interface, the transaction logs are replayed and the database is mounted after the restore, to bring it online.
- Command Line: When the
nsrnmmrccommand is run manually from an elevated command prompt, the backup administrator restores the save set files to local disk. - However, the database files and log files that are restored from command are OFFLINE only because the logs are not replayed, and the database is not mounted.
- This is called a flat file restore. This requires an Exchange administrator to use Microsoft Exchange tools, like ESEUTIL, in order to replay the logs after the restore and then mount the database.
- This is a major distinction that makes the command-line restore process more complex and is rarely performed except when user interface issues occur that prevent them from browsing and selecting the save sets.
SUMMARY STEPS
To perform a command-line restore for one database:
- Open an elevated command prompt. Run
mminfoto get the list of save sets andnsavetime. - Prepare the
nsrnmmrccommand to restore the database save set in that command prompt. - Open another elevated command prompt and repeat the same steps for another database.
PROCEDURE
- Run mminfo to collect the
nsavetimeand save set name for building the restore command.
mminfo -s linux1 -c exch01 -r "savetime(24),nsavetime,sumsize,ssid,name" -avot
date time save time size ssid name 2/19/2025 2:24:25 PM 1739993065 119 MB 4004917226 APPLICATIONS:\Microsoft Exchange 2019\Onetest\DatabaseFiles 2/19/2025 2:24:27 PM 1739993067 111 MB 3971362794 APPLICATIONS:\Microsoft Exchange 2019\Onetest\LogFiles 2/19/2025 2:24:48 PM 1739993088 31 KB 3921031167 APPLICATIONS:\Microsoft Exchange 2019\Onetest /**Note** Restore this **/ 2/19/2025 2:24:50 PM 1739993090 24 KB 3904253953 APPLICATIONS:\Microsoft Exchange 2019
- Make note of the nsavetime and save set name of the database, in this case,
NOTE: to recover both database files and logfiles, restore this single save set. 2/19/2025 2:24:48 PM 1739993088 31 KB 3921031167 APPLICATIONS:\Microsoft Exchange 2019\Onetest NOTE: nsavetime name 1739993088 APPLICATIONS:\Microsoft Exchange 2019\Onetest
IMPORTANT
- Enclose the save set name in double-quotes (" ") and insert a double slash (\\") before the last double-quote (").
- Without the (\\") the command fails.
Correct Syntax nsrnmmrc -s linux1 -c exch01 -x C:\msexchange\dbs\restore -t 1739993088 "APPLICATIONS:\Microsoft Exchange 2019\Onetest\\" Incorrect nsrnmmrc -s linux1 -c exch01 -x C:\msexchange\dbs\restore -t 1739993088 "APPLICATIONS:\Microsoft Exchange 2019\Onetest"
- While the first restore is running, open another elevated command prompt with RunAs administrator. Repeat steps 1 and 2 for a second database, and any other database to restore from the command line.
- The following article also describes how to perform command-line restores in general using
nsrnmmrc
NetWorker NMM - How to perform a command-line restore of Hyper-V Exchange backups