Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


August 2005

Scripts Save Small Company Some Considerable Cash

Administrator Bill Stewart soups up NTBackup with a set of scripts
RSS
Subscribe to Windows IT Pro | See More Backup and Recovery Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    When Good Scripts Go Bad

Experienced IT professionals know there's much more to a server OS upgrade than just putting in a CD-ROM and running an installation program. The success of a server OS upgrade depends on careful planning. When it came time to migrate French Mortuary's servers from to Windows NT 4.0 to Windows Server 2003, I needed to evaluate the hardware and software currently running on the servers to make sure they would work with the new OS.

A crucial part of any production server is its backup hardware and software. Before I came to work for French Mortuary, the company had licensed VERITAS Software's Backup Exec for use on NT 4.0 servers because NT 4.0's backup utility didn't meet its needs. The company's servers are scattered in several locations throughout the city, and each server has a standalone tape drive. Remotely connecting to each server to check the backup status was time-consuming, so I used Backup Exec's notification feature to keep me informed by email.

When it came time for the migration, I ran into a problem: The Backup Exec version being used wasn't compatible with Windows 2003. An upgrade to a new version would be necessary. However, because seven Backup Exec licenses were involved, the upgrade would've cost almost $4000—a significant investment for a small company that would have put us over budget in software licensing costs. In management's mind, this was a hidden cost related to the server OS migration.

Previously, I hadn't given much thought to using Windows 2003's built-in backup utility, NTBackup, because I had been using Backup Exec. Plus, my previous experience with NTBackup as well as comments I had read in newsgroups and Web forums didn't give me a positive impression of the utility. But because of the high costs involved in upgrading our backup software, I decided to give NTBackup another try.

NTBackup works closely with a core OS service called Removable Storage, which provides a software interface for managing the tape drive and its associated media. NTBackup also works alongside the Task Scheduler service to provide a wizard-based scheduling capability. However, the online Help files and product documentation provide only a cursory explanation of the NTBackup utility and its interactions with the Removable Storage and Task Scheduler services. Getting scheduled backups to work the way I wanted was, at first, an exercise in frustration.

Some of this frustration is related to our company's backup requirements. Each remote location has a person responsible for inserting the correct tape for the nightly backup. For various reasons, the tapes sometimes don't get changed. NTBackup's built-in scheduling feature requires you to select a specific tape for a backup job. If that tape isn't available when the backup job starts, the backup will simply abort. This behavior isn't acceptable in our environment. We need the backup to continue, even if it overwrites the previous day's tape.

NTBackup doesn't have an option for overwriting an arbitrary tape from its scheduling GUI. I found that you can overwrite a tape by modifying the NTBackup command line to include the /um option. However, NTBackup also then applies a new media label to the tape, which would disrupt our media-labeling scheme. In our case, the label on the outside of the tape must match the tape's media label in the NTBackup GUI. Ideally, I wanted NTBackup to somehow identify the currently inserted tape and use it in a backup. This would give me the ability to overwrite a tape with a new backup without changing its media label or append a new backup to the currently inserted tape.

After doing some research, I found that Windows 2003 has a cryptic command-line utility called Rsm for managing the Removable Storage database. I set out to discover how the Rsm utility works, what capabilities it provides, and how it represents the contents of the Removable Storage database. This proved challenging because the database layout is undocumented. Using the Rsm utility to navigate through the Removable Storage database from the command line is a tedious exercise in cut-and-paste because the database objects are represented by 32-character globally unique identifiers (GUIDs).

One of the difficulties in scripting the Rsm utility is that the Removable Storage database GUIDs are database-specific and are different for different servers. However, I discovered it's possible, given the tape drive's friendly name, to determine the inserted tape, its name, and its GUID.

Armed with this knowledge of the Removable Storage database and the Rsm utility, I created a set of backup scripts that makes NTBackup easier to schedule. To simplify deployment to multiple servers, only a single configuration script needs to be updated to reflect server-specific information, such as the tape drive's name. In addition, the backup scripts can email and/or print the backup log after the backup completes. You can read about the scripts and how to use them in "Want a Flexible Automated Backup Solution?" February 2005, InstantDoc ID 44990.

As the backup scripts demonstrate, scripting can solve real business problems. IT shops aren't known for generating revenue, but they can cut costs. In this case, by using scripts to enhance a core OS tool, I saved my company $4000 in licensing costs, which is significant given that we're a small company with fewer than 100 full-time employees. And based on the feedback I've received, the automated backup system is working flawlessly.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Backup – The Backbone of Your Business

Disk-to-Disk Grows Up

Effectively Shrinking Your Backup Window – with CA ARCserve Backup Data De-duplication and the Riverbed Steelhead Appliance

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement