Tuesday, May 17, 2011

Migrating Data between Servers

Robocopy is a good option when migrating data to another server.

It has a number of switches that can preserve attributes, timestamps, security, owner info, auditing info, etc...
Also it can include, exclude, add attributes, rerun and much more.

For a full list of operations type robocopy /? at the command prompt.

I recently migrated data to a new server using the following...
robocopy source destination /E /DCOPY:T /PURGE /COPYALL /TEE /LOG+:c:\robocopylog.txt

/E :: copy subdirectories, including Empty ones.
/DCOPY:T :: COPY Directory Timestamps.
/PURGE :: delete dest files/dirs that no longer exist in source.
/COPYALL :: COPY ALL file info (Data, Attributes, Timestamp, Security, Owner, Auditing).
/TEE :: output to console window, as well as the log file.
/LOG+:file :: output status to LOG file (append to existing log).

The method I used was to copy the data over and checked that everything was OK.
I then disconnected the users on the source, reran the command, and pointed the users to the new location.

Using this method the second run only copied over the changes (and removed anything that was no longer there) so took alot less time than the first run.

No comments:

Post a Comment