Introduction
We are going to synchronize google-calendars(Personal, Work) with evolution calendars (Personal, Work) respectively.For shake of simplicity we took similar name for these calendars.
These following commands are documented assuming one is using latest syncevolution (syncevolution >=1.32)
Sync Scenario
Google Calendar |
Evolution Calendar |
Source |
Database |
Peer |
Work |
Work |
workcal |
Work |
gcal |
Personal |
Personal |
personalcal |
Personal |
One can choose any arbitrary peer name.
Setup
Synchronization between work calendars is shown here
1. Create a Peer for Google calendar (gcal)
syncevolution --configure --template Google_Calendar username=YOURUSERNAME@gmail.com password=**** target-config@gcal
Here Google_Calendar template is used. One can also use webdav template. To list the known configuration templates run following commands at terminal-prompt:
syncevolution --template ?
2. Create a new source for work calendar
syncevolution --configure backend=evolution-calendar database=Work @default workcal
3. Add a remote database to the source (workcal)
syncevolution --configure database=https://www.google.com:443/calendar/dav/GOOGLRCALENDARID@group.calendar.google.com/events/ backend=caldav target-config@gcal workcal
Replace GOOGLECALENDARID with your own google-calendar id for work calendar. To find the required calendar-id go to google-calendar. Hover mouse over respective calendar, click down arrow & select settings.Then copy the calendar id as shown in the following image:
4. Connect remote calendars with local databases (sync-config)
syncevolution --configure --template SyncEvolution_Client syncURL=local://@gcal username= password= gcal workcal
5. Add a local database to the source (workcal)
syncevolution --configure sync=two-way database=Work gcal workcal
To list all local databases run following command at terminal-prompt:
syncevolution --print-databases
6. Check whether configured properly (Optional)
To check whether all configuration is working properly one can print all items in local or remote databse.
To print all items(calendar events) in local database run:
syncevolution --print-items gcal workcal
To print all items(calendar events) in remote database run:
syncevolution --print-items target-config@gcal workcal
7. Start syncing (First-Time)
syncevolution --sync refresh-from-client gcal workcal
For the first-time sync it is strongly recommended to use -- sync refresh-from-client or --sync slow option during the sync to avoid duplicity.
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-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) |
8. Start Normal Sync (After first sync)
syncevolution gcal workcal
This will start two-way sync which is the default sync-option defined in step 5.
For other calendars repeat steps 2,3,4,5,6 & 7 with separate data-source & calendar-id for each calendar.Multiple data-sources can be synced at the same time:
syncevolution gcal workcal personalcal
To sync all sources under a peer run:
syncevolution gcal
Restore from backup
One can go back to original state after the sync if anything goes wrong.