PIMSYNC-MIGRATION(7)

πŸ“¦
version 0.5.10 Β· 3 versions
, in alpine 3.24, nixos 26.05

okay bestie, buckle up 🫢 this is pimsync-migration(7) β€” the migration guide from vdirsyncer to pimsync πŸ’… straight outta the Miscellaneous Information Manual, no cap.

✨ NAME ✨

pimsync-migration β€” migration guide from vdirsyncer to pimsync. That's the whole name, periodt. If you're moving from vdirsyncer to pimsync, this is your group-chat recap. πŸ’–

πŸ’– DESCRIPTION πŸ’–

This migration guide covers the changes to keep in mind when migrating from vdirsyncer to pimsync. It's geared toward users who already have a working configuration of the previous implementation. So if your vdirsyncer setup is alive and functioning? Perfect, this is literally for you. ✨

🫣 MISSING FEATURES 🫣

vdirsyncer 0.19.3 ships these, but pimsync does not currently have them (the original says β€œnot currently not available” β€” iconic double-negative chaos, but the meaning is: missing 😭). Here's the list:

  • auth digest β€” This needs to be implemented as a β€˜tower-service’ middleware. Should not be too complicated.
  • partial_sync β€” This configuration parameter probably won't come back in the same way. A β€œmirror” is the most likely successor. With this directive set, pimsync(1) would make B a mirror of A. In this mode, exactly one storage MUST be defined a read_only.
  • post_hook β€” configuration parameter. Future versions might stream events, so external handlers can react to them instead.
  • start_date, end_date, and item_types β€” configuration parameters for CalDAV storages. These are planned, but no specific time frame.
  • The singlefile storage β€” which saves all events in a calendar into a single file.
  • Support for Google's flavour of CalDAV and CardDAV β€” This includes OAuth support.

And these ones are not present and unlikely to be implemented without a compelling use case. Please reach out if you require some of these:

  • Encodings other than UTF-8
  • All metadata is synchronised. Selecting individual fields is not currently possible.
  • The fileignoreext configuration parameter.

πŸ› οΈ CONFIGURATION FILE FORMAT πŸ› οΈ

The configuration format has changed. The general approach is the same, but the syntax has been greatly simplified for humans to write. Technically, the format is the scfg format. It is documented in detail in pimsync.conf(5).

The following:

[pair.contacts]
a = "contacts_local"
b = "contacts_fastmail"
collections = "all"
conflict_resolution = ["command", "nvim", "-d"]

Becomes:

pair contacts {
        storage_a contacts_local
        storage_b contacts_fastmail
        collections all
        conflict_resolution cmd nvim -d
}

And the following:

[storage.contacts_local]
type = "filesystem"
path = "~/.local/share/contacts/"
fileext = "vcf"

Becomes this:

storage contacts_local {
        type vdir/vcard
        path ~/.local/share/contacts/
        fileext vcf
}

πŸ” FETCH MECHANISMS πŸ”

The prompt mechanism for fetching passwords has been dropped. Gone. No more prompt. 😭

A fetch definition with a command would previously look like this:

password.fetch = ["command", "hiq", "-dFpassword", "proto=carddavs", "username=…"]

Now a block is provided to password with a single cmd directive specifying the command and its arguments.

password {
        cmd hiq -dFpassword proto=carddavs username=…
}

A fetch definition with a shell now uses a similar syntax:

password {
        shell pass show communication/migadu.com | head -1
}

πŸ” MIGRATING FETCH / PROMPT πŸ”

Use an external prompter instead. For a GUI prompter, consider using:

password {
        cmd zenity --password
}

pimsync(1) will request passwords in sequence, so no special considerations are required to prevent concurrent prompts. Lowkey convenient. ✨

🧭 MANUAL DISCOVERY IS NO LONGER REQUIRED 🧭

Discovering collections ahead of time is no longer required. Collections are discovered automatically if necessary. The discover command merely prints discovered collections as a convenience for manually configuring collections. It does not affect pimsync's internal state. See pimsync(1) for details.

πŸͺ„ AUTOMATIC CREATION OF COLLECTIONS πŸͺ„

If a pair is configured to synchronise all collections from a and a new collection is found on storage A, then the collection will automatically be created on storage B. For scenarios where automatic creation of collections is undesirable, the move is to specify individual collections explicitly instead.

πŸ§ͺ DRY RUNS ARE NOW POSSIBLE πŸ§ͺ

It is now possible to execute a dry run, which only prints the tentative plan without executing it. The output is somewhat terse at this stage and not in its final form. This can be used to audit new configurations and ensure that the planned actions make sense. Yes bestie, dry runs are now a thing. 🧚

πŸ“ FILESYSTEM STORAGES HAVE BEEN RENAMED TO VDIR πŸ“

Filesystem collections have been renamed to vdir. They must now specify what type of items they contain.

A directory with icalendar files should specify:

type = "vdir/icalendar"

A directory with vcard files should specify:

type vdir/vcard

🌈 CUSTOM ENCODINGS FOR VDIR STORAGE 🌈

The vdir storage saves files as UTF-8. If another encoding is required for some scenario, please open an issue at: https://todo.sr.ht/~whynothugo/pimsync

πŸŽ€ FILESYSTEM FILEEXT FIELD πŸŽ€

The fileext field for filesystem storages required a leading dot. This is no longer the case; the dot is not considered part of the extensions and should be omitted. Omit the leading dot when porting configurations.

πŸ—‚οΈ COLLECTIONS ARE DECLARED IN A DIFFERENT FORMAT πŸ—‚οΈ

To synchronise all collections from both sides, use:

collections all

To synchronise all collections present on a specific storage, use:

collections from b

🎯 SPECIFYING INDIVIDUAL COLLECTIONS 🎯

Individual collections can be specified by id or by href: file ... id is the name from the discovery process. file ... href is the full path inside the storage.

Generally, using an id is recommended. Using href is intended for situations where discovery is not possible or where multiple collections have the same id. To specify a single collection by id, use:

collection c037725e-e4fd-4b3e-b73d-d5e27d5a90a9

The above will find and synchronise collections with the given id between both storages.

Two different collections can be mapped on each side:

pair my_pair {
        # other fields here

        # first collection
        collection {
                        alias personal
                        href_a /calendars/hugo/c037725e-e4fd-4b3e-b73d-d5e27d5a90a9/
                        href_b /personal/
        }

        # another collection
        collection {
                        alias work
                        id_a work
                        href_b /calendars/work/
        }
}

Specifying collection null is no longer allowed; configuration should point to an explicit collection instead.

🌐 HTTP STORAGE IS NOW CALLED WEBCAL 🌐

The type of the http storage is now webcal, to better reflect its nature; other storages also use HTTP internally.

πŸ†” WEBCAL COLLECTION ID πŸ†”

Due to its nature, the WebCal storage has a single collection. However, this collection has no id. A collection id must be provided for it explicitly. This simplifies configurations where it must be synchronised to another calendar with the same collection id.

storage calendars_lessons {
        type http
        collection_id lessons
        url {
                cmd hiq -dFurl proto=webcal alias=lessons
        }
}

πŸ”’ READ ONLY πŸ”’

The read_only takes no values. Its presence makes a storage read only. To make a storage read-write, remove the directive.

πŸ“Š STATUS πŸ“Š

Vdirsyncer keeps a status database in order to distinguish whether an item has changed on one side or both. Pimsync does not import this status database in any way. If you are migrating and have existing remote and local storages, make sure that they are in sync before switching over. After the first run, pimsync will build its own status database.

Migrating with out-of-sync storages will result in conflicts during the first run. This is the dramatic part β€” pls don't skip the sync check. πŸ’€

πŸ” TLS CONFIGURATION πŸ”

The verify configuration directive is now named tls_root.

The verify_fingerprint configuration directive is now named tls_fingerprint.

πŸ› ISSUES πŸ›

Please report issues at: https://todo.sr.ht/~whynothugo/vdirsyncer-rs

If you have a working vdirsyncer configuration, and this page is missing details necessary when upgrading, please reach out so this documentation can be improved.

πŸ‘€ SEE ALSO πŸ‘€


k, that's the whole migration guide. Signed with source/version/date energy: PIMSYNC Β· 2025-04-14 Β· PIMSYNC-MIGRATION(7) β€” now go slay those configs, bestie πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from