Trying to upgrade to 1.0: The data store was created by the Stalwart AGPL3/SEL edition and cannot be opened by this edition

Issue Description

Upgrading to Stalwart 1.0 on ArchLinux results in a failure to open the database.

Expected Behavior

Upgrade should complete and open fine as intended.

Actual Behavior

The data store was created by the Stalwart AGPL3/SEL edition and cannot be opened by this edition.

Reproduction Steps

  1. Use ArchLinux
  2. Use the Stalwart Binaries from Extra repository.
  3. Upgrade your database with the migration-tool from 0.16.27 to 1.0.0
  4. Upgrade Stalwart from the repositories
  5. Attempt to start Stalwart.

Stalwart Version

v1.x

Installation Method

Binary (Linux)

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

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

The error means the data store was written by a different build of Stalwart than the one now trying to open it. The check is in the server source (crates/common/src/manager/schema.rs).

Each 1.0 build stamps the data store with a schema version. The AGPL-only build sets an extra flag in that stamp, and the AGPL3/SEL (enterprise-feature) build doesn’t. On startup the server compares the stamp with its own. If only that flag differs, it stops with this message, and the edition it names is the other one. So your Arch stalwart binary is the AGPL-only build, and the store was stamped by an AGPL3/SEL build.

Most likely the migration tool you ran in step 3 was an AGPL3/SEL build. That would be the case if you got it from the official release binaries rather than from the same Arch package set. I can’t confirm this from your report, so please check where the tool came from.

To fix it:

  • Re-run the 0.16.27 to 1.0 migration with a tool from the same edition as the server you’ll run. For the Arch package that means the AGPL-only build. You’ll need a copy of your pre-migration data to do this.
  • Or run an AGPL3/SEL build of the 1.0 server against the migrated store. The official release binaries are the likely source, but I haven’t checked that.

The Enterprise edition page says the two editions share one data format. The source shows this stamp check is stricter than that, so I can’t say whether the mismatch is intended. A human may need to confirm.

Please post the following so someone can narrow it down:

  • The output of stalwart --version.
  • The exact package or tool you used for the migration.
  • Whether you backed up the store before migrating.

Don’t start the server repeatedly or write to the store until this is sorted out. The upgrade docs are at Upgrading | Stalwart.

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

Yes, the migration tool war from the install.sh script as Arch Linux does not package the migration tool…

Download the migration tool that ends with -oss

Where would I be able to find that? I do not see it on the github releases and the guide only includes a curl | sh to install this version.

Edit: nevermind, I see it is a separate repo Release v1.0.1 · stalwartlabs/stalwart-migrate · GitHub