The migration tool, 0.16.27 → 1.0, may forget to migrate the scheduled tasks. I will need to perform the domain’s acme certificates and rotate the DKIM configuration manually.
Expected Behavior
Inherite the scheduled tasks.
Actual Behavior
The scheduled task is empty.
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
MySQL
Blob Storage
Filesystem
Search Engine
Internal
Directory Backend
OIDC
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.
Scheduled tasks are meant to be copied. The troubleshooting page says a retrying scheduled task is copied with its retry state. So an empty task list needs a closer look at your migration reports.
Your report is ambiguous on one point. “Scheduled task” could mean the task queue, or it could mean the ACME certificate and DKIM rotation on your domains. I can’t tell which from the post.
If you mean the domain-level ACME and DKIM settings, the docs say the migration tool does not set up certificates or signing keys for you. You need to set them up on the 1.0 deployment before cutover. You can import your existing DKIM keys or publish new selectors. Details are in Preparing signing keys, certificates and DNS. Domains that used an ACME provider outside a tenant are also converted in a specific way. The tool makes a copy of the provider inside each tenant. If a domain referenced another tenant’s provider, the reference is dropped and the domain falls back to manual management. See verify. Check the report for dropped and changed rows that mention your domains.
If you mean the task queue, this looks like a possible gap in the tool. A few details would help someone investigate:
Which tasks were missing, such as queued mail, ACME renewals or DKIM rotation?
Whether the run or verify reports show dropped, skipped or failed rows for them.
Whether you ran run --final, or an earlier non-final run.
Also note that your post lists the version as v0.16.x. The migration docs require 0.16.27 as the source, so confirm that is what you ran. The guide is at Overview | Stalwart.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
Scheduled tasks are only copied by the final run, stalwart-migrate run --final, with 0.16 stopped. Incremental runs skip them on purpose, so 0.16 and 1.0 don’t both renew the same certificates and rotate the same DKIM keys while they run side by side. If the migration ended on an incremental run, or the final run had --exclude tasks, 1.0 starts with an empty task list.
What does this print?
stalwart-migrate report --state <your state dir> | grep -i task
If the final run copied them, there will be rows for x:Task, and if some were dropped the message says why.
You don’t have to wait for that to get the renewals back. Creating an AcmeRenewal task for a domain orders a certificate and every successful order schedules the next renewal, see TLS certificates. A DkimManagement task for a domain advances any key transition that is due and schedules the next one, see DKIM rotation. One of each per domain brings the schedule back.
stalwart-migrate/migrate-state → cat final-report.txt|grep -3 task
1 warning dropped - Role 1 warning: x:Role/b enabledPermissions/sysSpamTrainingSampleUpdate: dropped (no equivalent in the target version)
1 warning dropped - Role 2 warning: x:Role/c enabledPermissions/sysSpamTrainingSampleUpdate: dropped (no equivalent in the target version)
1 warning dropped - Role 3 warning: x:Role/d enabledPermissions/sysQueuedMessageCreate: dropped (no equivalent in the target version)
1 warning dropped - Role 4 warning: x:Role/e enabledPermissions/taskUnindexDocument: dropped (no equivalent in the target version)
1 warning dropped - SpamTag 328770992887427072 warning: x:SpamTag/jeahphryd2aa: dropped (no equivalent in the target version), was {"@type":"Score","score":3.0,"tag":"LLM_COMMERCIAL_HIGH"}
1 warning dropped - SpamTag 328770992889524736 warning: x:SpamTag/jeahphr7d2qa: dropped (no equivalent in the target version), was {"@type":"Score","score":0.5,"tag":"LLM_COMMERCIAL_LOW"}
1 warning dropped - SpamTag 328770992891622400 warning: x:SpamTag/jeahphr2d0aa: dropped (no equivalent in the target version), was {"@type":"Score","score":2.0,"tag":"LLM_COMMERCIAL_MEDIUM"}
--
1 warning dropped - SpamTag 328770992916792320 warning: x:SpamTag/jeahphsuebaa: dropped (no equivalent in the target version), was {"@type":"Score","score":0.5,"tag":"LLM_UNSOLICITED_LOW"}
1 warning dropped - SpamTag 328770992918889984 warning: x:SpamTag/jeahphswebqa: dropped (no equivalent in the target version), was {"@type":"Score","score":2.0,"tag":"LLM_UNSOLICITED_MEDIUM"}
1 warning dropped - SystemSettings - warning: x:SystemSettings threadPoolSize: dropped (no equivalent in the target version)
2 warning dropped - Task 331390792571447296 error: x:Task/jgkwfoeq27aa domainId: references x:Domain/b, which is not migrated, and cannot be cleared; the task was not copied
2 warning dropped - Task 331390863664900608 error: x:Task/jgkwhqli27qa domainId: references x:Domain/b, which is not migrated, and cannot be cleared; the task was not copied
25 rows
Earlier rows that were resolved or superseded by a later row: 0 errors, 39 warnings (list them with stalwart-migrate report).
Thanks for the answer. The tasks had been re-added manually. It’s not a big deal. FYI, I stopped the service following the migration guide to run the --final, and verify.
Those two rows explain it. Both tasks (jgkwfoeq27aa and jgkwhqli27qa) point at x:Domain/b, the domain with internal id 1, and the final run found no domain with that id among the objects it migrated. It dropped the two tasks instead of giving 1.0 a renewal and a rotation for a domain it doesn’t have. My guess is that the tasks outlived their domain in 0.16, for example after a domain was deleted and added again under a new id; if b is a domain you still have, I’d like to know, because then the tasks should have been copied.
Recreating the ACME renewal and the DKIM rotation for your current domain, as you did, is the right fix.