Automated Backups With the Help of Windows Scripting
(Page 1 of 4 )
I'm sure you do not need to be reminded yet again of the importance of backing up your data. Windows provides a fairly capable program to handle this (ntbackup), but who can remember to do this regularly? This article will describe how to go beyond the basic scheduling of backups by using Windows Scripting to solve some problems.
Introduction
I've long understood and advocated the importance of regular backups. Basically, I don't – and never will – trust the hard drive in my computer. I've lost a few of them over the years, and even though I've been doing backups right from the beginning, I've learned the hard way each time that there were additional files that should have been backed up.
I've managed to refine my list of necessary items, here's my list:
- My documents
- My email
- My pictures
- My Internet bookmarks
- My web applications
- Game save files
You may have others such as invoices or browser customizations (ie: FireFox extensions). It's helpful to make yourself a list.
Once you have that list, Windows 2000 and XP both provide the functionality you need to regularly backup the data. You can do this fairly simply through ntbackup.exe and Scheduled Tasks. However, as I did, you may find these two insufficient to fit your needs.
Here's the situation I had, and it's a pretty common one: I used Outlook for my email. This was great for backups, because my entire mail hierarchy was kept in one OST file. However, there was a huge problem. If Outlook was running when the scheduler tried to run the backup task, Outlook would hold onto the OST file, and the backup would fail. It would have been an enormous pain to try to remember to close Outlook in time for every backup. This could end up happening with any possible file you want to back up that is regularly kept open by an application.
I also had a second hard drive that I wanted the backup file copied to for replication, to prevent problems if the first hard drive crashed. Also, I wanted an easy to read log file, that would keep my up to date on the backup status, without me having to search through the event log.
To solve these issues I came up with a very handy VBScript that I'd like to share with you. But first things first, we have to use ntbackup to generate the necessary BKS file.
Next: Pick a File, Any File >>
More Windows Scripting Articles
More By Justin Cook