I have my main workstation (Windows 7 64 bit) connected to a USB hub having connecting cables for my scanner, camera, webcam, handycam etc. All these external devices deliver content into my “Users” folder. The goal then is to have content in the “Pictures”, “Videos” and “Documents” folder in my main workstation transferred automatically to my DNS-323 NAS so that
- Files are backed up
- Files are easily accessible from any computer in my network
“Sync” and “Backup” are two commonly used (or misused) terms to describe the above. Here are the important differences between the two:
- A “Backup” file is not usually human readable.. it needs to be “Restored” using the software that created the backup
- Sync is 2-Way while Backup is 1-Way (although, depending on the software employed, you could set “master-slave” rules that mimic a backup plan)
- While both Sync and Backup are incremental in nature, Backup additionally employs some compression on your files in order to reduce storage space. Sync utilizes exactly the same space on the source and destination.
Having decided that “Sync” was the better option for me, I found that a tool named “SyncToy” from Microsoft satisfied my requirements exactly. I just love the simplicity of its user interface! Whats more, it is FREE, works exactly as advertised, has a small footprint (~1 MB), and works natively on 64 bit windows (As an aside, I really think Microsoft should have incorporated this into “Live Mesh” – another sync tool offered by MS that syncs with its cloud based storage).
One shortcoming (if you want to call it that), is that SyncToy does not offer “automatic or scheduled syncing”. It is however pretty trivial to set this up using the built in Task Scheduler in Windows 7 (described below).
Here’s how I setup SyncToy on my main desktop:
Note that I use the static IP address assigned to my NAS in the “Right Folder”. Please refer to my blog on how I setup my NAS for additional information.
Pay particular attention to the options presented on the next screen.. This forms the core of your sync strategy. “Echo” works nicely for my setup.. but you might want to select “Contribute” if you do not want to propagate deletes.
Repeat the process for all folders on your workstation that you want to sync to your NAS. You are done setting up the sync rules at this point. You can click on the “Preview button” to view all the files/actions.
Using Task Scheduler to schedule the sync:
Although SyncToy can be run on demand anytime, Automating the process gives you the confidence that your invaluble docs, pics etc are safely synced on a regular basis (I strongly recommend you check the logs the first couple of times just to ensure that all went well).
Click on the Start menu, then select All Programs –> Accessories > System Tools –>Task Scheduler
(Alternatively, you can simply search for “Scheduler” in the win 7 search box).
Click on “Create Basic Task”:
Enter a name for your job.. and a brief description:
Next up, the trigger event. I setup mine to sync every week. You may want to tweak this depending on your circumstance… You can get REALLY granular ..Feel free to explore the available options.
(Note that you SHOULD NOT select “When the computer starts” because it fires prior to login.. so neither your security credentials nor your LAN connection is ready at the time)
Under “Program/Script”, click on Browse button and locate the SyncToyCmd.exe – Note: Select SyncToyCmd (command line version) and NOT SyncToy(GUI). In the “Arguments” field, enter “-R” (for running all the sync folders setup).
Finish up.. and you are done with the scheduling process.
Hiding the command window:
When the scheduled process runs, it brings up a DOS command window (“taskeng.exe”) displaying the progress of the sync operation. This may not be acceptable to some. Here’s how you can suppress it:
1. Create a file named “Auto.vbs” (Ofcourse you can call it anything, I chose “Auto”) in your SyncToy folder with the following contents:
Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run Chr(34) & “C:\Program Files\SyncToy 2.1\SyncToyCmd” & Chr(34) & ” -R”, 0
Set WshShell = Nothing
2. Edit the scheduler script that was setup earlier to execute “Auto.vbs” instead of “SyncToyCmd.exe” (Remember to remove the –R switch from the arguments field as it is already included in the script)
Editing an existing scheduled operation using the task scheduler is actually a little convoluted.. You have to double click on the task.. then, select “Properties” from the right side action pane. This opens up the task for edits.
Note that once you have the basic scheduling in place, you can add any number of folders to SyncToy and it will be handled automatically during the next Sync!