Disaster Recovery optimize

Replace SyncToy with FreeFileSync for your SMB backup needs

FreeFileSync is an open source, cross-platform backup tool. Learn how to install it and then use it to set up a backup job.

When a small business cannot afford industry standard backup tools like Acronis, or they are working off a desktop machine and need a more flexible backup than what is built into their platform, what options are there? One option that many SMBs use is SyncToy, but that software hasn't had a new release since 2009. Another option is the open source backup tool FreeFileSync.

FreeFileSync offers these features:

  • Detect moved and renamed files and folders
  • Run comparison before sync
  • Copy locked files (using Volume Shadow Copy Service)
  • Detect conflicts and propagate deletions
  • Binary file comparison
  • Symbolic Links support
  • Sync as a batch job (automated)
  • Process multiple folder pairs
  • Copy NTFS extended attributes and security permissions
  • Support long path names > 260 characters
  • Fail-safe file copy
  • Comprehensive error reporting
  • Cross-platform (Windows/Linux)
  • Expand environment variables (such as %USERPROFILE%)
  • Access drive letters by volume name
  • 64-bit support
  • Version control
  • Optimal sync sequence to prevent disc space bottlenecks
  • Full Unicode support
  • Include/exclude filters
  • Local or portable installation
  • Recurring backups via macros %time%, %date%
  • Case sensitive synchronization
  • Built-in locking serializes multiple jobs on same network share

FreeFileSync is not exactly point and click, and it does require you to have at least a basic understanding of these backup plans:

  • Automatic: Identify and propagate changes on both sides using a database. Deletions, renaming, and conflicts are detected automatically.
  • Mirror: Right folder is modified to exactly match left folder upon completed sync.
  • Update: Copy new or updated files from left folder to right folder.

It is also possible to create a custom backup type. For a custom backup, you can configure these possible options:

  • Copy new items right to left
  • Delete left item
  • Copy new items left to right
  • Delete right item
  • Overwrite right item
  • Overwrite left item
  • Do nothing
  • Leave unresolved conflicts

Installing FreeFileSync

Here are the installation steps for Windows:

  1. Download the installer file.
  2. Double-click the downloaded file.
  3. Walk through the installation wizard.

Here are the installation steps for Ubuntu Linux:

  1. Open a terminal window.
  2. Issue the command sudo add-apt-repository ppa:freefilesync/ffs to add the repository.
  3. Update apt with the command sudo apt-get update.
  4. Install FreeFileSync with the command sudo apt-get install freefilesync.

Using FreeFileSync

We'll create an automatic backup so most of the dirty work is handled by the application. During the creation process, you'll see how simple it is to create the other types of backups.

First, you must decide on the source and targets for the backup. I will working on a Ubuntu 12.10 machine (the process for setting up the backups is the same on Windows and Linux -- the only adjustments Windows users need to make are directory paths). I want to back up (sync) my /home/jlwallen/Pictures directory to a Pictures directory on an external drive.

Open FreeFileSync and, when the main window appears (Figure A), click the Browse button in the left pane. Locate your source directory (in my case /home/jlwallen/Pictures). You could also enter the path to that directory in the text area above the left pane. Figure A

Depending upon your skill level, you might be intimidated by the interface, but the tool is much easier to use than it looks. (Click the image to enlarge.)
Then, you'll do the same thing for the right pane and locate the target directory. Once you locate the target, you'll want to do a comparison run on the two locations. Click the Compare button and, the results of the comparison will appear very quickly. You get plenty of information (Figure B) about what is going to happen when you click the Synchronize button. Figure B

In the bottom right corner, you get a snapshot of exactly what is going to happen when the backup occurs. (Click the image to enlarge.)
If you need version control on a backup, this is also possible. If you click the gear icon next to the Synchronize button, the Synchronization Settings window will appear (Figure C). Click the Versioning button, and then you can configure the versioning limit for a backup. Figure C

How errors are handled is also configured in this window. (Click the image to enlarge.)

Let's say you want to save and schedule this particular backup.  FreeFileSync does not have a built-in scheduler, so you need to save the backup as a file and then use your operating system's built-in schedule to schedule the saved backup file. Here's how:

  1. Once you set up your backup exactly how you want, go to Advanced | Create Batch Job.
  2. In the Batch Job window (Figure D), make sure everything is set exactly how you need.
  3. If the backup job is to run without user intervention, make sure to disable the Show Progress Dialog checkbox in the Batch Settings tab.
  4. In the Batch Settings tab, set Error Handling to Ignore.
  5. Save the backup script with a unique name (by default the name will be SyncJob.ffs_batch) by clicking the Save As button.
Figure D

From this window, you can set up backup filtering. (Click the image to enlarge.)

Now that the backup script is written, the final step is to use your built-in scheduling tool to run the script when necessary. If you're unsure of how to use cron for Linux, you could install a handy tool called GNOME Schedule to gain a nice GUI tool for scheduling cron jobs.

You now have a reliable backup scheduled.

Conclusion

Although you won't benefit from full-metal backups and restores, if you're looking for a flexible and easy to use data backup solution, give FreeFileSync a try, and see if it meets your needs.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

26 comments
JacksTechService
JacksTechService

Tries to install "Search Protect" virus. When backing up to fat32 (thumb drives etc), it will rewrite created date as 2056. Not a trustworthy backup program. My backup is important, go with free Cobian Backup, it's trustworthy!!!

amabilis
amabilis

I can't see any option for encrypting the backed up data, so for anybody who is looking for the possibility to encrypt backups "Duplcati" might be woth a try duplicati.com Free and supporting many protocols, with it's AES-encryption also useful for cloud storage.

roseuz
roseuz

I know that one can create batch files and then use RealTimeSync to automatically create a backup, but this process doesn't seem 100% automated or either I am missing something. What happens for me is that FreeFileSync automatically opens up and compares the source and destination files and folders, and then that's it. I have to stop what I am doing, go to the program, and press Synchronize. Is this how this is supposed to be?

andrewjrose
andrewjrose

I'm looking for an application that will automatically choose the option that keeps both files and adds (2) to the name when copying directories where you run into files with same name.

Aakash Shah
Aakash Shah

Jack has already listed all of the pros of the product. A few other pros and cons about FreeFileSync, and some comparisons with SyncToy. We had to look into a solution for our laptops a few months ago and so I had done some research on this (we ended up selecting FreeFileSync for our needs): Pros: 1. The FreeFileSync author is very responsive to problems and questions. I once had a minor issue that I found, and the author released a beta version within a few hours, and a production version within a day. 2. This project is still in active development (SyncToy has not had an update in quite some time). 3. I was able to create a config file that used variables in it that I was able to use for ALL of my userbase. While SyncToy does some command line parameters, it does not for instance allow you to exclude specific folders with the command line (we can exclude specific files via the command line though). 4. Since we can use a common shared config file for FreeFileSync, it is also easy to push new exceptions/changes to the config file if needed. To do this via the command line, SyncToy would require you to recreate the folder pair (or manually edit the existing folder pair via the GUI). 5. Good logging - FreeFileSync records what new files were added, removed and changed. We had found a bug in SyncToy that if it is run from the command line, i.e. the GUI is not used, the log file does not store what files were added/removed. From a troubleshooting perspective, this was important for us. Cons: 1. FreeFileSync does NOT sync the folder timestamp (note that it DOES sync the file timestamps though - just the folders are ignored). Unfortunately, the developer feels that this is not important nor reliable to sync and does not have any plans to implement this. I don't have a link for this right now, but for some of my scenarios, this is one reason why I can't use FreeFileSync. This is my only real problem with FreeFileSync. It's minor for most scenarios, but can be important depending on what the sync is intended for.

Gisabun
Gisabun

Agree with Slayer_7. Use Robocopy. Part of Win Vista and later and can be added for Win XP. Mirror, sync, etc. Don't need any program to install or uninstall. And I don't trust any application [free or not] that resorts to installing another damn toolbar that no one needs.

swenkruiper
swenkruiper

I've got a raid 5 array in my home server with 5.4 tb of effective usable space. I wanted a backup solution that could mirror that data to a NAS also running raid 5. The array in the server is just a file storage array, the OS is running of a SSD so abrely any files in use. I tried 7 utilities including FreeFileSync and Synctoy. Both did there job. FreeFileSync was just a lot better and faster at it. Synctoy would take a very long time to scan for changes and would create "tasks" on a per file basis to copy them to the NAS. FreeFileSync did the same task in barely a minute which a more or less 10 times faster compared to synctoy. Actual transfer speed were more or less the same though

JavaJobber
JavaJobber

FreeFileSync is currently my favorite Windows backup tool as it lets me backup to a network location without a fuss. "Mirror" is the best option for a new user (especially one without a backup) to experiment with as it won't mess with your source files. I did experience some permissions errors that went away when I started it using "Run as Administrator."

jonc2011
jonc2011

Thanks Jack - useful. A couple of ideas: 1. Filtering is very strong, and easily permanently excludes files and folders from backup. 2. I use Create Batch Job to back up a couple of specific folders (Current jobs and Email) to a skydrive folder in my OS partition, which is mirrored automatically in the skydrive cloud. If this is set as a daily task (via a bat file) in Task Scheduler, it occurs automatically every day. I guess it would work the same with Dropbox or other cloud backup solutions.

Slayer_
Slayer_

I know synctoy polluted your system with garbage files, I don't know if freefilesync does as well, but why bother when robocopy exists?

chris_black
chris_black

FreeFileSync works well, - much better than the finicky SyncToy, but just make sure you don't install the accompanying "monetization" software that comes embedded in the download package. Read the install wizard carefully to make sure you avoid this.

stephen
stephen

completly screwed up my computer!!!!

Aakash Shah
Aakash Shah

I've not used the File Versioning feature in FreeFileSync, but I just checked the Help file that comes with FreeFileSync and it reports that it is definitely possible. I don't have any experience with it though, so I can't comment on how well it works and your use case. But the program is free, so you can easily confirm whether it will work for you :)

Aakash Shah
Aakash Shah

FreeFileSync also creates a hidden file called "sync.ffs_db" on each side of the folder pair. However, a few things that are better than SyncToy is: 1. The file name is the same, i.e. it is not a random file name like what SyncToy creates. 2. FreeFileSync only creates a single file, regardless of how many folder pairs are created. So, even if you have 3 folder pairs with the same source folder, FreeFileSync will only create a single file called "sync.ffs_db". I had asked the developer about this, and I learned that FreeFileSync stores all of the data about the various folder pairs inside this single file. However, when FreeFileSync/SyncToy is compared to Robocopy, Robocopy does not create any temp files, which is nice and clean. However, Robocopy does not offer true bidirectional syncing.

attila
attila

I have a PC I am backing up to my NAS drive. Looked at RoboCopy, but I didn't see an option to sync both ways. I wanted the option to be able to drop file on my NAS and see on my PC. SyncToy does give you bi-directional sync.

Aakash Shah
Aakash Shah

Definitely a good point! It does unfortunately install some extra programs. However, I learned that if you install this using the program silently using the " /S" switch, then it does not include the extra software. This is very helpful if you are installing FreeFileSync across multiple computers.

Craig_B
Craig_B

I installed it on Windows 7 x64 and did a few test operations (local and network) and it worked OK. One thing when I installed it, I made sure I unchecked the Sweet...Search Tool Bar boxes at the top of the Decline/Agree screen. I've used SyncToy which is simple and works OK for basic needs. FreeFileSync seems to be a similar tool. On Windows, I just use Robocopy.exe, it's built in and works very well. @Stephen - maybe you could provide some details on this issue.

Slayer_
Slayer_

First line copies one way, second line copies the other way.

Aakash Shah
Aakash Shah

[I am unable to reply to Slayer's comment since it appears to be too deep, so I am replying to my thread] Both SyncToy and FreeFileSync are able to do bidirectional syncing. They do this by maintaining a database of what changes exist at the time of the last sync (this is what those miscellaneous hidden files keep track of. At the next sync, it compares the current contents from the previous sync contents and makes decisions based on that. This is something that Robocopy is unable to do.

Slayer_
Slayer_

If you delete the file and resync, it will reappear. I have never used freefilesync but I don't see how it could track deletions.

Aakash Shah
Aakash Shah

If you do a straight copy both ways, i.e. do not use "/mir", it will not sync renames and deletions. Here are two examples below: Rename problem (assuming no "/mir" switch - straight copy): 1. Let's say you have sides Left and Right. Let's also say your script first runs Robocopy from Left to Right, and then from Right to Left. 2. You create a file on the Right side called NewFile1.txt and you run the sync script. So now NewFile1.txt exists on both the Left and Right sides. 3. You now rename NewFile1.txt on the Left to NewFile2.txt and you run the sync script. 4. Under this scenario, while NewFile2.txt will be copied over to the Right side, NewFile1.txt will be copied from the Right side to the Left side and so you will end up with NewFile1.txt AND NewFile2.txt. If you have a program that supports bidirectional syncing, you would have only been left with NewFile2.txt Delete problem (assuming no "/mir" switch - straight copy): 1. Let's again say you have sides Left and Right. Let's also again say your script first runs Robocopy from Left to Right, and then from Right to Left. 2. You create a file on the Left side called TempFile.txt and you run the sync script. So now TempFile.txt exists on both the Left and Right sides. 3. You now delete TempFile.txt on the Left side and you run the sync script. 4. Under this scenario, when the copy operation from Right to Left occurs, TempFile.txt will reappear on the Left side, even though you had deleted it. If you have a program that supports bidirectional syncing, TempFile.txt would have been deleted from both sides.

Slayer_
Slayer_

Just a straight copy back and forth will work.

Aakash Shah
Aakash Shah

I had looked into using Robocopy for 2 way syncing and found that it is not possible to get true 2 way syncing. Here is an example of where this will not work: 1. Let's say you had sides Left and Right. 2. Your script first runs Robocopy from Left to Right and then from Right to Left using the /mir switch to try to simulate "2 way sync". 3. You add a file to the Right side and you run the script. 4. Under this scenario, since the file does not exist on the Left, the first operation which runs /mir from Left to Right will _delete_ the file from the Right side, when we actually wanted it to be added to the Left side (since we added it to the Right side). However, if you've found another set of switches to accomplish this, I would be very interested to hear about it. It's always better to use built in tools :)