Friday, February 15, 2008

 

Robocopy for Mirroring Directory(ies) to a Backup Disk

I did quite a bit of looking around for a way to backup my documents and music and other files on my new Vista PC. I have a second disk in my system and wanted to mirror my important data to that second disk. There's a backup utility built in to Vista, but it doesn't have a way to exclude directories (!) and I have some directories with large, static data that I already have backed up elsewhere and don't want to include on the backup disk.

I found a bunch of mirroring tools, and none seemed very good. I don't need it to run unattended, because I remember to do it often enough and also I don't leave my PC on overnight usually.

I settled on Robocopy.exe, a command-line tool that isn't in Vista by default but I was able to get it by installing the Windows 2003 Resource Kit. Robocopy is working great for me. It took some effort to figure out the command-line switches, but now I have a batch file that I can run once in awhile to mirror my important data to my backup disk. It's been reliable, synchronizes directories by deleting files in the destination that have been deleted in the source, and is very fast by not copying files that are already sync'd.

Here's the command I'm using to mirror my user folder on the backup disk:
robocopy "c:\Users\Ryan" "e:\Sync Folder\Ryan" /MIR /XJ /R:1 /ZB /S /W:1 /XD "AppData" /XF "ntuser.*"


Comments:
Thanks - your command-line gave me a starting point for my migration of data from a local drive to an iSCSI-connected drive. I'm running a mirror now to populate the destination drive so that when I'm ready to make the official change to the new target, I don't have to wait hours and hours for the copy/mirror to finish!
 
Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]