Restore System State to Windows Server
This article explains how to restore Windows Server System State backups from an Azure Recovery Services vault. To restore System State, you must have a System State backup (created using the instructions in Back up System State, and make sure you have installed the latest version of the Microsoft Azure Recovery Services (MARS) agent. Recovering Windows Server System State data from an Azure Recovery Services vault is a two-step process:
Restore System State as files from Azure Backup. When restoring System State as files from Azure Backup, you can either:
- Restore System State to the same server where the backups were taken, or
- Restore System State file to an alternate server.
Apply the restored System State files to a Windows Server.
Recover System State files to the same server
The following steps explain how to roll back your Windows Server configuration to a previous state. Rolling your server configuration back to a known, stable state, can be extremely valuable. The following steps restore the server's System State from a Recovery Services vault.
Open the Microsoft Azure Backup snap-in. If you don't know where the snap-in was installed, search the computer or server for Microsoft Azure Backup.
The desktop app should appear in the search results.
Click Recover Data to start the wizard.
On the Getting Started pane, to restore the data to the same server or computer, select This server (
<server name>) and click Next.
On the Select Recovery Mode pane, choose System State and then click Next.
On the calendar in Select Volume and Date pane, select a recovery point.
You can restore from any recovery point in time. Dates in bold indicate the availability of at least one recovery point. Once you select a date, if multiple recovery points are available, choose the specific recovery point from the Time drop-down menu.
Once you have chosen the recovery point to restore, click Next.
Azure Backup mounts the local recovery point, and uses it as a recovery volume.
On the next pane, specify the destination for the recovered System State files and click Browse to open Windows Explorer and find the files and folders you want. The option, Create copies so that you have both versions, creates copies of individual files in an existing System State file archive instead of creating the copy of the entire System State archive.
Verify the details of recovery on the Confirmation pane and click Recover.
Copy the WindowsImageBackup directory in the Recovery destination to a non-critical volume of the server. Usually, the Windows OS volume is the critical volume.
Once the recovery is successful, follow the steps in the section, Apply restored System State files to the Windows Server, to complete the System State recovery process.
Recover System State files to an alternate server
If your Windows Server is corrupted or inaccessible, and you want to restore it to a stable state by recovering the Windows Server System State, you can restore the corrupted server's System State from another server. Use the following steps to the restore System State on a separate server.
The terminology used in these steps includes:
- Source machine – The original machine from which the backup was taken and which is currently unavailable.
- Target machine – The machine to which the data is being recovered.
- Sample vault – The Recovery Services vault to which the Source machine and Target machine are registered.
Backups taken from one machine cannot be restored to a machine running an earlier version of the operating system. For example, backups taken from a Windows Server 2016 machine can't be restored to Windows Server 2012 R2. However, the inverse is possible. You can use backups from Windows Server 2012 R2 to restore Windows Server 2016.
Open the Microsoft Azure Backup snap-in on the Target machine.
Ensure that the Target machine and the Source machine are registered to the same Recovery Services vault.
Click Recover Data to initiate the workflow.
Select Another server
Provide the vault credential file that corresponds to the Sample vault. If the vault credential file is invalid (or expired), download a new vault credential file from the Sample vault in the Azure portal. Once the vault credential file is provided, the Recovery Services vault associated with the vault credential file appears.
On the Select Backup Server pane, select the Source machine from the list of displayed machines.
On the Select Recovery Mode pane, choose System State and click Next.
On the Calendar in the Select Volume and Date pane, select a recovery point. You can restore from any recovery point in time. Dates in bold indicate the availability of at least one recovery point. Once you select a date, if multiple recovery points are available, choose the specific recovery point from the Time drop-down menu.
Once you have chosen the recovery point to restore, click Next.
On the Select System State Recovery Mode pane, specify the destination where you want System State files to be recovered, then click Next.
The option, Create copies so that you have both versions, creates copies of individual files in an existing System State file archive instead of creating the copy of the entire System State archive.
Verify the details of recovery on the Confirmation pane, and click Recover.
Copy the WindowsImageBackup directory to a non-critical volume of the server (for example D:). Usually the Windows OS volume is the critical volume.
To complete the recovery process, use the following section to apply the restored System State files on a Windows Server.
Apply restored System State on a Windows Server
Once you have recovered System State as files using Azure Recovery Services Agent, use the Windows Server Backup utility to apply the recovered System State to Windows Server. The Windows Server Backup utility is already available on the server. The following steps explain how to apply the recovered System State.
Use the following commands to reboot your server in Directory Services Repair Mode. In an elevated command prompt:
PS C:\> Bcdedit /set safeboot dsrepair PS C:\> Shutdown /r /t 0
After the reboot, open the Windows Server Backup snap-in. If you don't know where the snap-in was installed, search the computer or server for Windows Server Backup.
The desktop app appears in the search results.
In the snap-in, select Local Backup.
On the Local Backup console, in the Actions Pane, click Recover to open the Recovery Wizard.
Select the option, A backup stored in another location, and click Next.
When specifying the location type, select Remote shared folder if your System State backup was recovered to another server. If your System State was recovered locally, then select Local drives.
Enter the path to the WindowsImageBackup directory, or choose the local drive containing this directory (for example, D:\WindowsImageBackup), recovered as part of the System State files recovery using Azure Recovery Services Agent and click Next.
Select the System State version that you want to restore, and click Next.
In the Select Recovery Type pane, select System State and click Next.
For the location of the System State Recovery, select Original Location, and click Next.
Review the confirmation details, verify the reboot settings, and click Recover to apply the restored System State files.
Special considerations for System State recovery on Active Directory server
System State backup includes Active Directory data. Use the following steps to restore Active Directory Domain Service (AD DS) from its current state to a previous state.
- Restart the domain controller in Directory Services Restore Mode (DSRM).
- Follow the steps here to use Windows Server Backup cmdlets to recover AD DS.
Troubleshoot failed System State restore
If the previous process of applying System State does not complete successfully, use the Windows Recovery Environment (Win RE) to recover your Windows Server. The following steps explain how to recover using Win RE. Use This option only if Windows Server does not boot normally after a System State restore. The following process erases non-system data, use caution.
Boot your Windows Server into the Windows Recovery Environment (Win RE).
Select Troubleshoot from the three available options.
From the Advanced Options screen, select Command Prompt and provide the server administrator username and password.
Provide the server administrator username and password.
When you open the command prompt in administrator mode, run following command to get the System State backup versions.
Wbadmin get versions -backuptarget:<Volume where WindowsImageBackup folder is copied>:
Run the following command to get all volumes available in the backup.
Wbadmin get items -version:<copy version from above step> -backuptarget:<Backup volume>
The following command recovers all volumes that are part of the System State Backup. Note that this step recovers only the critical volumes that are part of the System State. All non-System data is erased.
Wbadmin start recovery -items:C: -itemtype:Volume -version:<Backupversion> -backuptarget:<backup target volume>
- Now that you've recovered your files and folders, you can manage your backups.