Difference between revisions of "Sync"
Line 15: | Line 15: | ||
</pre> | </pre> | ||
==== NextCloud | ==== NextCloud synchronizing ==== | ||
We will be synchronising the calendar and such using local '''maemo-events''', '''maemo-notes''' and '''maemo-tasks''' backends using the '''caldav''' backend. For contacts, we will synchronise '''evolution-contacts''' using '''carddav'''. | We will be synchronising the calendar and such using local '''maemo-events''', '''maemo-notes''' and '''maemo-tasks''' backends using the '''caldav''' backend. For contacts, we will synchronise '''evolution-contacts''' using '''carddav'''. | ||
Line 29: | Line 29: | ||
</pre> | </pre> | ||
Finally, for your address book (contacts) | Finally, for your address book (contacts) synchronization, the '''contacts URL''' is needed (in Nextcloud, go to contacts, settings, "Copy Link" for your contacts): | ||
<pre> | <pre> | ||
Line 35: | Line 35: | ||
</pre> | </pre> | ||
Given the above, a setup to | Given the above, a setup to synchronize calendar, tasks, notes and contacts could look like this: | ||
<pre> | <pre> | ||
Line 46: | Line 46: | ||
syncevolution --configure \ | syncevolution --configure \ | ||
--template webdav \ | |||
database=CALENDAR-URL-HERE \ | database=CALENDAR-URL-HERE \ | ||
backend=caldavtodo \ | backend=caldavtodo \ | ||
Line 51: | Line 52: | ||
syncevolution --configure \ | syncevolution --configure \ | ||
--template webdav \ | |||
database=CALENDAR-URL-HERE \ | database=CALENDAR-URL-HERE \ | ||
backend=caldavjournal \ | backend=caldavjournal \ | ||
Line 56: | Line 58: | ||
syncevolution --configure \ | syncevolution --configure \ | ||
--template webdav \ | |||
database=CALENDAR-URL-HERE \ | database=CALENDAR-URL-HERE \ | ||
backend=caldav \ | backend=caldav \ | ||
Line 61: | Line 64: | ||
syncevolution --configure \ | syncevolution --configure \ | ||
--template webdav \ | |||
database=CONTACTS-URL-HERE \ | database=CONTACTS-URL-HERE \ | ||
backend=carddav \ | backend=carddav \ | ||
Line 110: | Line 114: | ||
</pre> | </pre> | ||
Use the '''two-way''' | Use the '''two-way''' synchronization method for '''normal synchronization''' (daily, hourly, etc synchronizations), like so: | ||
<pre> | <pre> | ||
Line 130: | Line 134: | ||
# The main DAV url is simple the URL to your radicale server (without the .web part) | # The main DAV url is simple the URL to your radicale server (without the .web part) | ||
# The calendar URL is simply the http(s) URL to the calendar that you want to | # The calendar URL is simply the http(s) URL to the calendar that you want to synchronize | ||
# The contacts URL is simple the http(s) URL of the addressbook that you want to | # The contacts URL is simple the http(s) URL of the addressbook that you want to synchronize | ||
The username (and optional password) are the radicale credentials. | The username (and optional password) are the radicale credentials. | ||
Line 145: | Line 149: | ||
</pre> | </pre> | ||
Now browse to http://localhost:5223, create an account (password is optional), and you should be able to | Now browse to http://localhost:5223, create an account (password is optional), and you should be able to synchronize, assuming the devices can reach your radicale server (don't have it listen on localhost only, perhaps use 0.0.0.0:5223 for LAN testing) | ||
== Files | == Files synchronization == | ||
TODO | TODO |
Revision as of 00:24, 10 October 2022
Synchronisation
This page explains and suggests various ways of synchronising contacts, calendars and files.
Calendar, Notes, Tasks and Contacts
Synchronising calendar, notes and tasks (using CalDav) and contacts (using CardDav) can be done using syncevolution (other backends are available, but not currently documented here). A frontend to running synchronisation tasks is available in the repository (Syncevolution Frontend).
Synchronising with syncevolution CalDav + CardDav
If you get stuck in an odd state setting this up, you could consider running the following to get to a clean state, at least with regards to syncevolution configuration:
rm -rf /home/user/.config/syncevolution
NextCloud synchronizing
We will be synchronising the calendar and such using local maemo-events, maemo-notes and maemo-tasks backends using the caldav backend. For contacts, we will synchronise evolution-contacts using carddav.
A few URLs are required, first, the main Nextcloud DAV url, this seems to be of the form:
https://my.nextcloud.org/remote.php/dav
then there is the url for a specific calendar, this is called the "Private Link" and you can get it by clicking "Copy Private Link" for a given calendar in Nextcloud, this might look like so:
https://my.nextcloud.org/remote.php/dav/calendars/userhere/calendarnamehere/
Finally, for your address book (contacts) synchronization, the contacts URL is needed (in Nextcloud, go to contacts, settings, "Copy Link" for your contacts):
https://my.nextcloud.org/remote.php/dav/addressbooks/users/userhere/contacts/
Given the above, a setup to synchronize calendar, tasks, notes and contacts could look like this:
syncevolution --configure \ --template webdav \ username=NEXTCLOUD-USER-HERE \ password=NEXTCLOUD-PASS-HERE \ syncURL=MAIN-DAV-URL-HERE \ target-config@nextcloud syncevolution --configure \ --template webdav \ database=CALENDAR-URL-HERE \ backend=caldavtodo \ target-config@nextcloud nextcloudtodo syncevolution --configure \ --template webdav \ database=CALENDAR-URL-HERE \ backend=caldavjournal \ target-config@nextcloud nextcloudjournal syncevolution --configure \ --template webdav \ database=CALENDAR-URL-HERE \ backend=caldav \ target-config@nextcloud nextcloudcal syncevolution --configure \ --template webdav \ database=CONTACTS-URL-HERE \ backend=carddav \ target-config@nextcloud contacts syncevolution --configure \ --template SyncEvolution_Client \ sync=none \ syncURL=local://@nextcloud \ username= \ password= \ nextcloud syncevolution --configure \ sync=two-way \ backend=maemo-tasks \ database= \ nextcloud nextcloudtodo syncevolution --configure \ sync=two-way \ backend=maemo-notes\ database= \ nextcloud nextcloudjournal syncevolution --configure \ sync=two-way \ backend=maemo-events \ database= \ nextcloud nextcloudcal syncevolution --configure \ sync=two-way \ backend=evolution-contacts \ nextcloud contacts
All of the above is configuration that only needs to be done once.
Depending on your exact situation, your initial synchronisation could only use only values from your phone, from your nextcloud, or both. If you want to merge both, my understanding is that the slow method achieves this:
syncevolution --sync slow nextcloud nextcloudjournal syncevolution --sync slow nextcloud nextcloudtodo syncevolution --sync slow nextcloud nextcloudcal syncevolution --sync slow nextcloud contacts
Use the two-way synchronization method for normal synchronization (daily, hourly, etc synchronizations), like so:
syncevolution --sync two-way nextcloud nextcloudjournal syncevolution --sync two-way nextcloud nextcloudtodo syncevolution --sync two-way nextcloud nextcloudcal syncevolution --sync two-way nextcloud contacts
Warning: TLS Chain validation issues
If you run into problems with TLS Chain validation, first try to figure out if the problem is on your end. Syncevolution did have a problem for me validation the chain of my next cloud instance, so for testing purposes I set SSLVerifyServer = 0 in /home/user/.config/syncevolution/nextcloud/peers/target-config/config.ini
Radicale synchronising
Radicale is a simple CardDAV and CalDAV server, and is set up similarly to nextcloud. Just browse to the Radicale web URL, and use the following URLs:
- The main DAV url is simple the URL to your radicale server (without the .web part)
- The calendar URL is simply the http(s) URL to the calendar that you want to synchronize
- The contacts URL is simple the http(s) URL of the addressbook that you want to synchronize
The username (and optional password) are the radicale credentials.
Radicale Testing Server
For testing purposes, here is how to quickly run a radicale server, this assumed it's installed.
mkdir -p ~/radicale cd ~/radicale python3 -m radicale --config "" --storage-filesystem-folder `pwd` -H localhost:5223 --logging-level info
Now browse to http://localhost:5223, create an account (password is optional), and you should be able to synchronize, assuming the devices can reach your radicale server (don't have it listen on localhost only, perhaps use 0.0.0.0:5223 for LAN testing)
Files synchronization
TODO