By Ivy / Last Updated June 17, 2020

Overview of Wbadmin commands

Wbadmin is a built in command-line tool for Windows Vista/7/8/10 and Windows Server 2008/2008 R2/2012. It replaces previous command line utility, NTBackup and allows you to backup or recover operating system (OS), drive volumes, computer files and folders, apps from an elevated command prompt.

The backup files are saved as Microsoft’s Virtual Hard Disk (.VHD) files with some accompanying .xml configuration files. And this file can be mounted in Windows Disk Manager.

Specificly, with the help of Wbadmin, you can enable, create, restore, disable, stop, delete backup, and get information of backup and its content. For the detailed WBadmin syntax and explanation, you can refer to the Microsoft TechNet website.

Then, scroll down to the following parts and learn all instructions related to Wbadmin backup Windows Server 2012 and restore.

Create Windows Server 2012 backup with Wbadmin

Example 1: To do a bare metal backup to E: drive with the following command:

wbadmin start backup -backuptarget:e: –include:c: -allcritical -systemstate -vssfull

Wbadmin Bare Metal Backup

Note: The -allcritical switch will include all items for a bare metal recovery. Whether you add -systemstate switch or not, it makes no differences to what will be included in the backup, leaving you the option to run a system state recovery without restoring the whole server.

Example 2: To create a backup that includes C: drive and Video folder on D: drive to the network drive:

wbadmin start backup -include:c:,d:\video -backuptarget:\\\backup -user:1 -password:1 -quiet

1. When you specify more than one item with -include: switch, use commas to separate them without space.
2. The -user and -password switch is needed when specifying a network location as the backup target.
3. The -quiet switch means this backup will run without prompts to you.
4. You can also specify more than one times of a day to run the backup.

Example 3: To start a Windows Server 2012 hyper-v backup for virtual machine, and save it to C drive:

wbadmin start backup –backuptarget:c: –hyperv: “Server 1”

Example 4: To create a daily scheduled system state backup to G: drive:

wbadmin enable backup -addtarget:g: -systemstate -schedule:06:44

Note: The -schedule switch is to specify the time to run the WBadmin scheduled backup.

Restore Windows Server 2012 with Wbadmin command

To perform bare metal recovery, you need to boot into Windows Recovery Environment and open command prompt.

Example 1: To restore a backup created on June 17, 2020 at 04:41, and saved on E drive, type as follow.

wbadmin start sysrecovery –version: 06/17/2020-04:41 –backuptarget:e: -machine: Server 1

Wbadmin Bare Metal Recovery

1. To restore a backup, you need to get backup version identifier, backup location, type the following commands. Please note the drive letter may change under Windows RE, so GUID-based path will be better choice.
• To find out the backup version identifier: wbadmin get versions –backup target: <location to save backup>
• To get the volume GUID-based path, mountvol
2. To list items of a backup, wbadmin get items –version: <backup version identifier> -backuptarget: <location to save backup>
3. -machine: the paramether is only used when you backup multiple computer to the same backup target.

Example 2: To restore a backup on network location, run the following command.

wbadmin start recovery –version: 06/17/2020-05:33 –backuptarget: \\\backup -machine: Server 1

Example 3: To restore hyper-v backup created on June 17, 2020 at 06:28, and the backup location is E: drive, type as the following command.

wbadmin start recovery –version:06/17/2020-06:28 –itemtype:hyperv –items:”Server 1” -backuptarget:e:

Example 4: To restore a system state backup created on June 17, 2020, at 06:44, and saved on E drive, type the following commands.

wbadmin start systemstaterecovery -version:06/17/2020-06:44 –backuptarget:e:

Note: If you want to specify the backup location, you could add –backupTarget paramether.

Delete Windows Server 2012 backup with Wbadmin

To delete old backup on Windows Server 2012, you need to know three parameters in the following. It can be applied on system state backup and non-system state backup.

  • [-version]: to delete specific version(s)

  • [-keepVersions]: to delete all backups but the specified versions

  • [-deleteOldest]: to delete the oldest backup

Example 1: To delete non-system state backup taken on June 17, 2020 at 06:22, and saved to E drive, copy and paste the command below.

wbadmin delete backup -Version: 06/17/2020-06:22,-backupTarget:e:

Wbadmin Delete Backup

Example 2: To delete all system state backup on E drive except the latest three versions, run the command below.

wbadmin delete systemstatebackup -keepVersions:3 -backupTarget:e:

Windows Server 2012 backup software – alternative to Wbadmin

Wbadmin command line utility is very convenient for users who know how to use it, but it does have some limitations. For example, only volumes formatted with NTFS can be used and it is not possible to run weekly scheduled backup or less frequent. This is why I recommend you Windows Server 2012 Wbadmin commands alternative.

AOMEI Backupper Server is an GUI interface backup and restore software for server-based operating system, including 2012/2012 R2/2016/2016 R2/2019 and all previous versions. Compared with Wbadmin, it has more backup options and less restrictions.

  • Support multiple backup types, containing system backup, file backup, disk backup, partition backup, file sync.

  • Support many useful backup settings, such as, daily/weekly/monthly backup, incremental and differential backup, event triggers, USB plug in, file filter, and more.

  • Support partitions or disks formatted with all file system, not just NTFS, such as, FAT 32, FAT16, EXT2, and EXT3.

  • Support any detected storage, for example, internal/external hard disks, solid state drives (SSD), USB flash drives, pen drives, hardware RAID array, dynamic disk, and network shared location.

Now, let’s have a closer look at AOMEI Backupper Server.

To create a disk backup, for example, you need to download and open this software, click “Backup” and “Disk Backup”, then select the backup disk and destination path, finally click “Start Backup”. To create system backup, partition backup, or file backup, click the corresponding backup type as instead.

Backup Windows Server 2012

To create a schedule backup, click “Schedule” in the main page of corresponding backup type and then select one or more backup settings.

  • Daily/weekly/monthly backup: These backup settings allow you to backup system, disk, partition and files at a regular basis, so your will never miss any changes, such as, modified files and newly installed programs.

  • USB plug in: This feature will automatically backup your files from or to USB flash drive when connected to your computer. The premise is to create a schedule backup with USB plugged in first.

  • Event triggers: This feature gives you a choice to backup/sync at specific events, such as, system startup, system shutdown, user logon, user logoff.

  • Incremental or differential backup: Both features only backup changed or newly added data instead of backing up all data every time.

Schedule Settings General

Incremental Backup or Differential Backup

To delete file backup or other backup when backup disk full, click “Scheme” and select a backup strategy based on your needs. It can help you save backup disk space while keeping some of the latest backup versions.

Delete Backup Image with Scheme

To restore backup created by AOMEI Backupper, click “Restore” and “Select Task” or “Select Image File”, then choose an image backup and destination, finally click “Start Restore”. If your computer is unbootable, you need to create a Windows Server 2012 recovery disk on a working computer first.

Restore Windows Server 2012 Backup

For advanced users, AOMEI Backupper also provides you a command line utility AMBackup.exe to backup Server 2012 and other operating system, then restore it when needed. Compared with Wbadmin, it’s very easy to understand.

Beside backup and restore features, this software still offers users disk clone, system clone and partition clone. The previous two methods allow you to boot Windows with the cloned hard drive without restoration.

Wrapping things up

That's all for how to backup and restore Windows Server 2012 with Wbadmin commands. Please note that backup target must be the same hard disk. Also, if you want to delete old backups, you can use wbadmin delete backup command above.

Wbadmin is very useful for users who know how to use. But if you are not familiar with this command line tool or want an easier way, you'd could consider using AOMEI Backupper.

It can backup disk, system, partition and files effortlessly. Also, more advanced features are included, for example, incremental backup, USB plug in, daily/weekly/monthly backup, scheme etc. Then, you can restore your computer, even with dissimilar hardware, thanks to the universal restore feature.