Issue Description
stalwart-migrate 1.0.0 boots v1 code against the target store. That boot deletes expired BlockedIp objects from the target registry. The tool’s state still records them as written. This causes two failures:
A second incremental run fails its preflight.
run --final verification reports each expired ban as missing. --allow-errors does not accept verification mismatches, so the migration is never marked done. Each retry finds the bans that expired since the last one (auth bans last 1 h; one verification takes about 29 min), so retries never converge.
Cause, from the source:
V1Target::boot_server (stalwart-migrate/crates/target-v1/src/target.rs) calls Data::parse.
Data::parse calls BlockedIps::parse (stalwart/crates/common/src/config/inner.rs:79).
BlockedIps::parse (crates/common/src/network/security.rs:510) deletes every expired BlockedIp from the registry. Here, that registry is the target.
In crates/migrate/src/orchestrator/verify/explain.rs, only Severity::Error rows can be accepted, so --allow-errors cannot clear these mismatches.
AllowedIps::parse has the same delete path, so expired AllowedIp objects are probably affected too.
No other client was connected to the target cluster (fdbcli status json showed 1 client: the tool).
Expected Behavior
ncremental runs and run --final complete, as described in Running the migration | Stalwart. Possible fixes:
Skip expired BlockedIp/AllowedIp objects and report them as dropped, or
Boot v1 without the registry clean-up side effects, or
Make the preflight and the verifier accept that v1 removes expired bans by design.
Actual Behavior
Second incremental run:
run failed error=preflight check failed: registry object x:BlockedIp/336711335041411072 recorded in the state database is missing from the target
The missing object had expired 2 days before the first run:
{“address”:“”,“createdAt”:“2026-10-24T10:07:56Z”,“expiresAt”:“2026-10-24T11:07:56Z”,“reason”:“authFailure”}
run --final (fresh state and target, all nodes stopped):
verify finished run_id=2 status=failed accounts_checked=9 mismatches=4 unexplained=4
finalize completed but verification failed: the final run is not marked done
run --final --allow-errors, about 30 min later:
verify finished run_id=4 status=failed accounts_checked=9 mismatches=9 unexplained=9
6 of the 9 mismatches were x:BlockedIp … the converted source object is missing in the target.
Reproduction Steps
Use a 0.16.27 source that holds expired BlockedIp objects. Ours had about 2,360 expired out of 2,380.
Run stalwart-migrate prepare, then stalwart-migrate run. Result: status=ok, 0 errors.
Run stalwart-migrate run again with the same --source/–target/–state. Result: the preflight failure above.
Or:
Start with a fresh state dir and an empty target, with all 0.16 nodes stopped.
Run run --final --yes --verify-full. The copy succeeds, but verification fails with x:BlockedIp mismatches.
Run run --final --yes --allow-errors. Verification fails again, with more x:BlockedIp mismatches.
Relevant Log Output
Second incremental run:
2026-10-26T18:54:56.022396Z ERROR migrate::orchestrator: run failed error=preflight check failed: registry object x:BlockedIp/336711335041411072 recorded in the state database is missing from the target
2026-10-26T18:54:56.023082Z INFO migrate::orchestrator: run finished run_id=2 status=failed
run --final --verify-full (fresh state and target, all nodes stopped):
2026-10-26T19:27:48.788992Z INFO migrate::orchestrator: run finished run_id=1 status=ok stats={"accounts_full":9,"emails_written":264344,"errors":0,...}
2026-10-26T19:56:40.833556Z INFO migrate::orchestrator::verify: verify finished run_id=2 status=failed accounts_checked=9 mismatches=4 unexplained=4
2026-10-26T19:56:40.833607Z ERROR migrate::orchestrator: finalize completed but verification failed: the final run is not marked done; fix the reported mismatches and repeat the command (run --final, or rollback with the same --state)
run --final --allow-errors (same state):
2026-10-26T19:57:48.771497Z INFO migrate::orchestrator: run finished run_id=3 status=ok stats={"accounts_unchanged":9,"errors":0,...}
2026-10-26T20:26:37.462061Z INFO migrate::orchestrator::verify: verify finished run_id=4 status=failed accounts_checked=9 mismatches=9 unexplained=9
stalwart-migrate report --run 4 --format csv:
587,4,verify,mismatch,,x:BlockedIp,337135873810418690,the converted source object is missing in the target
588,4,verify,mismatch,,x:BlockedIp,337136007993755136,the converted source object is missing in the target
589,4,verify,mismatch,,x:BlockedIp,337136665859856384,the converted source object is missing in the target
590,4,verify,mismatch,,x:BlockedIp,337136721660877312,the converted source object is missing in the target
591,4,verify,mismatch,,x:BlockedIp,337139537756439040,the converted source object is missing in the target
592,4,verify,mismatch,,x:BlockedIp,337139612752693248,the converted source object is missing in the target
593,4,verify,mismatch,,x:SpamTrainingSample,306731946755494914,blob b67c209f… referenced by the object is missing in the target
594,4,verify,mismatch,,x:SpamTrainingSample,311010335004133888,blob 73692b55… referenced by the object is missing in the target
595,4,verify,mismatch,,x:SpamTrainingSample,318774381587573760,blob 4639a7d4… referenced by the object is missing in the target
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
FoundationDB
Blob Storage
S3-compatible
Search Engine
Meilisearch
Directory Backend
Internal
Additional Context
3-node cluster: Redis Cluster in-memory store, NATS coordinator. The tool ran on node 0.
Workaround we used: with every node stopped, start 0.16 on one node, destroy all x:BlockedIp objects (active ones too), stop it, then run run --final again.
Minor, possibly separate: verification also reported 3 x:SpamTrainingSample objects with blob referenced by the object is missing in the target. We deleted those 3 in 0.16 to unblock the run. We did not check whether their blobs were also missing in the source.
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