How-to: Using SyncToy to make a nightly mirror of My Documents

I promised a client recently that I’d help set her up to mirror her “My Documents” folder to an external USB drive with nightly updates. I then realized it might be helpful to other folks as well. I promise this is not a highly technical article.

The Goal: Setup a Windows XP machine to make a nightly synchronization to an attached USB drive. Maybe not just XP. Probably works for Windows 2003 and Vista (beta) as well. Clever folks will realize that this could work between any two directories on any two (accessible) drives.

What you Need:

  • A My Documents folder (natch)
  • Another drive to synchronize with.
    • Why another drive? Well the idea here is to be sheltered in the event that the drive containing “My Documents” craters. While I’m primarily aiming this at a USB drive, it could also be a USB key or a second internal hard drive. Or a network share if you’re so inclined.
  • Microsoft’s SyncToy. [download] No worries, it is free. Most reasonably modern computers will meet the system requirements.
    • Potential wrinkle: It needs the .Net Framework 1.1. Odds are, you have it. If not, go get it (the SyncToy installer will alert you if you need it)
  • 5 minutes

Setup:

Using “My Computer”, open the USB Drive and create a new directory named something clever like “My Documents Backup”. This will be our destination folder (or, in SyncToy parlance, the right folder).

Download and install SyncToy.

After the install, you’ll find it under your Start Menu -> All Programs. Go ahead and start it up.

Click on “Create a New Folder Pair.”

For the “Left Folder”, browse to your “My Documents” folder. Really, not much browsing necessary, it should be at the top of the list as pictured below.

Choosing Source

After you’ve selected it, click “Next ->”

For the “Right Folder”, browse to the new folder you created in the first step.

Choosing destination

Again, after selected click “Next ->”

Now we’re prompted to choose what we want to do with these two folders. If making a simple mirror for backup purposes, choose “Echo”. If you envision connecting the USB drive to another computer and working with any of the files, choose “Synchronize”. For purposes of this article, we’re going with “Echo.”

Click “Next ->”

Give this Folder Pair a name. I used “MyDocs Backup”

Click “Finish”

Holy cow, that’s the majority of the hard stuff done already! In fact, if you want to take a coffee break, go ahead and click “Run” and wander away for a bit while SyncToy does its thing. Just keep in mind that the first time it runs, it has to copy everything! Subsequent runs it’ll just catch the new / deleted stuff and go much much faster.

We have one last piece to do: Schedule it so that it’ll run automatically nightly or weekly. And for that, we peek at SyncToy’s Help Menu, where we find an article on scheduling. Copied here for your convenience since I suspect our friends at Microsoft are better at How-To’s than I might be. I took the liberty of sprinkling some notes throughout though:

To schedule a task using the operating system:

  1. From the Start menu, select All Programs – Accessories – System Tools – Scheduled Tasks.
  2. Select Add scheduled task to start the Scheduled Task Wizard. You will see a list of possible programs to run.
  3. SyncToy may appear as an option in the list. If SyncToy does not appear in the list, click Browse and go find it.
    (Note: Odds are, it’s in your c:\Program Files\Microsoft\SyncToy directory)
  4. The wizard will next prompt you to enter how often you want to run the scheduled SyncToy (for example, daily, weekly, et cetera). Select a frequency.
    (Note: I’d suggest weekly unless you make lots of changes to your documents)
  5. The next page asks when to start the task. Select a start time.
    (Note: I’d suggest middle of the night.)
  6. The next page asks for the user name and password to run the program under. Enter your user name and password.
  7. The final page contains an option to open the properties dialog when the wizard ends. Select this checkbox.
  8. Modify the Run textbox to include (append) the –R command line option. –R all by itself will run all folder pairs that are active for run all. (Note: Sufficient if you only have this one pair, or other similar pairs. In which case, you’re done with this step) If you want to run just a single folder pair, add –R“My Pair” to the end of the command line. Note: there is a space before the hyphen but not one after the R. If the folder pair name contains a space, surround it with quotation marks, as the example above shows. For another example, assume that SyncToy is in the folder named C:\My Folder and that you want to run a folder pair named “My folder pair.” Enter the command line as follows, including the quotation marks: “C:\My Folder\SyncToy.exe” -R”My folder pair.” Note that there are two sets of quotation marks in this case: one is around the path to the SyncToy program file and the other surrounds the folder pair name.

And there you have it.


Possibly Related posts:

  1. Moving the My Documents Folder
  2. TrueCrypt & SyncToy & Mozy – Almost a Great Idea
  3. SyncToy v1.1 is out
  4. Scattered Home Backups
  5. Shuffling and Syncing


29 comments to How-to: Using SyncToy to make a nightly mirror of My Documents

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>