Saturday, March 5, 2011

Backup script

This script can be scheduled to run automatically to backup all or some of your local drives. It is self contained, and customizable.

All files that are backed up are logged to a logfile within the backup directory. The logfile opens automatically upon completion of backup. This has been tested on Windows Vista/Windows 7, but should work on most windows systems. Some functions have changed with the different Windows versions, so minor debugging may be necessary for previous versions.

The Source and Destination can be customized per directory, and should work fine with UNC names as well as mapped network drives. If scheduling this to run automatically, you should consider removing the START /MAX NOTEPAD LOGFILE line to prevent Notepad from opening under the Scheduler account. Also keep in mind that anything run ad a scheduler account may not have access to mapped network drives, or UNC paths.

The script uses XCOPY switches to copy only the files that have been created or changed since the last backup. If you would like multiple copies of a backup, consider appending %DATE% to the destination path.

No comments:

Post a Comment