Home > Storage Channel Tips > Data Backup and Data Protection > Using Perl to script backup jobs
Storage Channel Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATA BACKUP AND DATA PROTECTION

Using Perl to script backup jobs


Seiji Shintaku, Contributor
09.28.2009
Rating: -3.50- (out of 5)


Storage Channel Update
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


If you do on-site storage work for your customers, from time to time you might be called on to script backup procedures. In many environments, Perl scripting works well. I've scripted backup jobs for Exchange and on an EMC Celerra using Perl and have a few tips to share.

For the Exchange job, my financial services client was using SnapManager for Exchange on a NetApp LUN. Although the Exchange server is obviously a Windows server, I decided to use Perl because the customer's Symantec NetBackup server was running Solaris and it's difficult to write something on Windows that will be used on Solaris. And since Perl is pervasive on Solaris and Linux is heavily used in financial institutions, the choice made sense.

In my client's backup of Exchange, we set SnapManager for Exchange to take several important steps:

  1. Quiesce the database (halt IO for several seconds)
  2. Flush the data to the LUN
  3. Take the snapshot
  4. Replicate data to secondary array based on the snapshot
  5. Concatenate the log files
  6. Verify the database (this can be done in a separate job)

Most financial services companies choose to offload the backup job to a secondary array, allowing them to run backups during the day without interrupting service levels for the business users. The key part of doing a successful backup is to ensure that the secondary array has a good point-in-time copy of the data. In the Exchange scenario, since NetApp uses SnapMirror to replicate the data to the secondary array, to determine when the secondary array was up to date, I looked for lag time between the replicated volumes. When the lag times of the volumes for Exchange were set to "00" on the hour field, that was my cue to kick off the backup. I set a c...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Data Protection and Backup Services
Two inroads to cloud data backup services
Data deduplication software trends; Hot, warm and cold disaster recovery site options
Storage encryption: Leaving compliance out of the discussion
How to resell cloud storage services
How to become a cloud storage services provider
Disaster recovery testing: SMB vs. enterprise
Backup design: Source-side considerations
Paragon Software's new channel partner manager to focus on training, recruitment
How to secure primary storage for life outside the data center
NetApp and Emulex prep cloud storage push; FalconStor enters storage hardware market with its NSS HC

Data Backup and Data Protection
Two inroads to cloud data backup services
Storage encryption: Leaving compliance out of the discussion
How to resell cloud storage services
How to become a cloud storage services provider
Backup design: Source-side considerations
How to secure primary storage for life outside the data center
How to develop a backup data reduction strategy for customers
EMC/Data Domain deal: How should VARs react?
Tools for virtual machine-based disaster recovery
How to solve out-of-space problems on NetApp replicated volumes

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


ounter in my Perl script to count the total number of replicated volumes and ensured all volumes were set to "00." If those conditions were met, a "touch" file would be created.

I used the same methodology for a Celerra backup to tape. The file systems were replicated via Symmetrix Remote Data Facility (SRDF) on an EMC Symmetrix DMX array, and a point-in-time copy, called a Business Continuance Volume (BCV), of the file system was created off of the secondary array. The Perl script would sit in a loop until the BCV was synchronized with the second copy of the file system; the script then split the BCV for a point-in-time copy. Once the volumes were split off, the script created a touch file.

In the case of both the Exchange server backup or the Celerra backup, the touch file was the cue for the backup server to initiate the backup job of the volumes. The batch processing server would have a job running for hours each night looking for this touch file. Once it saw the touch file, the batch processing server would kick off the backup of the application or file system. (If the batch processing server didn't see the touch file during the nightly backup period, the Perl script would instruct it to exit with a failed exit code and send a notification to the backup operators to let them know that the process had failed.)

About the author

Seiji Shintaku is a principal consultant for RTP Technology. Before joining RTP Technology, he was global NetApp engineer for Lehman Brothers, Celerra and DMX engineer for Credit Suisse First Boston, principal consultant for IBM, and global Windows engineer for Morgan Stanley. RTP Technology is a VAR for storage-related products and professional services for NetApp, EMC, F5, Quantum, VMware and Brocade. He can be reached at sshintaku@rtptech.com.

Rate this Tip
To rate tips, you must be a member of SearchStorageChannel.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsMultimediaWhite PapersBlogsEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts