Sync Epiphany bookmarks with Unison and Dropbox

Written on Apr 20, 2009 // Net, Open Source.

Yes, since I was able to run Dropbox on Fluxbox I’m quite exhausting it, trying to sync most of my work settings with my home computer.

As I prefer using Epiphany to FirefoxFirefoxFirefox, I needed to find a way to easily sync my bookmarks but unfortunately the symbolic link made from epiphany folder to the DropboxDropboxDropbox one didn’t work as expected, and I didn’t want to use Epilicious ( -> Magnolia) to store all my bookmarks.

So I tried with Rsync but the result was not so good, as it’s not natively bidirectional. Unison, instead, worked exactly as I wanted to!

mkdir ~/Dropbox/epiphany
unison ~/.gnome2/epiphany/ ~/Dropbox/epiphany/ -path ephy-bookmarks.xml -terse -auto -silent -ui text

Unison will sync the two files, merging them or giving output about conflicts (if you modified the file on both computers and it’s not able to merge them, like svn does). Also note that while usually unison works with directories I imposed to sync just the ephy-bookmarks.xml file, using the -path option.

As the file is not that big and it’s not modified so often I put the command on the crontab every 2 minutes. You should choose a period that fits your pc load/activity…

crontab -e
*/2 * * * * unison ~/.gnome2/epiphany/ ~/Dropbox/epiphany/ -path ephy-bookmarks.xml -terse -auto -silent -ui text

I think this can be useful to sync even other services/preferences…


blog comments powered by Disqus