Windows Shell Scripting
When a script is to perform a major IT undertaking such as data migration, you need to write a script that not only performs the task but also minimizes associated risks and downtime. RobocopyDataMigration.bat is an example of such a script. This script
- Copies the entire file and folder structure from the old array to the new array while maintaining complicated NTFS file and folder permissions
- Creates a detailed log of the migration results for each top-level folder
- Verifies the results of the copy operation
- Determines how long the system will need to be offline for the data migration
- Permits graceful fallback if hardware fails or other unforeseen circumstances arise during the data migration
Last month, I began describing how RobocopyDataMigration.bat works. Specifically, I discussed how the script uses Robocopy 1.96 to perform the copy operation and the Now utility to create a detailed log. (You can find both utilities in the Microsoft Windows 2000 Resource Kit or the Microsoft Windows NT Server 4.0 Resource Kit Supplement 4.) This month, I show you how the script verifies the copy operation results, determines offline time, and permits graceful fallback. I also show you how to adapt the script for your environment. . . .