Solved

RoboCopy question

Posted on 2012-03-27
3
893 Views
Last Modified: 2012-06-27
I am preparing to retire/replace a NAS on our corporate LAN. Total data is approx 600GB, much of which is static data but there are quite a few documents, spreadsheets, and other documents scattered about in users folders. I've used RoboCopy to copy the majority of our data to the new NAS (with permisssions, etc..). However I'm not sure which switches to use on the command line for the "final" copy, which will move all of the documents/files that have changed since the bulk move. I want to copy only the new/modified files, based on size and timestamp. I've read that RoboCopy can accomplish this, but the descriptions on the command line switches were not clear enough for me. Should I just run the Mirror switch or something else? If possible, please provide an example.

Thanks in advance,
0
Comment
Question by:ROMAD77
3 Comments
 
LVL 59

Assisted Solution

by:Darius Ghassem
Darius Ghassem earned 100 total points
ID: 37771652
I would use RichCopy which is the latest version of Robocopy.

http://blogs.technet.com/b/keithcombs/archive/2009/03/22/richcopy-bulk-file-copy-tool-released-get-it-here.aspx

The features you are asking for are in both Robopy Copy and RichCopy. You can use both within a GUI as well to make the configuration easier for you
0
 
LVL 83

Accepted Solution

by:
oBdA earned 200 total points
ID: 37772954
robocopy will by default only copy files that aren't in the target already, so you can just run the former command again.
If you want the source and destination folders to be identical after the copy, you need to use /mir to delete files in the target that have been removed in the source since a former copy.
Then you might want to set /r (retry) and /w (wait) to something more useful in a LAN, like /r:2 /w:1.
I usually use /nfl (no file list) and /ndl (no directory list) to reduce the log file size (unless you really want a list of successfully copied files); errors will still be logged. (Note that when using /nfl /ndl, you won't see much output, but robocopy will still be working ...).
Use /np if you're logging to a text file, otherwise the log will be filled with control characters.
Depending on your NAS, you might need to use /fft (2 second time granularity) as well, not all NAS OSs simulate NTFS well enough to offer the full time resolution, so robocopy might think that source files and target files are different, even though they're the same.
So to sum it up:
robocopy.exe "S:\ource\Folder" "T:\arget\Folder" /copyall *.* /r:1 /w:1 /mir /nfl /ndl /np /tee /log:"robocopy-20120327.log"
Add /fft if robocopy keeps copying files that you know are already in the target in the same version; normally, you should see a high number of folders and files in the "Skipped" column (files/folders already in the target) in the job summary when doing reruns.
Add "/mir" (which can delete files in the target, see above!) once you're sure the copy is running correctly (note that files tagged as "*EXTRA" in robocopy's output are files that will be deleted in the target when /mir or /purge is active, because they're not in the source anymore).
Note the nice "/L" switch as well, which tells robocopy to simulate a copy run and only log what would be copied, but not actually copy/delete anything, so you can check if your command is actually doing what it should.
0
 
LVL 2

Author Closing Comment

by:ROMAD77
ID: 37777310
Thanks for the responses, this is what I was looking for.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Suggested Solutions

Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now