Easiest way to migrate a very small server?

Your question

Hey,

I have a very small deployment and I’m considering the best way to switch to 0.16.

I’m thinking of building a fresh deployment and then using Vandelay to export/import the data, as the total size is under 1 GB. Would this be the recommended approach?

I can always reset the users’ credentials, so that would not be an issue.

Thank you!

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Your instinct to do a fresh install and migrate the data is actually the approach the official docs recommend for the 0.16 upgrade. Here’s the picture:

The built-in --export / --import CLI flags are the right tool for this. The Stalwart binary has a built-in Database Import/Export utility designed exactly for this scenario. It creates a binary dump of the entire internal database that can be loaded into a fresh instance. “Vandelay” is the name for this same built-in tool.

The key steps from the docs:

  1. Stop the old server before exporting – this is required; running an export against a live embedded backend (RocksDB/SQLite) risks corruption.
  2. Export with:
    /opt/stalwart/bin/stalwart --config /path/to/config.json --export /path/to/export-directory
    
  3. Stand up your fresh 0.16 instance, configure it, then stop it.
  4. Import with:
    /opt/stalwart/bin/stalwart --config /path/to/new-config.json --import /path/to/export-directory
    

Important caveat for 0.16 specifically: The blog post for 0.16 flags it as a major upgrade with multiple breaking changes and strongly recommends reading the v0.16 upgrading documentation in full before proceeding, as the architectural changes are significant. The export/import approach works for moving between storage backends, but the 0.16 upgrade notes may have additional steps on top of that.

Since your data is under 1 GB, a fresh install + import is a perfectly reasonable path. Just be sure to follow the v0.16 upgrade guide alongside it.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

I don’t really care about the configuration. On the contrary, I believe that starting fresh (totally new config) is best as I made the initial install on a hurry.

So I just need to import mailbox contents. I can recreate everything from scratch, including new account creation.

The bot is mixing up the old built in backup and the new Vandelay which is not built-in.

Yes, Vandelay is what you want, to keep your account data only. Snapshot is the command that would deal with server configuration.

Does this include attachments as well? I would use this opportunity to switch to a new storage as well.

Yes, it includes attachments