Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  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 log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Accessing Database Data with ADO

...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Two Exchange Server Tools You Should Know About

These free tools can help you troubleshoot performance problems with Exchange 2007 and Exchange 2003, and help you figure out what's going on with your servers from the transactions logs. ...


Related Events 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 Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Maximize your SharePoint Investment – 8 Cities
Discover best practices and tips for both architecting and administering SharePoint. Early Bird Price of $99 through Sept 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



Increase Application Performance
Free White Paper by Editor's Best winner, Texas Memory Systems.

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
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 Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing