DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
What's in store for DevOps in 2023? Hear from the experts in our "DZone 2023 Preview: DevOps Edition" on Fri, Jan 27!
Save your seat
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. What Is WBAdmin and How Does It Work?

What Is WBAdmin and How Does It Work?

Backups give peace of mind and protect against data corruption, malware infection, or ransomware attacks. Take a closer look at WBAdmin and how to use it.

Nitish Singh user avatar by
Nitish Singh
CORE ·
Aug. 26, 22 · Analysis
Like (2)
Save
Tweet
Share
7.82K Views

Join the DZone community and get the full member experience.

Join For Free

Backups are important. They give you peace of mind and protect you against data corruption, malware infection, or ransomware attacks.

Major operating system vendors come with their backup utility. Take Windows, for example: here, you get Windows Backup and Restore functionality (GUI-based) and its command-line counterpart, WBAdmin.

In this article, we’ll take a closer look at WBAdmin and learn how to use it.

What Is WBAdmin?

Microsoft’s group of operating systems comes with a handy WBAdmin command-line tool. It is made for advanced users, as it lacks any graphical user interface(GUI). With WBAdmin, you can back up or restore operating systems (OS), files, folders, volumes, and even applications.

WBAdmin commands

However, WBAdmin.exe is not available on all Microsoft systems. Currently, it is available on modern operating systems, including Windows 11 and 10. It also supports Windows 8 and Windows Vista. In servers, WBAdmin is available on Windows Server 2012 and Windows Server 2008 R2. If you’re using systems before Windows Server 2008, you need to use NTBackup, the predecessor of WBAdmin.

NTBackup: Predecessor of WBAdmin

Before we dive deep into WBAdmin features and how to use them, let’s quickly cover NTBackup, the older sibling of WBAdmin.

If you’re using any old system running Windows Server 2008, then you get NTBackup, another command-line tool with access to wizard interfaces. You can create and manage backups through task scheduler and shadow copy. It was an efficient method and primarily used the BKF file format. You’re free to store the backups in both internal and external storage.

The main difference between NTBackup and WBAdmin is the support of backup formats and destination devices. Also, they’re not compatible with each other. This means you cannot restore NTBackup’s backup files using WBAdmin. However, if you’re interested, Microsoft has provided a Windows NT Backup. This restore utility lets you work with a legacy backup.

How Does WBAdmin Work?

WBAdmin is a disk-based backup system. It uses Volume Shadow Copy Service (VSS) to take block-level system backups. It uses VHD (virtual hard disks) to store the backups, creating an exact partition/volumes mirror of the system. Also, if you’re using Windows 8 or later, WBAdmin will create VHDX backup files that offer an improvement over the VHD format, including the ability to shrink volumes quickly. Along with VHD/VHDX, WBAdmin also creates XML configuration files. Windows Disk Manager lets you mount and view the contents of the .VHD file.

Under the hood, WBAdmin uses Volume Shadow Service (VSS) to update data changes with the differencing engine on a block-by-block basis. The update can be either full or incremental; so, if a change occurs, a new block copy is pushed in the VSS while the older one is pushed out. 

For novice users, Windows offers System Backup and Restore, a graphical user interface (GUI) of WBAdmin. It simplifies the whole backup and restores the process. For workstation editions, there is a backup wizard in the control panel. Finally, we have WBAdmin.MSC, a pre-installed Windows feature that uses Windows Management Console.

WBAdmin is also capable of taking “bare-metal” backups. This means you can use the backup on systems with the same or different hardware. Moreover, you can restore the backups through Windows media installation DVD or use an external storage device with a backup copy.

WBAdmin supports two types of restorations:

  • The first is a bare-metal restore done with Windows Recovery Environment (RE) that lets you restore a complete server on similar or different hardware. 
  • In the second type, you can do a system state restore or individual file/folder through the command line.

WBAdmin Command List

WBAdmin comes with plenty of commands. Here are the most important ones that you should know. You need to put “wbadmin” in front of the commands for them to work. For example, wbadmin enable backup.

  • enable backup: It enables backups on the system and configures them.
  • disable backup: It disables backups on the system(daily).
  • get versions: It retrieves the backups list from the local machine. You can specify other locations as well.
  • start backup: Starts a one-time backup; specifying parameters tells the command what needs to be backed up. If no parameters are given, it pulls the daily backup schedule’s settings.
  • stop job: Completely stops the recovery or backup operation
  • get items: Get items within a backup.
  • get disks: Get the online disks list.
  • get status: Get the recovery or backup operation’s status.
  • start systemstaterecovery: Start the system state recovery.
  • start sysemstatebackup: Start the system backup recovery.
  • delete systemstatebackup: Delete the system state backup (one or more).
  • restore catalog: Restore the catalog from another location (if the original on the local computer is no longer available).
  • delete catalog: From the local computer, delete the catalog (can only be used when the backup catalog is corrupted or stored in a different location).
  • start sysrecovery: Starts the full system recovery.

If you need more help, then type “wbadmin /?” in the command prompt for help.

How to Use WBAdmin

To use WBAdmin, you must be part of the Administrator or Backup Operators group. If you’re not, ask your administrator to make you part of the group or give you appropriate rights to operate WBAdmin at an admin level.

Now, open the command prompt at an elevated level by right-clicking the command prompt and choosing “Run as administrator.”

Next, you can enable daily backups or modify the existing backup schedule with the following command: wbdmin enable backups.

Here, you can add parameters such as -addtarget to specify the backup destination. You can also add a schedule, include sources to back up, and tell WBAdmin to do a full backup.

Let’s see a complete command in action:

 
wbadmin enable backup -backupTarget:E: include:G: -quiet


This command does a backup of G:\ drive to E:\ drive using VSS without any prompts. You can also add a schedule using the -schedule parameter.

To create a fresh backup (not touching the old backup files), you need to use the wbadmin start backup command. 

 
wbadmin start backup -addtarget:E: include:G: -quiet


Similarly, you can run system state backup with wbadmin start systemstatebackup.

To check the available backups, you need to use wbadmin get versions.

For recovery, you have wbadmin start recovery. For example, 

 
wbadmin start recovery -version:03/12/2015 -03:25 -itemsC:\Users -backupTarget:\\22.34.52.12\backups -itemType:File -overwrite:overwrite


In the above command, you run a recovery command that overwrites the C:\Users content with the backup version 03/12/2015- 3:25. It restores a backup from \\22.34.52.12\backups.

Tips To Use WBAdmin Effectively

WBAdmin is simple to use for the person with the proper knowledge. To use it effectively, keep these points in mind:

  • WBAdmin does block-level backups of the system.
  • It uses Volume Shadow Service(VSS), which pushes blocks out for new block updates.
  • You can do both full or incremental backups with WBAdmin.
  • It is not possible to amend the built-in backup schedule. The built-in backup schedule runs a full backup, followed by 14 incremental backups.
  • WBAdmin takes care of space by removing old backups if it runs out of space to store. The newest VSS copy is retained while old VSS copies are flushed out.
  • Backups via network share only result in full backups due to the unavailability of VSS.

Conclusion: Should You Use It?

If you’re an advanced user, then you should use it. WBAdmin offers an elegant way to back up and restore files on file, folder, application, and OS level. The command-line approach may scare a few users, but also gives complete control over your backup procedure. If you’re not comfortable with WBadmin, check out the GUI version in Windows OS, which is known as Backup & Restore and Windows Server Backup. You can also use third-party solutions which offer more ease of use at a given cost (free ones are not worth your time).

Backup source control systems

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Debugging Threads and Asynchronous Code
  • A Brief Overview of the Spring Cloud Framework
  • API Design Patterns Review
  • How to Use MQTT in Java

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: