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 


March 26, 2001

Real-World Scripting: Data Migration with Robocopy, Part 2


RSS
View this exclusive article with VIP access -- click here to join |
See More Scripting Articles Here | Reprints | Or sign up for our VIP Monthly Pass!
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. . . .

Reader Comments
Great article! It covers EXACTLY what I need within a customer data migration project.<br>
<br>
But I got a technical question! In my environment, there´s only Robocopy v. 1.70 available and I wonder if the .bat will work with this release as well. Could you please forward the question to Dick Lewis? That´d be greatly appreciated.

Wolf-Karsten Heintel May 29, 2001


I have been using Robocopy for several years but it is a little vague in my mind when different features were introduced. I think the last major change was when the /SEC switch was added, but even on this upgrade, I can't recall the version number when it changed.<br>
<br>
The best way to determine whether a utility will support the operations in a script is to run the command with no switches or with a "/?" to get the online help and see if the command syntax you are getting ready to use is supported in the version you have. Robocopy in its current version uses the switch "/???" to access the online help. Another way to test this particular Robocopy script with your slightly older version is to just set up a test source and destination directory and run the script against it. If you are using unsupported commands, the script will exit with an error the minute it hits the Robocopy command and will list the unsupported switch.

Dick Lewis October 24, 2001


This is CRAZZY!!! We should not have to give Microsoft another $80.00 to finish reading these import articles. I paid once, that should be enough!

BMETOYER February 12, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

Command Prompt Tricks

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

Next Version of Exchange Named Exchange 2010?

Microsoft apparently inadvertently announced the official name of the next version of Exchange Server. ...


Related Events Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting 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