Introduction


SyncEvolution makes it easy to keep two instances of Evolution in sync, or to keep a phone in sync with Evolution. This lets you share the data between a desktop and a laptop or phone without requiring any internet intermediary.

Requirements

  • Two instances of Evolution (or one instance and a phone with a SyncML client installed) on machines which can reach one another over the network. One host will act as the server (call this box "jupiter") and the other will be the client (call this box "ganymede"). The names, of course, do not matter.

  • syncevo-http-server >= 1.32 installed on the server, with the Evolution Data Server backends (libebook, libecal) enabled

  • A new local calender in evolution; i.e Work
  • avahi-daemon should be installed in all machines (server & clients)

(i) Here the goal is to use computer's HOSTNAME, so the machine can easily be reached in local-lan using $HOSTNAME.local instead of ip-address (Requires avahi-daemon to be installed on each machine.) Here synchronization between work calendars of these two machines are shown.

Sync Scenario (General)

Table

Hostanme

IP-Address

Peer

Server

jupiter

jupiter.local

jupiter

Client

ganymede

ganymede.local

ganymede

Client2

callisto

callisto.local

callisto

(i) For sake of simplicity Hostname names & peer names are similar.


Setup (Calendar-Sync)

Sync Scenario

Table

Hostanme

IP-Address

Source

Database

Peer

Server

jupiter

jupiter.local

workcal

Work

jupiter

Client

ganymede

ganymede.local

workcal

Work

ganymede

Client2

callisto

callisto.local

workcal

Work

callisto

Only synchronization between jupiter & ganymede is shown here.

1. First start syncevo-http-server on the server(Jupiter):

syncevo-http-server http://localhost:9000/syncevolution

Note: This listens on all interfaces, NOT localhost as it appears. It will keep running in the background.Do NOT close the terminal. It will show client's device-id after executing step 3.Open another terminal-prompt or tab for executing following commands.

2. Configure a peer on the client(Ganymede) to point to the server

syncevolution --configure --template SyncEvolution syncURL=http://jupiter.local:9000/syncevolution jupiter

You'll need to fill in the right IP or hostname.

3. Run the sync on the client to determine client device id:

syncevolution jupiter

This will fail, but will output the client device ID, which we need. On the server side(on Jupiter), you should see something like:

[ERROR] sync: no configuration found for deviceID (some long string of chars)

Copy & Save that string, you need it for the next step.

4. On the server, configure a peer for the client:

syncevolution --configure --template SyncEvolution_Client \
    --sync-property remoteDeviceId=<paste in the string> \
    --sync-property username= \
    --sync-property password= \
    --source-property uri= \
    ganymede

Replace remoteDeviceID with the string copied in previous step.

5. On the server,create a new source for work calendar:

syncevolution --configure backend=evolution-calendar database=Work @default workcal

If it is alreday created during other sync processes(i.e google-caledar), then this step is NOT required. To list all local databases run following command at terminal-prompt:

syncevolution --print-databases

6. On the server, enable access to the work-calendar for the client (repeat for each client):

syncevolution --configure sync=two-way ganymede workcal

7. On the client, configure and enable work-calendar:

syncevolution --configure backend=evolution-calendar database=Work sync=two-way jupiter workcal

On the client, list databases on client using the same commands as on the server.

8. Finally start the sync-process on the client(first-time)

syncevolution --sync=slow jupiter workcal

(i) For the first-time sync it is strongly recommended to use -- sync refresh-from-remote or --sync slow option during the sync to avoid duplicity.

(X) Caution: "refresh-from-client" option WILL DELETE EVERYTHING IN EVOLUTION CALENDAR (for caldav/carddav client is remote server & server is local client i.e. syncevolution) AND REPLACE WITH GOOGLE-CALENDAR.

To find all possible sync-option run following command at terminal-prompt:

syncevolution --sync ?

General sync-options are explained below:

Sync Option

Meaning

two-way

Normal two-way sync

slow

Exchange all data. Recommended for first time sync to avoid duplicity

refresh-from-remote

Deletes everything on client & replaces with server

refresh-from-local

Deletes everything on server & replaces with client

refresh-from-client

Deletes everything on server & replaces with client (opposite for caldav/carddav)

refresh-from-server

Deletes everything on client & replaces with server (opposite for caldav/carddav)

9. Start Normal Sync (After first sync)

syncevolution jupiter workcal

This will start two-way sync which is the default sync-option defined in step 6 & 7.

For other calendars repeat steps 2,3,4,6 & 7 with separate client-id, peer-name,ip-address & calendar-id for each calendar.Multiple data-sources can be synced at the same time:

syncevolution jupiter workcal personalcal

To sync all sources under a peer run:

syncevolution jupiter

10. Auto-run syncevolution server at boot:

Now one can close previously open terminal-prompt on server. It will terminate the server. To keep it running in the background run following command at terminal-prompt:

nohup syncevo-http-server http://localhost:9000/syncevolution &

One can also add this command to start-up programs to start it automatically at system boot.


Setup(Contacts-Sync)

Contacts can be synced same way as explained above. However for contacts sync evolution-contacts backend(i.e. backend=evolution-contacts) is used.

Sync Scenario

Table

Hostanme

IP-Address

Source

Database

Peer

Server

jupiter

jupiter.local

personaladb

Personal

jupiter

Client

ganymede

ganymede.local

personaladb

Personal

ganymede

Client2

callisto

callisto.local

personaladb

Personal

callisto

(i) The default source contacts is connected to evolution's default database .i.e.Personal. But a new source (personaladb) for the same databse is created to show how multiple contact list in evolution can be synced without affecting other peers(Memotoo, Google_Contacts) which uses default contact source.

Step5, Step6 & Step7 from above can be re-written for contacts sync as:

On the server,create a new source for Pesonal Contacts list:

syncevolution --configure backend=evolution-contacts database=Personal @default personaladb

If this source has already been created before for other sync process(i.e fruux, google-contacts, memotoo etc), then this step is NOT required.

On the server, enable access to the personal-addressbook for the client (repeat for each client):

syncevolution --configure sync=two-way ganymede personaladb

On the client, configure and enable personal-addressbook:

syncevolution --configure backend=evolution-contacts database=Personal sync=two-way jupiter personaladb

The rest of the steps can be modified accordingly.


Setup(Tasks-Sync)

Tasks can be synced same way as explained above. But for tasks sync evolution-tasks backend(i.e. backend=evolution-tasks) is used.

Sync Scenario

Table

Hostanme

IP-Address

Source

Database

Peer

Server

jupiter

jupiter.local

worktask

Work

jupiter

Client

ganymede

ganymede.local

worktask

Work

ganymede

Client2

callisto

callisto.local

worktask

Work

callisto

(i) Here, we are assuming that a new task-list (Work) in evolution has already been created on server & clients. Synchronization occurs among that particular task-list.

  • Step5, Step6 & Step7 from above can be re-written for tasks sync as:

On the server,create a new source for work-task list:

syncevolution --configure backend=evolution-tasks database=Work @default worktask

If this source has already been created before for other sync process(i.e fruux, radical, memotoo etc), then this step is NOT required.

On the server, enable access to the work-task list for the client (repeat for each client):

syncevolution --configure sync=two-way ganymede worktask

On the client, configure and enable work-task:

syncevolution --configure backend=evolution-tasks database=Work sync=two-way jupiter worktask

The rest of the steps can be modified accordingly.


Setup(Memos-Sync)

Tasks can be synced same way as explained above. But for Memo sync evolution-memos backend(i.e. backend=evolution-memos) is used.

Sync Scenario

Table

Hostanme

IP-Address

Source

Database

Peer

Server

jupiter

jupiter.local

worktmemo

Work

jupiter

Client

ganymede

ganymede.local

workmemo

Work

ganymede

Client2

callisto

callisto.local

workmemo

Work

callisto

(i) Here, we are assuming that a new memo-list (Work) in evolution has already been created on server & clients. Synchronization occurs among that particular memo-list.

Step5, Step6 & Step7 from above can be re-written for memos sync as:

On the server,create a new source for work-memo list:

syncevolution --configure backend=evolution-memos database=Work @default workmemo

If this source has already been created before for other sync process(i.e radical, memotoo etc), then this step is NOT required.

On the server, enable access to the work-memo list for the client (repeat for each client):

syncevolution --configure sync=two-way ganymede workmemo

On the client, configure and enable work-memo:

syncevolution --configure backend=evolution-memos database=Work sync=two-way jupiter workmemo

The rest of the steps can be modified accordingly.


Debugging & Troubleshooting

SyncEvolution/synchronize-evolution-data-among-computers-over-lan (last edited 2013-10-27 16:11:39 by 117)