Robocopy switches to copy/move data

Can someone send me instructions on how to move and copy data from one server to another server?  I was told to use the following:

robocopy \\source_server\file \\destination_server\file /e /sec /x0 r:0 /log:c:\robocopy.log

Does this appear to be correct?
Lastly, I'm planning on just copying the data now and not move the data.  At some point, we'll be doing a DELTA move so all files that may have been missed or updated, become parralel to both servers data.

The destination server is Server 2003 and the source server is MS 2008.
uppercut71412Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steven HarrisPresidentCommented:
robocopy \\source_server\file \\destination_server\file /e /sec /x0 r:0 /log:c:\robocopy.log

/e is for copying Subfolders, including empty Subfolders
/sec is for copying with security permissions
/x0 (should be /XO - letter o not number 0) is used for excluding older files already in destination (you don't need this yet imo)
r:0 (should be /R:0) is for disabling retries on failed copies
/log:file is for writing the log to a file

Formatted correctly:

robocopy \\source_server\file \\destination_server\file /e /sec /r:0 /log:c:\robocopy.log

This is for copying the files, not moving them from location to location, so you are fine with this.
0
dipopoCommented:
No there is a typo there, and more over try this much better

robocopy \\source_server\file \\destination_server\file /s /e /zb /sec /w:1 r:2 /log:c:\robocopy.log
0
uppercut71412Author Commented:
Hello,

Can you explain what the above commands will actually do?
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

dipopoCommented:
Sure.

/s /e /zb /sec /w:1 r:2

/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.
/ZB :: use restartable mode; if access denied use Backup mode.
/SEC :: copy files with SECurity (equivalent to /COPY:DATS).
/R:n :: number of Retries on failed copies: default 1 million.
/W:n :: Wait time between retries: default is 30 seconds.
0
uppercut71412Author Commented:
/zb:: restartable mode, can you explain a bit further.
0
dipopoCommented:
/Z : Copy files in restartable mode (survive network glitch).
/B : Copy files in Backup mode.
/ZB : Use restartable mode; if access denied use Backup mode.

http://ss64.com/nt/robocopy.html
0
zalazarCommented:
Below please find some more info about using robocopy for copying data from one server to another.
If you use UNC paths for Source and maybe also for destination then make sure you have full control on the share permissions. Also make sure that you have full control on the NTFS permissions.
For perfomance reasons it's always best to start the commands on the new (destination) server. So logon with RDP or console on the new (destination) server.

As an example:
Source is: \\server\e$\Data\Groups
Destination is: D:\Data\Groups

Be very careful when choosing your source and destination. Making a mistake can be very costly.

Procedure:
If you have a lot of data to copy it's a good idea to first do a copy with the /CREATE option. This will minimize directory fragmentation. This will only copy the directory structure including all the files as 0 bytes files

robocopy.exe "\\server\e$\Data\Groups" "D:\Data\Groups" /CREATE /E /DCOPY:T /NP /R:0 /COPY:DATSO /LOG+:C:\Temp\robo_log1.log

Then execute a second command to copy the Data.
This is including NTFS security (S in DATSO), File Ownership information (O in DATSO) and directory timestamp (/DCOPY:T)
/NP   No progress indicator (necessary since we use /LOG+)
/R:0  Do not retry on failed file copies
Please note that the mentioned /SEC option in your question does not copy file ownership information. If this is not necessary then you can also use /SEC instead of /COPY:DATSO
The mirror option will make sure that the destination will be exactly the same as the source.

robocopy.exe "\\server\e$\Data\Groups" "D:\Data\Groups" /MIR /DCOPY:T /NP /R:0 /COPY:DATSO /LOG+:C:\Temp\robo_log2.log

To save time, all above can be done as a sort of pre-copy.
On final migration day just execute the last command again:
The mirror option makes also sure that files that are deleted on the source are also deleted on destination.

robocopy.exe "\\server\e$\Data\Groups" "D:\Data\Groups" /MIR /DCOPY:T /NP /R:0 /COPY:DATSO /LOG+:C:\Temp\robo_log3.log

After the copying is done:
1) Check the logfiles for errors and "Access denied" messages
2) Get the properties of source and destination directory with an explorer and make sure the amount of data, number of files and directories are exactly the same.

Commands:
1st
robocopy.exe "\\server\e$\Data\Groups" "D:\Data\Groups" /CREATE /E /DCOPY:T /NP /R:0 /COPY:DATSO /LOG+:C:\Temp\robo_log1.log

2nd
robocopy.exe "\\server\e$\Data\Groups" "D:\Data\Groups" /MIR /DCOPY:T /NP /R:0 /COPY:DATSO /LOG+:C:\Temp\robo_log2.log

3rd (optional)
robocopy.exe "\\server\e$\Data\Groups" "D:\Data\Groups" /MIR /DCOPY:T /NP /R:0 /COPY:DATSO /LOG+:C:\Temp\robo_log3.log

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zalazarCommented:
Did you by chance already get any further with the migration of data ?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Consulting

From novice to tech pro — start learning today.