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 


April 25, 2007

An "Unkludgy" Way to Back Up Files


RSS
View this exclusive article with VIP access -- click here to join |
See More Backup and Recovery Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

Q: To keep track of customer details, I use a Microsoft Access database, which has grown to about 8.9MB. I wrote a batch file that uses Robocopy to run daily backups of the database, which is on the D drive of a domain controller (DC) running Windows Server 2003. The backups are stored on a NAS device.

The batch file uses some code (weekday.com) I found on the Web to return a day of the week. As Listing 1 shows, after the batch file finds the day of the week, it uses a series of If commands to jump to code that executes Robocopy and copies the backup file to a folder named after the day of the week. The batch file then uses another script (AnalyzeRobocopyLog.vbs) I found on the Web to go through the log files generated by Robocopy and return a consolidated version. Finally, the batch file uses the Blat utility to email the backup log file to the appropriate person.

This batch file is working okay, but it's a kludge. I want to go with a different approach. I'd like the new script to rename the backup file so that it includes the current date and do away with the weekday folders. That way, there is only one backup folder. I'd also like the script to monitor the amount of free space in the backup folder and overwrite the oldest file if the size of the backup folder is at the specified size limit. I'm trying to write this new script, but I'm just learning the art of scripting. I'm interested in seeing how a scripting pro would approach writing this script.

—Emile Mercier . . .

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
The website is down because someone removed the X-Box

What happens when a manager mistakes a server for a games console. ...

Command Prompt Tricks

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

Microsoft Kills OneCare, Will Launch Free Security Solution

Microsoft on Tuesday announced that it would retire its $50-a-year security subscription product, Windows Live OneCare, and replace it with a free solution codenamed "Morro." Unlike OneCare, however, Morro will focus only on core anti-malware features and ...


Task Automation Whitepapers Essential Guide to E-discovery and Recovery for Microsoft Exchange

Continuous Data Protection and Recovery for Microsoft Exchange

Protecting (You and) Your Data with Exchange Server 2007

Related Events Check out our list of Free Email Newsletters!

Task Automation eBooks Spam Fighting and Email Security for the 21st Century

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Patch Management

Related Task Automation 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.


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 Technology Resource 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