Syncing Apps via Dropbox on OSX – HOWTO

4 minutes

I must admit I am one of the later adopters of the sensation rocking the world – DropBox. Until recently, I was convinced that I really didn’t need FileSync over and above what my trusty External HDD provides. I work extensively on my MacBook Pro at work, and back home I have my trusty Hackintosh (as well as a number of other Windows machines). Keeping my main machines (MacBook Pro and Hacki) in sync was a chore, that I promised myself, I would undertake religiously each night. Backup the important documents from my MacBook Pro at the end of the work day and restore/sync with my Hacki when I am home. And repeat ad nauseum. Prime idea, only I am not that diligent and nearly not as much of an industrious fellow.

After hearing all the buzz around OSX forums, I decided to give DropBox a try, and my, was I surprised! Amazingly seamless and scalable, this app is fast, lean, and does everything right! It maintains a local Folder on my Mac, which my applications can read from/write to, and backs up all the files therein to the central DropBox server. Any changes are immediately caught, and archived to the DropBox server in the background, as well as downloaded to any other computer linked with that account instantaneously. The possibilities are endless.

At first I used it to replace the Documents folder on my system, and started saving all my files to the DropBox. Easy enough – it sync’d all my files to all my machines. Next up, my scanned documents, and indeed, that was a snap. I then decided to sync my Adium Logs to the DropBox, which just involved creating a SymLink from my DropBox Chat Log folder to the Adium folder.

ln -s /Volumes/Documents/Home/Dropbox/Catalogs/Chat\ Logs/ /Volumes/Documents/Home/Library/Application\ Support/Adium\ 2.0/Users/Default/Logs

Could not be easier. For a while I was content with this, but the heart yearns for more. I decided to take up the next challenge, and as it turned out, this was the more challenging of the lot. Syncing my NewsFire RSS reader preferences, feeds, and read count.

One might assume that it would be as simple as creating a folder in the DropBox folder and Symlink’ing it to the NewsFire folder (or any App folder) in Application Support. But as it turns out, it of course isn’t as straightforward. For the successful syncing of apps across machines with DropBox we will need to replicate three folders/plists in the DropBox folder. These are

  1. Application PLIST (org.xlife.NewsFire.plist) originally in ~/Library/Preferences/
  2. Application Folder (NewsFire) originally in ~/Library/Application Support/
  3. Cache Folder (org.xlife.NewsFire) originally in ~/Library/Caches/

Copy/Move these three to the DropBox folder. Most of the help I found on the web dealing with this type of sync’ing stops at creating symlinks and doesn’t mention the Caches folder. Caches is very important as this will store the current state of the application. For instance, the number of read RSS entries in a news reader. I have read 11 latest at home, but in the meantime 13 new have arrived and if I didn’t have the caches folder, I would see 24 when I log in at work. Easy when there are a handful, but can get impossible if there are 100-500 new entries. Just an example.

Back to topic, now create Symlinks like so.

ln -s /Volumes/Documents/Home/Dropbox/PLISTS/org.xlife.NewsFire.plist /Volumes/Documents/Home/Library/Preferences/org.xlife.NewsFire.plist

ln -s /Volumes/Documents/Home/Dropbox/AppSupp/NewsFire /Volumes/Documents/Home/Library/Application\ Support/NewsFire

ln -s /Volumes/Documents/Home/Dropbox/Caches/org.xlife.NewsFire /Volumes/Documents/Home/Library/Caches/org.xlife.NewsFire

And Bob’s your uncle. A word of warning- this WILL fail if you don’t set the newly created Symlink to the PLIST as a Locked item. Just right click on the PLIST in Finder, and click the box that says Locked Item. This will prevent the App from overwriting the Symlink. It’s that simple.


 

6 thoughts on “Syncing Apps via Dropbox on OSX – HOWTO

  1. I followed your instructions and it works great. Trouble seems that when I add a new feed in newsfire, the plist in dropbox doesn’t seem to update. Is it the same on your end ?

  2. Hmm, it does update on my end actually. Did you lock the Symlink in ~/Library/Preferences ? I wrote that in the last para of my how-to. It does need to be locked else it will be overwritten by the app…

  3. I was wondering: would it work the other way round?
    I.e. linking a directory outside Dropbox within it?
    In the case of you chat logs, it woudl be:

    ln -s /Volumes/Documents/Home/Library/Application\ Support/Adium\ 2.0/Users/Default/Logs /Volumes/Documents/Home/Dropbox/Catalogs/Chat\ Logs/

  4. Hi! Thank you for the tip. I have the same problem of hyim. I can create the symlinks withouth problems, but after that the application is not able to modify the Plist anymore.
    As a consequence, any modification in the setting of the application is lost when I close the application.

    Do you know if there is a solution?

    Thanks,

    Guido

  5. I forgot to specify that I locked the symlinks after creating them. This step prevents the application to overwrite the Plist but on the other hand it prevents also to register any modification in the settings.

    Cheers,

    Guido

  6. Found this post as I’m trying to sync some apps the same way. I have the same problem as some of your other commenters. Transmit for example overwrites the symlink created in Prefs but locking the symlink prevents updates.

    How is it that this is not the case for you. Would love a solution to this. The overwriting is pretty much a show stopper.

    Dan J.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.