The wbadmin.exe utility is a command line tool that allows you to create the system state backup or to backup individual drives, directories (and files) and restore data from such a backup. The wbadmin tool can be used to automate backups in all modern Windows versions (before Windows Vista, another built-in utility, NTBackup, was used to create backups on Windows).
The features of the wbadmin.exe in desktop and server versions of Windows are quite different. For example, in Windows 10, you can list the available wbadmin subcommands like this:
wbadmin 1.0 – Backup command-line tool
(C) Copyright 2013 Microsoft Corporation. All rights reserved.
- ENABLE BACKUP – create or modify scheduled backup task;
- DISABLE BACKUP – disable automatic backup job;
- START BACKUP – one-time run backup task;
- STOP JOB – stop running backup or restore task;
- GET VERSIONS – list available backups in the specified storage;
- GET ITEMS – list the items stored in the backup;
- GET STATUS – display the status of a running backup or restore task;
- DELETE BACKUP – delete backup.
To use the wbadmin utility on Windows Server 2016/2012 R2, you need to install the Windows Server Backup component using the Server Manager or PowerShell:
Install-WindowsFeature -Name Windows-Server-Backup
In Windows Server 2016, the wbadmin utility supports more options and features. Additionally supported wbadmin subcommands on Windows Server:
- GET DISKS
- GET VIRTUALMACHINES
- START SYSTEMSTATERECOVERY
- START SYSTEMSTATEBACKUP
- DELETE SYSTEMSTATEBACKUP
As you understand, the wbadmin functionality in Windows 10 is somewhat truncated, but it is quite sufficient for creating a backup copy of the Windows image and individual drives.
For example, you can create a backup of the Windows 10 operating system image, add the F: disk to the backup and write it on a drive E:
wbadmin start backup -backupTarget:E: -include:F: -allCritical –quiet
- When you create a backup, the WindowsImageBackup directory is created on the disk that is specified in the backupTarget parameter, in which the system backup image is saved;
- The include parameter allows you to specify the disks to be included to the image backup;
- The allCritical parameter is used to ensure that all partitions necessary for restoring the system (including partitions with a bootloader the BCD configuration) are added to the image backup.
When you run the backup command, you will see the progress of the backup and the list of partitions that will be contained in it.
Please note that the Windows backup system is based on the Volume Shadow Copy Service (VSS). The wbadmin utility creates a shadow copy (snapshot) of the specified volume and creates a system image backup based on this snapshot (the computer performance may decrease during backup).
You can back up multiple folders and save it to a separate drive:
wbadmin start backup –backupTarget:e: -include:c:\docs\,c:\backup -vsscopy
You can also save the backup to a shared network folder:
wbadmin start backup –backupTarget:\\srv1\backup -include:c:\docs\,c:\backup
Note. This wbadmin mode is not supported on desktop versions of Windows. When running such a command, an error will appear: A partial backup of volumes is not supported on this version of Windows.
You can create an automatic backup task that backs up a system image and specified folder or drives once a day:
wbadmin enable backup -include:c:\docs\* -addtarget:e: -allCritical -schedule:00:00
The list of available backups can be displayed with the command:
wbadmin get versions
Delete all copies except the last two (0 – delete all backups):
wbadmin delete systemstatebackup -keepversions:2
You can delete only the oldest backup copy:
wbadmin delete systemstatebackup –backupTarget:e: –deleteOldest -quiet
- Using Process Monitor (ProcMon) to Track File and Registry Changes - October 23, 2020
- Fix: Unable to Find a Default Server with Active Directory Web Services Running - October 23, 2020
- How to Fix Windows 10 Flashing Screen? - October 20, 2020