Monday, June 14, 2010

Remote File Synchronization in Mint/Ubuntu

File sync software is one of those things where personal taste counts for a lot. On my Windows PCs the best free sync software I've found is PathSync by Cockos Inc. SynchronX, which I believe is no longer supported but can still be found on free download sites, is also very good (I used it before I found PathSync), but SynchronX had one significant weakness (which I suspect is really Microsoft's fault): every time we switch between standard and daylight savings time, all files appear to be out of sync due to an hour difference in time stamps. PathSync has an option to consider or ignore file dates (time stamps), and there's a cute "in between" option that considers the time stamps but ignores differences of exactly one or two hours to allow for daylight time nonsense.

Now, though, I work mostly in Linux (Mint/Ubuntu). I've been using PathSync (running under Wine) to sync my laptop/desktop with my USB memory stick, but today I decided to bite the bullet and try direct syncs between my laptop and desktop, using SSH. I've experimented with Conduit before but had bad luck, and it's not clear to me that Conduit would give me the file-by-file granularity of control that I want. So I installed Unison (and the GTK GUI package for it) on both machines. Unison's interface is a pain, though. You have to scroll over each individual file to see what the difference is, you apparently cannot select multiple files when you want to specify actions (at least I couldn't see how), and clicking "skip" while a file was selected didn't change the action field (which read '?'), so I wasn't sure the file would actually be skipped. Ultimately, syncing large directories would have taken too much manual effort, regardless of how quickly the actual file transfers might have gone, so I punted (and ultimately uninstalled Unison).

That brought me back to PathSync. The answer turned out to be surprisingly easy. I installed sshfs (there are very clear, easy instructions at hackourlives.com), and permanently mounted my office PC's home directory on my laptop. Since PathSync, under Wine, can see the local file system (including /mnt), I can use it to sync any local directory with any remote directory (at least anything under my remote home, since that's what I mounted). Navigation in the file browser has a bit of latency, but file comparisons and file transfers are fairly sprightly, and I have the level of control I crave. Sweet!

3 comments:

  1. I've thought about Dropbox, but as I understand it I would have to move ~/Documents (or at least many of the subfolders) into the Dropbox folder. Or would symlinks work (leave stuff where it is and put symlinks to it in the Dropbox folder)?

    ReplyDelete
  2. As it ends up, I've been using Dropbox for some months now, and it has become indispensable.

    ReplyDelete

Due to intermittent spamming, comments are being moderated. If this is your first time commenting on the blog, please read the Ground Rules for Comments. In particular, if you want to ask an operations research-related question not relevant to this post, consider asking it on Operations Research Stack Exchange.