Use Wbadmin to Perform Windows Server 2012 Backup and Recovery

Posted by @Cody

January 20, 2016

Learn how to use Wbadmin in Windows Server 2012 (R2) to create backups from command prompt.

Wbadmin features in Windows Server 2012

Wbadmin is a built in feature that allows you to backup or recover operating system (OS) and other items from an elevated command prompt. In Windows Server 2012, you can use the WBadmin backup features more flexibly. You can specify small items like folders and files besides volumes. It allows you to delete backups directly using Wbadmin delete backup command instead of deleting snapshots. All the available functions of WBadmin Windows Server 2012 are listed as the following:

Wbadmin start backup – to create a one-time non-system state backup (a backup of the volumes, applications, files, or folders)

Wbadmin start systemstatebackup – to create a system state backup

Wbadmin start recovery – to start a non-system state recovery

Wbadmin start systemstaterecovery – to start a system state recovery

Wbadmin enable backup – to modify the existing scheduled backup or create a new scheduled backup.

Wbadmin disable backup – to disable a scheduled backup task.

Wbadmin stop job – to terminate the backup or recovery job in process

Wbadmin get versions – to display the information of all backups on the computer

Wbadmin get items – to show the included contents of a backup

Wbadmin get disks – to list all the online disks

Wbadmin get virtualmachines – to list all the Hyper-V virtual machines

Wbadmin delete systemstatebackup – to delete specified system state backup(s)

Wbadmin delete backup – to delete one or more backups

Create backups in Windows Server 2012 WBadmin

In Windows Server 2012, you can specify all kinds of items in a backup including word documents, emails, contacts, and folders. You can choose Windows Server Backup or WBadmin to create backups. To create backups with WBadmin, you only need to type a command in an elevated command prompt. For the detailed WBadmin syntax and explanation, you can refer to the Microsoft TechNet website. There are many of them, but generally, you only a few to create backup jobs. Here are some WBadmin examples that you can use for backup and restore.

To do a bare metal backup to E: drive:

WBadmin start backup -backuptarget:E: –include:C: -allcritical -systemstate -vssfull

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.

Create System Backup Image

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

WBadmin start backup -include:C:,D:\Video -backupTarget:\\192.168.1.222\backup -user:1 -password:1 -quiet

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

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

WBadmin enable backup -addtarget:G: -systemstate -schedule:00:00

The -schedule switch is to specify the time to run the WBadmin scheduled backup. You can also specify more than one times of a day to run the backup.

It is convenient to create backups with WBadmin for people 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. If you are not contented with WBadmin backup in windows server 2012, you can use a third party backup tool for Windows Server.

Backup software for Windows Server

AOMEI Backupper Server is an easy-to-use Windows Server backup software that allows you to create backups with more options and fewer restrictions. It supports system backup, file/older backup, disk backup, partition backup, incremental and differential backup, it supports partitions formatted with FAT 32, FAT16, EXT2, and EXT3 besides NTFS to be included in a backup, and it supports internal/external hard disks, solid state drives (SSD), USB flash drives, pen drives, hardware RAID array, dynamic disk, and network shared location for backup target location. With its intuitive interface, things regarding backup and restore become more easily and smoothly.

AOMEI Backupper

When you configure a backup, you can set a schedule to run the full/incremental/differential backup daily/weekly/monthly.

Schedule Backup

To avoid worrying backup disk full, AOMEI Backupper allows you to enable Disk Space Management to automatically delete old backups in five different ways. Additionally, there are even more settings for a backup task, such as adding comments, splitting the image into multiple small files, encryption protection, compression level, email notification, etc.

Like WBadmin windows server 2012, AOMEI Backupper also provides the AMBackup.exe utility that gives you the ability to run backup or recovery form command line. You can also write a script (.bat file) to perform unattended tasks. Besides backup and restore, it has many other useful features such as System Clone, File Sync, AOMEI PXE Tool, and Bootable Media. You can free download it to have a 30-day trial.