Getting upgraded storage is usually like being a kid on Christmas morning. Sure for most, disk isn’t the most exciting toy, but for me, its pretty cool and always presents new things to play with (and some headaches to be sure). But the disk is still just the first part, once you have everything hooked up, you still need to move the data over and ensure everything works as closely to normal as possible.
In this post I am going to look at using RoboCopy to migrate information to new storage.
Featured Tool: RoboCopy
RoboCopy is a command line tool from Microsoft that allows for multi-threaded file copying. It functions similarly to Copy.exe or XCopy.exe but has a few of its own nuances which will be look at here.
Using RoboCopy is quite straight forward, specifying the source, destination, files to be copied,and any options you wish, for example:
robocopy “c:\myfiles” “d:\newstorage” blogpost.docx
Note: Examples in this post will use simple paths on my local machine, but these can be changed to accommodate any storage.
In the above example, the utility will move the blogpost.docx file from the C drive to the D driv
e. If the file exists in the destination, it will be skipped without prompt.
If a more robust feature set is needed to act on files during the copy operation, robocopy supports the following options:
|/s||Copies non-empty subdirectories|
|/e||Copies subdirectories, including empty ones|
|/lev:||Copies only the top N levels of source subdirectories|
|/z||Copies files in restart mode|
|/b||Copies files in backup mode|
|/zb||Uses restart mode when copying files, unless access is denied, then uses backup mode|
|/efsraw||Copies all encrypted files in EFS-Raw mode|
|/copy:||Specifies the following file properties to be copied:
D – data
By default the D, A, and T flags are set
|/dcopy:T||copies time stamps for directories|
|/sec||copies files with security, is the same as /copy:DAT|
|/copyall||copies all file information|
|/nocopy||copies no file information|
|/secfix||fixes security on all files, including skipped files|
|/timfix||fixes time stamps on files|
|/purge||deletes destination files and directories that no longer exist in the source location|
|/mir||mirrors the source directory tree at the destination|
|/mov||moves files from the source and deletes them once copied|
|/move||moves files and directories from the source, deleting them once copied|
|/a+:[RASHCNET]||adds the attributes specified to copied files, available attributes [RASHCNET]|
|/a-:[RASHCNET]||removes the attributes specified from copied files, available attributes [RASHCNET]|
|/create||creates a directory tree with zero length files in the destination|
|/fat||creates destination files using 8.3 files names|
|/256||disables support for paths longer than 256 characters|
|/mon:||monitors the copy source, reruns when more than N changes are found|
|/mot:||monitors the copy source and runs again in M minutes if changes are found|
|/rh:hhmm-hhmm||specifies run times at which new copies may be started|
|/pf||checks run times per file, not per pass attempt|
|/ipg:n||set this option to specify an inter-packet gap to minimize bandwidth usage on slow connections|
|/sl||copies symbolic links instead of the target|
With the amount of options available for use with RoboCopy, it is an extremely robust tool. If you are comfortable with the command line it might be the best choice for a data migration. With a little scripting knowledge you could schedule copies and use the Windows Task Scheduler and options in RoboCopy to move/migrate piles of data.
While researching and playing with RoboCopy, I also discovered a GUI add-on for the utility, details on that can be found here. I highly recommend testing it for data migration, you might be surprised with what you get that you don’t need to pay for.