You can find my FreeNAS posts/Tutorials here:
- FreeNAS – switching back. About my decision to move back to FreeNAS from Windows Home Server.
- FreeNAS Tutorial for Windows Users – Part One – Installation – installing the FreeNAS server onto a PC. (this post)
- FreeNAS Tutorial for Windows Users – Part Two – Configuration – configuring FreeNAS and Windows File Sharing.
- FreeNAS Tutorial for Windows Users – Part Three – Upgrading – Upgrading your FreeNAS Server.
- Using Microsoft SyncToy 2 with FreeNAS – Automating your backups – for free.
- FreeNAS Tutorial for Windows Users – Part Five – XBOX 360 – Using FreeNAS with your XBOX 360
- FreeNAS Tutorial for Windows Users – Part 6 – Adding another drive
[Of course, this tutorial applies to any remote storage that is connected to as a shared drive. This is a complimentary post to FreeNAS: The Free NAS Server - About and FreeNAS Tutorial for Windows Users - Part One - Installation]
SyncToy 2 is a free utility provided by Microsoft and it runs on Vista and XP (and Windows 2008 Server). SyncToy 2 (beta) is available from Microsoft here.
Microsoft describes SyncToy 2 as:
Now there is an easier way. SyncToy, a free PowerToy for Microsoft Windows, is an easy to use, highly customizable program that helps users to do the heavy lifting involved with the copying, moving, and synchronization of different directories. Most common operations can be performed with just a few clicks of the mouse, and additional customization is available without additional complexity. SyncToy can manage multiple sets of folders at the same time; it can combine files from two folders in one case, and mimic renames and deletes in another case. Unlike other applications, SyncToy actually keeps track of renames to files and will make sure those changes get carried over to the synchronized folder.
- Download the file.
- Install SyncToySetup.exe
- Start the application
- Start Menu
- All Programs
- SyncToy 2.0
|After you either allow Microsoft to gather some data about how you use SyncToy (or decline), the opening Welcome screen displays:|
Your only option here is to create a folder pair. Folder pairs are the basic building blocks of SyncToy – simply put, they are the two folders you want to manage (sync). Select “Create New Folder Pair”.
|A standard Windows Explorer file browser opens. For this example we will sync the music folder located in on my local “F:” drive.|
|To do that we simply drill down the folder tree until we highlight the music folder. Once selected, click “OK”|
|Now the left side of the sync is configured. Time to connect to the server!|
|Next we select the network path to “music” on the FreeNAS Server.In this example, I typed in the UNC path. If you have mapped a network drive, you can browse and select it (see next image).|
|This is an example of browsing to a mapped network drive.|
|So now we have our local Music Folder linked to the shared music folder on FreeNAS.|
|Now you have a choice to make. This requires some more explanation (or you can just click on the link for “More Information”|
You have three options here, and it is important that you understand them.
1. Synchronize – changes on either side are reflected on the other. If you delete a file on your FreeNAS server, it is deleted from your local machine. The same thing goes for renaming files, adding files, etc. This is the most common use.
2. Echo – This basically sets the left folder (on your local machine) as the “Master”. Changes you make on your FreeNAS server are NOT reflected on your local drive.
3. Similar to Echo, but deletions on either the server or the local drive do NOT delete files in the other folder. New files added to the local folder are copied to the FreeNAS server, but additions added to the FreeNAS server are NOT copied to the local folder.
For my Music, I want everything I do on my local machine to be reflected on my server. If I add a new song, rename a song, delete a song, etc I want the server to reflect that. Basically I am using FreeNAS to make a duplicate of my local Music Folder.
|So I selected Echo and am now asked to name my pair – I’ll call it “Music” because I am creative that way.Type in the name of your pair and click on Finish.|
|Now we can see the Folder Pairs I have configured. You’ll see “Music” is selected. Now I can click on “Preview” to see what is going to happen BEFORE I actually make any physical changes to my data.|
|You can see that my ZZ Top music will be copied from my local drive to my shared drive on the FreeNAS server. Cool – I can see that nothing is going to be deleted (look at the “Preview Results” box at the lower left).|
|Now we do an actual sync by running the Folder Pair. The results show that all nine files were correctly copied to the server.|
|Here you can see that I have created multiple Folder Pairs for my desktop, movies, music, pictures and video folders.In the next section we will set Windows up to execute these Folder Pair Syncs every night, without user intervention.|
Automation – Vista (For XP see below)
We are going to use the built in Windows Task Scheduler program to automate our SyncToy session.
Task Scheduler is locate in the Start menu under Accessories|System Tools – go ahead and run it.
|Task Scheduler on Windows Vista. I’ll cover XP further down.|
|Click on the “Create Basic Task action (as highlighted in the previous image).You will be presented with a dialog box. The first thing we’ll do is name this Scheduled Task “SyncToy Run” and give it a description.|
|After clicking on Next the dialog presents the “Trigger” portion of the setup. I want this task to run daily, so I am not making any changes here.|
|The next screen allows us to specify the time of day the task runs. I want mine to run at 3 am – that way it will be finished before I wake up in the morning. Just choose a time when your computers are turned on, and hopefully not being heavily used.|
|On the action screen we want to start a program.Make sure it is selected and click next.|
|Ok, now comes a little bit of work (just a little!).Click on the Browse button and navigate to your Program Files folder (normally “c:\program files”)Drill down the folder list until you find the SyncToy 2.0 Beta folder and open it.|
|Highlight the file “SyncToyCmd”. This is the SyncToy command line executable. It lets us run the Folder Pairs without user intervention.Click on Open.|
|In the “Add arguments” text box type “-R” (without the quotes. This tells SyncToy to run all Folder Pairs marked as active.The Start in” box stays blank. Click Next.|
|The final settings are displayed. Review them and click on Finish.|
Close the Task Scheduler. That’s it – you are finished. Your data is now automatically synchronized with your server every morning.
Read on only for information on adding the task to XP.
Automation – XP
Setting up a Scheduled Task in XP is similar to Vista. The Task Scheduler in Vista is a newer and more powerful version, but for our purposes the XP version is just fine.
Launch the Scheduled Tasks utility by going to Start|All Programs|Accessories|System Tools.
|Although the dialog box looks different in XP, the setup is actually quite similar to Vista. Double-Click on the “Add Scheduled Task” link.|
|The Scheduled Task Wizard pops up. Click on Next.|
|Click on the Browse button and locate your SyncToy 2.0 Beta Folder (under Program Files, usually in c:\program files”).|
|Double click on the SyncToyCmd file and click “Open”.|
|Type in a name (SyncToy Run) and select Daily, then click on Next.|
|Set the time for the task to run (3:00 am), choose Every Day and click Next.|
|On XP you have to enter a valid user account and password. Enter this information (your Window login name and password) and click next.|
|Click on Finish.|
|Right-Click on the Task and Select “Properties” from the menu|
|We are going to manually edit the “Run” line. All we are going to do is add a -R to the end of the existing line.The existing line ends with “…\SyncToyCmd.exe” and we want it to end with “…\SyncToyCmd.exe -R”So make that change.|
|Click Apply to save your changes. If you are prompted for your password again, enter it.Now you are set up to automatically run the Folder Pairs on your XP box.|
|You can test it by Right-Clinking on the task and selecting Run from the popup menu.|
That’s it. If you have any questions, you can leave them in the comments.