munky.net

design and open source

Samba file synchronization with GoodSync vs Offline Files

| 3 Comments

Since I’m starting to use a laptop more frequently these days, I decided to reconfigure my home network a bit so as to centralize my work files. Previously I had kept my work files on my desktop PC and used the Offline Files feature built into Windows 2000 and XP to synchronize a small number of files with an older laptop that I used only occasionally. That scheme worked fine at the time, but since I’m now planning on doing an increasing amount of work on my laptop instead of my desktop I didn’t want to require that my desktop machine be turned on to synchronize files.

Since I have a third machine running linux and MythTV that is on all the time anyway, I decided to set up a Samba share on that machine and make that my work files’ primary repository. An added advantage of the Samba configuration is that I can use rdiff-backup for easy remote backups of the repository. Configuring Samba was relatively painless, and far simpler than I remember it being from a few years ago.

Problems arose when I attempted to set up Offline Files on my laptop to create a local mirror of the files on the Samba share. For some reason, once I activated Offline Files on the laptop, it had trouble consistently connecting to the file server on my home network. Often it would only show the cached, offline version of the share even though it was clearly connected to the network and able to resolve and ping the file server. Restarting the laptop solved the problem about half the time, which suggests to me that the problem may have something to do with a race condition between connecting to the wireless network and/or Samba, and determining the Offline Files state upon startup.

Offline Files comes with a couple other annoyances that made it a less than optimal solution. For one thing, the local cache is kept in a folder at the root of the C: drive, which can only be relocated using a special tool on the Windows administrator tools CD. Since I normally keep my OS and program installations on C: and all data on D:, I don’t care for anything that keeps user data on C:. In addition, Offline Files has a habit of being somewhat noisy when it can’t find a network share, which can be distracting when you’re away from your home network. There is a way to change behavior based on which network interface is being used, but that didn’t help me since I use the wireless interface both at home and at school.

Ultimately I gave up on Samba in favor of a free (for personal use) piece of software called GoodSync from Siber Systems. Siber makes RoboForm, a very useful and well-regarded Windows tool for password management. I chose GoodSync (despite it silly name) because I am generally happy with the way RoboForm works, and so far it has fit my needs perfectly. And ever since I turned Offline Files off, my laptop has had absolutely no problem connecting to the Samba share at home.

GoodSync has a number of options for both one-way and bidirectional synchronization, and supports sophisticated options and filters for which files get synchronized. It is entirely transaction based at a file level and keeps its own database of states and changes instead of just looking at modification dates. The “analyze” feature tells you exactly what changes will be made upon synchronization, which is helpful when configuring complicated jobs. Synchronization can be set up to occur automatically similar to the way Offline Files works, but for now I’m doing it manually whenever I know a synch is necessary.

The only issue I’ve had is that GoodSync leaves _SYNCAPP directories at the bases of the file hierarchies that it’s synchronizing. Presumably this is where it keeps its internal database. While this may have been the best solution in terms of organizing and protecting the database, the presence of these files is distracting. A quick change to my Samba configuration allowed me to hide these directories automatically. However, I’m still not sure whether they ought to be included in the repository backups.

Update 3/08/06: I contacted Siber to ask about this and received a reply in broken English that didn’t really answer my question, just saying that the _SYNCAPP folders were important. I’m going to have to do some tests on my own to see if the metadata is rebuilt automatically if lost.

3 Comments

  1. They definitely should be included in the repository backups. Thanks for lunch!

  2. v7.5+ of GoodSync now supports backing up or syncing to Amazon S3, so you can backup to the ‘cloud’ as it were. Here’s a positive GoodSync Review.

  3. Thanks! I’m setting up my own NAS box with FreeNAS.

    However, some of the links in this article are broken (MythTV, GoodSync, RoboForm).

Leave a Reply

Required fields are marked *.