This article has multiple motivations. First, it is a follow-up to an article by Patrick Ohly (author of syncEvolution). As such it illustrates my own experience with his software, but also is meant as a way to show my gratitude and give kudos to him and all contributors of syncEvolution. Second, but this is somehow related to the aforementioned article, it should show that synchronisation [of PIM data] can work reliably and as such it opposes a wide spread opinion.
What I’ll try to show is how I’m successfully synchronising my notebook, my workstation (both Fedora 15) and my Android phone using the SyncML protocol.
Disclaimer: on the phone, I’m currently using a non-free piece of software from Synthesis AG for the only reason that the free Funambol client doesn’t play well with my self-signed SSL certificate (yet!?).
Server aka „cloud“
On the server-side, I’m using the eGroupware software. That means PHP with MySQL backend and a few cron scripts, hence quiet a „default“ set-up and easily joining my WordPress. For installation and updates I’m using their CentOS 5 repository hosted at the openSUSE build service.
eGroupware exposes a SyncML interface, but also supports GroupDAV, CalDAV and CardDAV for those with different tastes and/or clients.
Although syncEvolution is not intended to be limited to the GNOME Evolution software, that is what I’m using and the inter-play between the two works out of the box. To also work with the server, syncEvolution needs some tuning. After installation of
syncevolution-gtk, I created a stub configuration with
$ syncevolution --configure --sync-property "username=MYEGROUPWAREUSER" memotoo
then renamed it to match my own service
$ cd ~/.config/syncevolution $ mv default/peers/memotoo default/peers/fabianmoser
finally, I change the default setting to match my server by applying a patch (below)
$ patch -p1 < ~/syncevolution.patch
Here is the
syncevolution.patch file (explanations below):
diff -u -r old/config.ini new/config.ini --- old/config.ini 2011-07-06 09:45:01.952470598 +0200 +++ new/config.ini 2011-07-01 13:27:33.000000000 +0200 @@ -1,2 +1,2 @@ # the peer which is used by default in some frontends, like the sync-UI -# defaultPeer = +defaultPeer = fabianmoser diff -u -r old/default/peers/fabianmoser/config.ini new/default/peers/fabianmoser/config.ini --- old/default/peers/fabianmoser/config.ini 2011-07-06 09:48:16.758035192 +0200 +++ new/default/peers/fabianmoser/config.ini 2011-07-04 14:21:47.000000000 +0200 @@ -16,7 +16,7 @@ # In the future this might be used to contact the peer # via one of several transports; right now, only the first # one is tried. -syncURL = http://sync.memotoo.com/syncML +syncURL = https://fabianmoser.at/egroupware/rpc.php # user name used for authorization with the SyncML server username = MYEGROUPWAREUSER @@ -40,7 +40,7 @@ # enables or disables the detailed (and sometimes slow) comparison # of database content before and after a sync session -# printChanges = 1 +printChanges = 0 # Controls automatic synchronization. Currently, # automatic synchronization is done by running @@ -57,7 +57,7 @@ # http - only via HTTP transport # obex-bt - only via Bluetooth transport # http,obex-bt - pick one of these -# autoSync = 0 +autoSync = 1 # This is the minimum number of seconds between two # synchronizations that has to pass before starting @@ -72,7 +72,7 @@ # synchronization when changes are detected (not # implemented yet, therefore it basically disables # automatic synchronization). -# autoSyncInterval = 30M +autoSyncInterval = 60M # An automatic sync will not be started unless the peer # has been available for this duration, specified in seconds @@ -84,7 +84,7 @@ # to predict how long connectivity be available in the # future, because it should better be available long # enough to complete the synchronization. -# autoSyncDelay = 5M +autoSyncDelay = 5M # During a slow sync, the SyncML server must match all items # of the client with its own items and detect which ones it @@ -185,7 +185,7 @@ # An arbitrary name for the peer referenced by this config. # Might be used by a GUI. The command line tool always uses the # the configuration name. -# PeerName = +PeerName = fabianmoser # SyncML ID of our peer, empty if unknown; must be set only when # the peer is a SyncML client contacting us via HTTP. @@ -221,7 +221,7 @@ # # SSL support when acting as HTTP server is implemented # by the HTTP server frontend, not with these properties. -# SSLServerCertificates = /etc/ssl/certs/ca-certificates.crt:/etc/pki/tls/certs/ca-bundle.crt:/usr/share/ssl/certs/ca-bundle.crt +SSLServerCertificates = /home/fabian/.local/share/ssl/certs/fabianmoser.at.crt # The client refuses to establish the connection unless # the server presents a valid certificate. Disabling this @@ -238,7 +238,7 @@ # The URL of a web page with further information about the server. # Used only by the GUI. -WebURL = http://www.memotoo.com +WebURL = https://fmos.at # The URI of an icon representing the server graphically. # Should be a 48x48 pixmap or a SVG (preferred). diff -u -r old/default/peers/fabianmoser/sources/addressbook/config.ini new/default/peers/fabianmoser/sources/addressbook/config.ini --- old/default/peers/fabianmoser/sources/addressbook/config.ini 2011-07-06 09:48:16.758035192 +0200 +++ new/default/peers/fabianmoser/sources/addressbook/config.ini 2011-07-01 13:27:33.000000000 +0200 @@ -141,8 +141,8 @@ # xmlrpc:text/vcard:3.0 # xmlrpc:text/x-vcalendar:1.0 # xmlrpc:text/calendar:2.0 -type = addressbook +type = addressbook:text/x-vcard # this is appended to the server's URL to identify the # server's database -uri = con +uri = ./contacts diff -u -r old/default/peers/fabianmoser/sources/calendar/config.ini new/default/peers/fabianmoser/sources/calendar/config.ini --- old/default/peers/fabianmoser/sources/calendar/config.ini 2011-07-06 09:48:16.758035192 +0200 +++ new/default/peers/fabianmoser/sources/calendar/config.ini 2011-07-01 13:27:33.000000000 +0200 @@ -141,8 +141,8 @@ # xmlrpc:text/vcard:3.0 # xmlrpc:text/x-vcalendar:1.0 # xmlrpc:text/calendar:2.0 -type = calendar +type = calendar:text/calendar # this is appended to the server's URL to identify the # server's database -uri = cal +uri = ./calendar diff -u -r old/default/peers/fabianmoser/sources/todo/config.ini new/default/peers/fabianmoser/sources/todo/config.ini --- old/default/peers/fabianmoser/sources/todo/config.ini 2011-07-06 09:48:16.759035180 +0200 +++ new/default/peers/fabianmoser/sources/todo/config.ini 2011-07-01 12:02:16.000000000 +0200 @@ -145,4 +145,4 @@ # this is appended to the server's URL to identify the # server's database -uri = task +uri = ./tasks diff -u -r old/default/sources/addressbook/config.ini new/default/sources/addressbook/config.ini --- old/default/sources/addressbook/config.ini 2011-07-06 09:45:01.953470586 +0200 +++ new/default/sources/addressbook/config.ini 2011-07-01 13:27:33.000000000 +0200 @@ -123,7 +123,7 @@ # xmlrpc:text/vcard:3.0 # xmlrpc:text/x-vcalendar:1.0 # xmlrpc:text/calendar:2.0 -type = addressbook +type = addressbook:text/x-vcard # Picks one of backend data sources: # enter either the name or the full URL. diff -u -r old/default/sources/calendar/config.ini new/default/sources/calendar/config.ini --- old/default/sources/calendar/config.ini 2011-07-06 09:45:01.953470586 +0200 +++ new/default/sources/calendar/config.ini 2011-07-01 13:27:33.000000000 +0200 @@ -123,7 +123,7 @@ # xmlrpc:text/vcard:3.0 # xmlrpc:text/x-vcalendar:1.0 # xmlrpc:text/calendar:2.0 -type = calendar +type = calendar:text/calendar # Picks one of backend data sources: # enter either the name or the full URL.
What this does is setting the URL and configuring auto-sync for every 60 minutes. It tells syncEvolution that it should accept my SSL certificate. Finally, it changes the types and uris of the different SyncML sources, namely calendar, tasks and contacts, to match eGroupware.
The Synthesis client must again be pointed to the correct URL, i.e. the
rpc.php file of the eGroupware installation. Finally, the options must be changed such that the client accepts the self-signed certificate. If necessary, you can configure to which Android storage your PIM data should be synchronised.
I hope I could give a credible example of how synchronisation in my own little private "cloud" works. If this helps someone to create a similar set-up, even better.
The only disadvantage I see at the moment is, that I have to rely on a non-free client on the phone. Maybe other SyncML clients will at some point be able to cope with self-signed certificates. Or maybe there will be free and reliable CalDAV & CardDAV clients for Android?