NetApp Exchange MSCS cluster SME Backup Script
This is a backup script for Microsoft MSCS Exchange Clusters running Network Appliance SnapManager for Exchange. If you don't use this environment, hit the back button because we're about to turn up the geek speak.
We deployed 5 two node MSCS clusters running Exchange 2003 using iSCSI to a Network Appliance FAS 960c cluster. Using SnapManager for Exchange, the active node runs a backup which creates a snapshot of the DB state on the front end filer. Our backup strategy is to push this snapshot to a back end NearStore device (an R200) running less expensive SATA drives. This allows for a recovery from (or on) the R200 in the unlikely event the roof fell on the front end filer cluster. The snapshot on the R200 is further dumped to a NDMP tape silo and those tapes are stored in an underground ICBM bunker somewhere.
This also serves to offload the backup processing load from the front end filers and provides a high level of redundancy.
The only gotcha in the whole backup process was a method to schedule the backups on the Exchange servers. SME is a great tool, but doesn't include cluster state awareness or a built in scheduling engine. That's where this script comes in.
This script also contains logic from my MSCS cluster health status script and will alert if cluster resources are not online.
Requirements:
- MSCS Exchange clusters. You can schedule SME backups easily under Scheduled Tasks on non-clustered Exchange servers, so this script doesn't do much for non-clustered installs.
- NetApp storage. This script doesn't distinguish between iSCSI and fiber.
- SnapManager for Exchange. This script was written against a running SME 3.1P1 environment and may require minor changes for other versions.
- Bmail or another smtp command line mailer utility.
- Environmental variables for %clustername% (the MSCS cluster name) and %exchangeVirtualName% (the Exchange virtual server name). Without these variables the script won't run as they're too hard to extract from the cluster tools available in DOS. Set them in Control Panel, System, Advanced, Environmental Variables on every node.
- Assumes your quorum drive is drive letter "Q".
- Requires the MS Resource Kit utility SC.exe (more info here).
- Requires uptime.exe from the MS Resource Kit.
- Assumes your SnapManager (SnapBackup.exe) is installed under C:\Program Files\SnapManager. Change your backup requirements settings around line 260.
Deployment:
Schedule the script to run on each physical node of your cluster with a Scheduled Task. I run Node A at 2100 hours and Node B at 2105 hours. One of the two nodes will hold the Exchange resource and run the backup, the other will find no Exchange resources and bail out. Both scripts write a log file for debug and tracking purposes, and generate SMTP alerts to major cluster issues. Have fun !
To do:
- Add further logic to view the post backup log file and detect a backup failure.
- Convert to a VBS script or executable. Batch is so oldskool.
Download the script here.
Note: This script is a sample and would require extensive customization to your specific environment and naming standards. It works like a charm and I've had it in production for nearly 2 years without issues. It catches the occasional cluster issue and alerts when there are problems. Like all script samples provided on this site, this is for your information only and the author assumes absolutely no liability for it's use. Be very careful !
Trademarks are property of original trademark owners.

The Scary Pumpkin »
Search