diff --git a/1to2.md b/1to2.md index 08ca9a04..f621cafc 100644 --- a/1to2.md +++ b/1to2.md @@ -1,5 +1,79 @@ --- layout: page -title: Migration from 1.x to 2.0 +title: Migration from 1.x.x to 2.0.x permalink: /1to2/ --- + +## Why a Migration? + +Radicale 2.0.x is different from 1.x.x, here's everything you need to know about +this! **Please read this page carefully if you want to update Radicale.** + +You'll also find extra information +in [issue #372](https://github.com/Kozea/Radicale/issues/372). + +### Python 3 Only + +Radicale 2.0.x works with Python >= 3.3, and **doesn't work anymore with +Python 2**. + +(No, Python 3.3 is not new, it's been released more than 4 years ago. +Debian stable provides Python 3.4.) + +### Dependencies + +Radicale now depends on [VObject](https://eventable.github.io/vobject/), a +"full-featured Python package for parsing and creating iCalendar and vCard +files". That's the price to pay to correctly read crazy iCalendar files and +**support date-based filters, even on recurring events**. + +### Storage + +Calendars and address books are stored in a different way between 1.x.x and 2.0.x +versions. **Launching 2.0.x without migrating your collections first will not +work, Radicale won't be able to read your previous data.** + +There's now only one way to store data in Radicale: collections are stored as +folders and events / contacts are stored in files. This new storage is close to +the `multifilesystem`, but **it's now thread-safe, with atomic writes and file +locks**. + +Migrating your data can be done with tool called +[transplant](https://github.com/Kozea/transplant/blob/master/transplant.py) +that will copy your collections from one server to another using +CalDAV / CardDAV requests. Following these simple steps will help you migrate +your data: + +- Stop Radicale 1.x.x, +- edit your configuration to only listen to `http://localhost:5232`, +- remove authentication, +- restart the 1.x.x server, +- download Radicale 2.0.x and go into the downloaded folder, +- launch Radicale 2.0.x with + `python3 radicale.py --config=/dev/null --hosts=localhost:5233 --storage-filesystem-folder=~/.local/share/radicale/`, +- download transplant and go into the downloaded folder, +- launch transplant with `python3 transplant http://localhost:5232 http://localhost:5233`, +- you're done! + +This migration should work at least with simple configurations of Radicale 1.x.x +on Linux and macOS. Please adapt these steps carefully if you're on Windows or +if you're using a more complex configuration. + +Other storage types can be used by creating [plugins](/plugins/). These storage +types can reuse the current storage class to extend it (for example to add +versioning) or can be totally different from it (yes, don't worry, you can +write your own storage plugin using a DataBase®™ if you want). + +### Authentication + +**Radicale 2.0.x only provides htpasswd authentication out-of-the-box.** Other +authentication methods can be added by creating or using [plugins](/plugins/). + +### Rights + +In Radicale 2.0.x, rights are managed using regex-based rules based on the +login of the authenticated user and the URL of the resource. Default +configurations are built in for common cases, you'll find more about this on +the [Authentication & Rights](/rights/) page. + +Other rights managers can be added by creating [plugins](/plugins/).