Sync Safari Bookmarks and History with Dropbox

After setting up dropbox to sync 1password I thought “why not bookmarks?”. Well, OS X makes it easy.

What I’ve done is sym link the bookmark.plist and histroy.plist to drop box. Symbolic links work like this in the terminal,

ln -s [TARGET DIRECTORY OR FILE] [SHORTCUT]

Here are the two easy steps I used to sync Safari Bookmarks and History.

  1. I created a Safari folder in Dropbox (found at  ~/Dropbox/Safari).
  2. Used the terminal to create the sym links (see below)
$ cd ~/Library/Safari/

$ ln -s ~/Dropbox/Safari/Bookmarks.plist Bookmarks.plist

$ ln -s ~/Dropbox/Safari/History.plist History.plist

Here’s a screenshot of the result.sync-safari-bookmarks-and-history-with-drop-box

To Sync, since it wont be done automatically. Just restart your browser.

Warning: I haven’t tested this extensively but it seems to work great. After a day on my work computer I just come home to restart webkit, the bookmarks then are updated..

About the Author, Dan Cameron:

I'm the owner and solution engineer at Sprout Venture, a web solutions company that specializes in web development including WordPress.

I started my first blog in 2003 and transitioned to WordPress in 2004. Since moving to WordPress I've written a few plugins and themes for public consumption. Lately I'm busy engineering/building/coding and have only been able to share a few code snippets.

If you're in need of some web development, web design or custom WordPress plugins and/or themes contact me, I'll be happy to discuss it with you.

Read More »

  • And yes, it is possible as Jon Fox's tutorial shows: http://jonefox.com/blog/2009/11/16/how-to-sync-...
  • I wonder if the similar procedure for bookmark synchronization on Dropbox could be performed on Windows using Firefox without any addons but purely Dropbox and Windows.
  • julienrobert
    I tried that trick under Snow Leopard 10.6.2 and it doesn't seem to work (Safari 4.0.3) It looks like Safari replace automatically the Symbol links with real files...

    It works under Leopard with Safari 4.0.4.

    Anyone has found a workaround?
  • jhm6
    I got it to work on SL 10.6.2 Safari 4.0.4, but on my power pc with OSX 10.4.11 and Safari 4.0.4, it does as you say-- writes over the symbolic link file with a new Bookmarks.plist file, defeating the purpose. Any luck?
  • [A different] Dan
    Yea I've tried this many times and don't think it ever worked (I think I tried over a year ago with Leopard and whatever was current then, and I tried again last month in SL.) The only solution I've found is to sync the whole Safari Library folder (see my comment near the bottom of this thread - the one in reply to @James Saxon's reply to @Ed Nieto.)
  • very good solution! easy to configure!
  • I should update this post because I think the best solution now is foxmarks. It manages the merges and works great--even with Safari 4.
  • [A different] Dan
    But can xmarks sync history? I have MobileMe for bookmark sync... I am currently using the solution provided for syncing history but Safari crashes a lot and I'm wondering if that has something to do with it...
  • 2manydjs
    Unfortunately this doesn't seem to work with Safari 4. The alias (or symlink) will be overwritten. Making a link to the whole ~/Library/Safari folder does work.
  • Ed Nieto
    Hi Dan... I must be a dimwit because when I follow your instructions & type in the line "ln -s ~/Dropbox/Safari/Bookmarks.plist Bookmarks.plist", terminal reports back that the file already exists, even though when I look in ~/Library/Safari/ there is nothing there but the originals... no alias-linked files like you show in your screen capture ??!!
    Any ideas ?

    Thanks
  • I think the ln -s command is backwards... I get same message, but then I sounds like for Safari 4 there are better ways of doing it?
  • [A different] Dan
    No, they aren't backwards... He just forgot to mention that first you have to copy the two original .plist files to Dropbox and delete them from their original location. Then the command will make SymLinks in the Safari folder pointing to the files on Dropbox.
  • [A different] Dan
    Oh wait, no. I think he did what I describe but that doesn't work (maybe it did in previous versions.) As @2manydjs says above, the links get overwritten. If you instead copy the whole ~/Library/Safari folder to Dropbox and then make a symlink to that as shown below, it will work.

    cd ~/Library/
    mv Safari/ ~/Dropbox/Sync/MacOSX/
    ln -s ~/Dropbox/Sync/MacOSX/Safari/ Safari
  • julienrobert
    It works fine like this.
  • Ryan Gaudet
    Thanks a bunch for this. I spent about an hour searching for this exact solution. Nice and simple solution.
blog comments powered by Disqus