Since the v0.16 upgrade failed for me, I didn’t have time to re-do the migration. I was thinking that I could create a new server with better configuration (now that I’m more familiar with stalwart), and some other things… In general, I was thinking of creating a new server, migrating some data (like emails, calendar, contacts etc), and changing the IP of the A Record in my dns settings.
Is there a way (or if you find it advisable/possible at all), to move data from a stalwart server to another?
For the emails, I could probably use imapsync, but what about the rest of the user data?
The built-in export/import tool is exactly what you need for a full server-to-server migration, and it covers everything – emails, calendars, contacts, and all other stored data.
The recommended approach: use Stalwart’s built-in --export / --import utility. It creates a complete binary dump of the entire internal database (all subspaces: data, registry, blob, changelog, queue, report, telemetry, tasks), which can then be imported into a fresh Stalwart instance – even one configured with a different storage backend.
Here is the workflow:
Stop the old server (required – running the export on a live server risks data inconsistency).
Start the new server, then switch your DNS A record.
A few notes:
The export supports selective subspace export via the EXPORT_TYPES environment variable (e.g. EXPORT_TYPES="blob,data") if you only want to move certain data types. Leaving it unset exports everything.
The import always imports all subspaces present in the dump – you can’t filter at import time.
This tool is described as a migration aid, not a substitute for routine backups, so keep your existing backup strategy in place.
Your imapsync idea would also work for emails specifically, but the export/import route handles calendars, contacts, and all other data in one shot.
The tool for this is Vandelay: you run vandelay import against the old server’s JMAP API into a per-account archive, then vandelay export onto the new server. It carries the full per-account data set: mail, mailboxes, sieve, contacts, calendars and files. It’s documented under
stalw.art/docs/migration.
You don’t need anything special installed on the 0.15 side; Vandelay is a separate tool you run against the existing server’s API (use the “Older Stalwart” path for a 0.15 source, where files are read over WebDAV rather than JMAP). If you’re not after zero-downtime, you can just run it per account and then switch DNS over.