Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| owncloud [27.03.2016 17:04] – Pascal Suter | owncloud [16.07.2021 00:30] (current) – [synchronize external caldav and carddav sources] Pascal Suter | ||
|---|---|---|---|
| Line 119: | Line 119: | ||
| ===== synchronize external caldav and carddav sources ===== | ===== synchronize external caldav and carddav sources ===== | ||
| + | **UPDATE** I have moved away from python virtualenv as it broke vdirsyncer on almost every os update. I now run vdirsyncer in a docker container based on [[https:// | ||
| + | |||
| **caution** this has only been done one-way, so that an external calender which is only changed externally gets regularly synced to owncloud. i haven' | **caution** this has only been done one-way, so that an external calender which is only changed externally gets regularly synced to owncloud. i haven' | ||
| prior to owncloud9 there was a sync script which did exactly that. unfortunately it no longer works with oc9 and the developer has posted that he won't fix it, so we need a new solution. | prior to owncloud9 there was a sync script which did exactly that. unfortunately it no longer works with oc9 and the developer has posted that he won't fix it, so we need a new solution. | ||
| - | currently i am trying to use [[https:// | + | currently i am using [[https:// |
| apt-get install libxml2 libxml2-dev libxslt libxslt-dev zlib1g python python-virtualenv python-pip | apt-get install libxml2 libxml2-dev libxslt libxslt-dev zlib1g python python-virtualenv python-pip | ||
| - | | + | |
| - | | + | pipsi --home |
| - | / | + | |
| + | chmod 777 / | ||
| + | now it's time to configure your vdirsyncer.. in my case i wanted to sync a html read-only source (ical format) to owncloud. here is my config file: | ||
| + | < | ||
| + | [pair photokiste] | ||
| + | a = " | ||
| + | b = " | ||
| + | collections = null | ||
| + | conflict_resolution = "a wins" | ||
| + | |||
| + | [storage photokiste_crm] | ||
| + | type = " | ||
| + | url = " | ||
| + | |||
| + | [storage photokiste_owncloud] | ||
| + | type = " | ||
| + | url = " | ||
| + | username = " | ||
| + | password = " | ||
| + | </ | ||
| + | the owncloud calendar name can be viewed by hovering over the calendar. it will appear as mouse pointer tooltip. | ||
| + | |||
| + | one thing on the ical format.. i used a library called '' | ||
| + | DTSTART; | ||
| + | and a line like this for date + time start and end dates: | ||
| + | DTSTART: | ||
| + | (PHP iCalWriter never added the ; | ||
| + | this might be an onwcloud problem, as owncloud exports the " | ||
| + | |||
| + | once the config file is written, vdirsyncer needs to be run to initialize the account. as the user who will run vdirsyncer later on run this command: | ||
| + | VDIRSYNCER_CONFIG=/opt/owncloud/photokiste.conf | ||
| + | now vdirsyncer can be run through cron or manually like this: | ||
| + | | ||
| + | |||
| + | that's it :) .. theoretically vdirsyncer should also support two way sync, but i haven' | ||
| + | ==== Update Vdirsyncer ==== | ||
| + | you can run updates using pipsi as well: | ||
| + | pipsi --home / | ||
| + | ==== fix vdirsyncer after OS upgrade ==== | ||
| + | you might just need to re-install vdirsyncer | ||