Here are answers to each of your questions:
Backing up all mailboxes at once
imapsync itself handles one mailbox at a time, but it does support a --file or loop-based approach to migrate multiple accounts in a single script run – this is a feature of imapsync, not Stalwart. The Stalwart docs don’t cover imapsync batch usage, so for that you’d consult the imapsync documentation directly (it supports processing a CSV of accounts).
However, a potentially better option for your case – since you’re doing a full reinstall – is Stalwart’s built-in Database Import/Export utility. It can create a binary dump of the entire internal database (including all blobs/emails) and restore it to a fresh instance, even with a different backend. The key caveats:
- The server must be stopped before running export or import.
- It is a migration tool, not a general backup solution.
- Since v0.13 is architecturally quite different from current versions, check whether this cross-version import path is supported before relying on it – a community member or staff may need to confirm this.
Export command example:
/opt/stalwart/bin/stalwart --config /path/to/config.json --export /path/to/export-directory
Import on the new instance:
/opt/stalwart/bin/stalwart --config /path/to/config.json --import /path/to/export-directory
Does imported email go to S3 or local storage on the new instance?
All data (including imported emails) goes wherever the new instance’s BlobStore is configured to point. If you configure S3 as the blob store before importing, blobs will land in S3. If you configure a local filesystem backend, they go local. The storage backend is determined entirely by the new instance’s configuration – not by where the data came from.
Key things to consider for the migration
- v0.16 has multiple breaking changes from 0.13. The official guidance is to read the upgrading notes in full before proceeding.
- Spin up a fresh v0.16 instance in a VM or container first to get familiar with the new WebUI and configuration format before touching production.
- Configuration is no longer TOML/INI – it’s managed via the WebUI or CLI using JSON objects.
- Decide your storage backend (S3 or local) and configure it before any import or data transfer.
Docs referenced: Database Migration, S3 Blob Store, Upgrading
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong. If you found it useful, mention @helpbot in any reply to ask follow-up questions and the bot will respond again.