CalDAV
#The CalDAV integration enables backup and restoration of calendar data from
any CalDAV-compliant server. Calendar events are captured as .ics files and
stored in a Kloset store with encryption and deduplication.
Supported providers include Nextcloud, Fastmail, Google, Apple, and any CalDAV-compliant server.
The CalDAV integration provides two connectors:
| Connector type | Description |
|---|---|
| Source connector | Back up calendar events from a CalDAV server into a Kloset store. |
| Destination connector | Restore calendar events from a Kloset store to a CalDAV server. |
Installation
#The CalDAV package can be installed using pre-built binaries or compiled from source.
Pre-compiled packages are available for common platforms and provide the simplest installation method.
Logging In
Pre-built packages require Plakar authentication. See Logging in to Plakar for details.
Install the CalDAV package:
$ plakar pkg add caldavVerify installation:
$ plakar pkg listSource builds are useful when pre-built packages are unavailable or when customization is required.
Prerequisites:
- Go toolchain compatible with your Plakar version
Build the package:
$ plakar pkg build caldavA package archive will be created in the current directory (e.g.,
caldav_v1.0.0_darwin_arm64.ptar).
Install the package:
$ plakar pkg add ./caldav_v1.0.0_darwin_arm64.ptarVerify installation:
$ plakar pkg listTo list, upgrade, or remove the package, see managing packages guide.
Configuration
#Configuration options
#| Option | Description |
|---|---|
location |
Required. CalDAV server URL, for example caldav://cal.example.org. |
username |
Required for most providers. Username to authenticate with. |
password |
Required for most providers. Password or app-specific token to authenticate with. |
name |
OAuth2 provider name, for example google, microsoft, or apple. |
client_id |
OAuth2 client ID. Required when using OAuth2 authentication. |
client_secret |
OAuth2 client secret. Required when using OAuth2 authentication. |
Providers that support basic authentication (Nextcloud, Fastmail, and most
self-hosted servers) only require username and password. Providers that
require OAuth2 (Google, Microsoft, Apple) require name, client_id, and
client_secret instead.
Source connector
#The source connector retrieves calendar events from a CalDAV server and stores
them as .ics files in a Kloset store with encryption and deduplication.
flowchart LR subgraph Source["CalDAV Server"] FS["Calendar Events"] end subgraph Plakar["Plakar"] Connector["Retrieve events via
CalDAV"] Transform["Encrypt & deduplicate"] Connector --> Transform end Source --> Connector Store["Kloset Store"] Transform --> Store
Register the source and run a backup:
$ plakar source add my-caldav \
caldav://cal.example.org \
username=<YOUR_USERNAME> \
password=<YOUR_PASSWORD>
$ plakar at /var/backups backup "@my-caldav"Destination connector
#Restores calendar events from a Kloset store back to a CalDAV server.
flowchart LR Store["Kloset Store"] subgraph Plakar["Plakar"] Transform["Decrypt & reconstruct"] Connector["Restore via
CalDAV"] Transform --> Connector end Store --> Transform subgraph Destination["CalDAV Server"] FS["Calendar Events"] end Connector --> Destination
Register the destination and restore a snapshot:
$ plakar destination add my-caldav-restore \
caldav://cal.example.org \
username=<YOUR_USERNAME> \
password=<YOUR_PASSWORD>
$ plakar at /var/backups restore -to "@my-caldav-restore" <snapshot_id>Notes
#- Calendar data is stored as standard
.icsfiles, making snapshots portable across any CalDAV-compatible provider. - For Google, Microsoft, and Apple, OAuth2 credentials must be configured when adding the source or destination.
- App-specific passwords are recommended over account passwords where supported by the provider.