How to Set Up Windows Server Backup on Windows Server 2012 R2
Windows Server Backup (WSB) is the built-in backup solution included with Windows Server 2012 R2. It provides a straightforward mechanism for protecting your server data through full server backups, system state backups, and individual volume or folder backups. While not as feature-rich as third-party enterprise backup solutions, WSB is reliable, cost-free, and tightly integrated with the Windows operating system and the Volume Shadow Copy Service (VSS). This guide walks through the complete setup and configuration of Windows Server Backup, including scheduled backups, backup destinations, and verification procedures.
Prerequisites
Before configuring Windows Server Backup, ensure the following prerequisites are in place:
You must be logged in as a member of the local Administrators or Backup Operators group. Windows Server 2012 R2 with all current updates applied is assumed. A dedicated backup destination should be available — this can be a locally attached disk, a network share (UNC path), or a remote shared folder. The backup destination disk should be formatted as NTFS and should not be the same volume as the data being backed up. Ensure the Windows Server Backup feature is installed (it is not installed by default on Server Core or minimal installations).
Step 1: Install the Windows Server Backup Feature
Windows Server Backup must be installed via Server Manager or PowerShell before it can be used. Open PowerShell as Administrator and run:
Install-WindowsFeature Windows-Server-Backup -IncludeManagementTools
Verify installation:
Get-WindowsFeature Windows-Server-Backup
The output should show the feature with an install state of “Installed”. You can also install via Server Manager by navigating to Add Roles and Features, then selecting Windows Server Backup under Features.
Step 2: Configure a Backup Using the GUI
Open Server Manager, click Tools, and select Windows Server Backup. In the left pane, click Local Backup. In the Actions pane on the right, click Backup Schedule to launch the Backup Schedule Wizard, or click Backup Once for an immediate one-time backup.
The wizard will prompt you to choose between a Full Server backup (which includes all volumes, system state, applications, and the BMR information) or a Custom backup where you select specific volumes, folders, or the system state individually. For most production servers, Full Server backup is recommended as it ensures bare metal recovery is possible.
Next, choose backup timing. For scheduled backups, you can specify one or more times per day. Common production schedules run backups at 11:00 PM or midnight to minimise performance impact during business hours.
For the backup destination, you have three options: a dedicated hard disk (recommended for performance and backup isolation), a volume on a shared storage device, or a remote shared folder. Select the destination appropriate for your environment.
Step 3: Configure Backup Using WBADMIN Command Line
For scripting and automation, the wbadmin command-line tool provides full control over backup operations. To start an immediate full server backup to a network share:
wbadmin start backup -backupTarget:\FileServer01BackupsWS2012R2 -allCritical -systemState -quiet
To back up a specific volume (e.g., D:) to a local disk (E:):
wbadmin start backup -backupTarget:E: -include:D: -quiet
To schedule a daily full backup using wbadmin:
wbadmin enable backup -addtarget:\FileServer01Backups -schedule:23:00 -allCritical -systemState -quiet
To list all backup versions stored in a location:
wbadmin get versions -backupTarget:\FileServer01Backups
Step 4: Configure Backup via PowerShell
PowerShell provides the most powerful and scriptable interface for Windows Server Backup. First, import the backup module:
Import-Module WindowsServerBackup
Create a new backup policy object:
$policy = New-WBPolicy
Add a backup location (network share):
$networkPath = New-WBBackupTarget -NetworkPath "\FileServer01Backups" -Credential (Get-Credential)
Add-WBBackupTarget -Policy $policy -Target $networkPath
Add volumes to back up (all critical volumes):
Add-WBBareMetalRecovery -Policy $policy
Add-WBSystemState -Policy $policy
Set the backup schedule (daily at 11:00 PM):
Set-WBSchedule -Policy $policy -Schedule 23:00
Enable VSS full backup (recommended for application-consistent backups):
Set-WBVssBackupOption -Policy $policy -VssBackupType WBVssFullBackup
Save and apply the policy:
Set-WBPolicy -Policy $policy
Retrieve the current backup policy to verify settings:
Get-WBPolicy
Step 5: Perform and Monitor a Backup Job
To start a manual backup based on the configured policy:
Start-WBBackup -Policy (Get-WBPolicy)
Monitor the status of a running backup:
Get-WBJob
Check the backup summary after completion:
Get-WBSummary
Review backup event logs for errors or warnings:
Get-WinEvent -LogName "Microsoft-Windows-Backup" | Select-Object TimeCreated, LevelDisplayName, Message | Format-List
Step 6: Configure Backup Retention
When using a dedicated disk as the backup target, Windows Server Backup manages retention automatically by overwriting the oldest backup when space runs low. For network share targets, you need to manage retention manually or via scripts.
To delete a specific backup version from a network share:
wbadmin delete backup -version:05/10/2026-23:00 -backupTarget:\FileServer01Backups -quiet
To keep the last 7 backup versions and delete older ones, use a PowerShell cleanup script that retrieves all versions and removes those beyond a defined retention count:
$versions = wbadmin get versions -backupTarget:\FileServer01Backups | Select-String "Backup time:"
$keepCount = 7
if ($versions.Count -gt $keepCount) {
$toDelete = $versions | Select-Object -First ($versions.Count - $keepCount)
foreach ($v in $toDelete) {
$date = ($v.ToString() -split ": ")[1].Trim()
wbadmin delete backup -version:$date -backupTarget:\FileServer01Backups -quiet
}
}
Step 7: Verify Backup Integrity
A backup is only valuable if it can be restored successfully. Periodically test restores in a non-production environment. To perform a test file recovery from a backup:
wbadmin start recovery -version:05/10/2026-23:00 -itemType:File -items:"C:ImportantDatareport.docx" -recoveryTarget:"C:TestRestore" -skipBadClusterCheck -quiet
To recover an entire volume:
wbadmin start recovery -version:05/10/2026-23:00 -itemType:Volume -items:D: -recoveryTarget:E: -quiet
Verify the Windows Server Backup event log for backup success or failure events. Event ID 4 indicates a successful backup, while Event ID 5 indicates a failure. Set up a Windows Task Scheduler task or email alert to notify administrators of backup failures.
Step 8: Configure Email Alerts for Backup Failures
Create a PowerShell script that checks the last backup status and sends an email if it failed:
$summary = Get-WBSummary
if ($summary.LastBackupResultHR -ne 0) {
$smtpServer = "smtp.yourdomain.com"
$from = "[email protected]"
$to = "[email protected]"
$subject = "ALERT: Windows Server Backup Failed on $env:COMPUTERNAME"
$body = "Last backup failed at $($summary.LastBackupTime). Error: $($summary.LastBackupResultHR)"
Send-MailMessage -SmtpServer $smtpServer -From $from -To $to -Subject $subject -Body $body
}
Schedule this script to run daily after the expected backup completion time using Task Scheduler.
Summary
Windows Server Backup on Windows Server 2012 R2 provides a robust, no-cost backup solution suitable for small to mid-sized environments. By combining WSB with VSS for application-consistent backups, wbadmin for command-line control, and PowerShell for automation and alerting, you can build a reliable backup strategy. Always test restores regularly, monitor backup logs, and ensure backup destinations are adequately sized and secured. For larger environments or more advanced features such as deduplication and centralised management, consider supplementing WSB with Azure Backup or a full enterprise backup solution like System Center Data Protection Manager.