Solved

RoboCopy question

Posted on 2012-03-27
3
1,211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 84

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Know what services you can and cannot, should and should not combine on your server.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

752 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