Wednesday, January 16, 2013

Can't suspend backups with wbadmin

Did you know that Windows Server 2008 and later include a new wbadmin.exe that replaces ntbackup.exe.

Thank goodness, right? Because ntbackup.exe fostered the creation of a whole backup software industry based on its inadequacy as a backup tool.

Having used wbadmin.exe, I have to say, I was initially impressed with Microsoft's renewed commitment to bringing universal OS and server features that should be part of the OS back under the auspices of the OS designer.

The fact that basic backup had to be outsourced to a 3rd party software vendor was silly in the first place. Linux for example includes LVM2 to do snapshotting already, and so many adequate backup tools like rsync, rsnapshot, dd readily available.

I'll go into wbamin in another post but for the time being I wanted to point out that while testing other backup software it's impossible to suspend wbadmin from doing its thing.

Even in the CLI, you simply can't pause backups. Look in the Task Scheduler, and you'll find no mention that wbadmin is even set to run at all!

In fact the only way to preemptively cancel Windows Server Backup is to delete the entire backup schedule, at which point your previous backups are kept until you go to start the schedule again and Windows will format and delete your accumulated backups on the fixed disk you have been using! Talk about unintuitive and dangerous!

So basically you can't suspend backups at all with wbadmin. Your only option if you don't want to lose your backup history is to wait until the scheduled job start, and issue 'wbadmin stop job' at the CLI, and you must remember to do this shortly after every scheduled backup starts!

Here are some pointers to MS:
  • Include webadmin in the Task Scheduler
  • Allow suspension of backup plan in the GUI or at least CLI
    • and as an extension, don't delete the previous backups and require running the backup wizard from scratch again
  • Warn the user with a taskbar warning or something when backup is suspended

And for you, faithful sysadmin, keep on your toes, make sure wbadmin has got your back.

2 comments:

  1. I am using wbadmin on several servers. Backup to USB drives works great and I'm glad to be off of Symantec System Recovery where I could never quite get a good system down pat with USB drives as the backup medium.

    I do 100% agree with you about 'pause' and modifying an existing scheduled backup.

    How about this: I needed to change the time of a scheduled backup from 3:00 am to 4:30 pm so I had to totally delete my existing plan, create a new plan with the new time and then reinitialize my 6 backup drives to work with the new plan, that reinitialize deleted all my existing backups! The GUI is ridiculous for setting up a backup plan but I have developed a batch file with a series of wbadmin commands that allow me to create a new backup plan and add several backup drives to the plan and later I can use the same batch file to add additional drives to the plan.

    The one redeeming quality of wbadmin is that once setup it runs great night after night and of course it's included with the OS.

    Here is my batch file which must be run from and elevated command prompt:

    c:\windows\system32\schedbu.cmd

    @echo off
    cls
    if %1.==disable. goto startnew
    if %1.==. goto usage2

    WBADMIN ENABLE BACKUP -addtarget:%1 -quiet
    goto end

    :startnew
    if %2.==. goto usage1
    WBADMIN DISABLE BACKUP -quiet
    WBADMIN ENABLE BACKUP -addtarget:%2 -schedule:03:00,13:00 -include:c:,d:,f: -allCritical -vssFull -quiet
    goto end

    :usage1
    cls
    echo Usage %0 disable {5a94f954-0000-0000-0000-000000000000}
    WBADMIN get disks
    goto end

    :usage2
    cls
    WBADMIN get disks
    echo To add additional USB drives to existing backup
    echo Usage: %0 {6a94f954-0000-0000-0000-000000000000}
    echo.
    echo or to initialise and add the first USB backup drive
    echo Usage: %0 disable {6a94f954-0000-0000-0000-000000000000}
    goto end

    :end

    ReplyDelete
  2. I agree wholly with your comment about how reliable it is. I'm testing out some other products right now, Idera Server Backup, ShadowProtect, Symantec System Recovery (SSR). They renamed Symantec Backup Exec System Recovery to something sensibe thank the stars.

    Ack! and you're spot on about the fact that in Microsoft's terrible promotion of "wizards" since Windows 95 I've gotta recreate jobs through a 10-page wizard because as a sysadmin I certainly can't be trusted with right clicking on a job in the job list and selecting "Schedule". I'm trying not to be personally offended.

    Your script clues me into the fact that wbadmin.exe uses UUIDs to map to backup volumes, something SBESR or SSR could not handle (I think they used drive letters?) It's something magical that I saw for the first time in /etc/fstab in some Linux distro (Arch?) many years ago.

    wbadmin.exe at least can manage pruning automatically, transparently and never runs into the problem of "Disk is full, so I'm going to silently fail so you panic a year from now when you desperately need to recover data." These other products don't seem to have this fluidity, they insist on setting hard numbers like "keep 40 copies", but what if you never have enough space for 40 copies?

    I'll be writing another followup on wbadmin.exe addressing some other shortcomings I've run into, namely lack of a notification framework, and lack of support for network destinations. I'm also doing a writeup on Idera Server Backup, ShadowProtect, and the new SSR 2013.

    ReplyDelete