A Collection is a collective term for addressbooks or calendars.
Collection Identifiers
Each collection has a unique identifier used in the collections parameter of a [pair] section:
- Filesystem storage: The name of the directory representing the collection.
- DAV storages: The last segment of the URL.
- Note: This identifier is distinct from the
displayname (the human-friendly name), which can change.
Special Collection Names
"from a" or "from b": Placeholders that include all collections found on side A or B during discovery.null: Tells vdirsyncer that the storage itself is the collection, rather than a container of collections. This is useful if your DAV server doesn't support listing collections or if you want to point directly to a specific collection URL.
Manual Pairing (Server-to-Server Sync)
When synchronizing two remote servers (e.g., NextCloud to iCloud), their collection names (UUIDs) likely won't match. You can manually pair them by providing a list of pairs in the collections parameter. Each sub-list in the array represents a mapping: ["local_name", "remote_name_a", "remote_name_b"].
Example of manual pairing:
[pair doublecloud]
a = "my_nextcloud"
b = "my_icloud"
# Maps 'mytest' to the specific collections on both servers
collections = [["mytest", "test", "3b4c9995-5c67-4021-9fa0-be4633623e1c"]]
You can then sync only this specific mapping using: vdirsyncer sync doublecloud/mytest.
[pair doublecloud]
a = "my_nextcloud"
b = "my_icloud"
collections = [["mytest", "test", "3b4c9995-5c67-4021-9fa0-be4633623e1c"]]