-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Issue
Migrating from boltdb database to SQLite errors out when exporting TaskStage.
Loading config
Validating config
Executing migration v2.15.1.sqlite (at 2026-02-20 15:25:37.118799867 +0000 UTC)...
Creating migrations table
[84/400]]
Executing migration v2.15.2 (at 2026-02-20 15:25:37.168343133 +0000 UTC)...
[1/262]
Executing migration v2.15.3 (at 2026-02-20 15:25:37.177420233 +0000 UTC)...
[2/500]
Executing migration v2.15.4 (at 2026-02-20 15:25:37.186474267 +0000 UTC)...
[1/58]
Executing migration v2.16.0 (at 2026-02-20 15:25:37.197253794 +0000 UTC)...
[11/106]
Executing migration v2.16.1 (at 2026-02-20 15:25:37.220947583 +0000 UTC)...
[1/86]
Executing migration v2.16.2 (at 2026-02-20 15:25:37.231150901 +0000 UTC)...
[5/0]]]
Executing migration v2.16.3 (at 2026-02-20 15:25:37.254863883 +0000 UTC)...
[1/850]
Executing migration v2.16.8 (at 2026-02-20 15:25:37.264832159 +0000 UTC)...
[5/54]
Executing migration v2.16.50 (at 2026-02-20 15:25:37.290623987 +0000 UTC)...
[1/0]
Executing migration v2.17.0 (at 2026-02-20 15:25:37.298665648 +0000 UTC)...
[6/368]
Executing migration v2.17.1 (at 2026-02-20 15:25:37.316149654 +0000 UTC)...
[2/546]
Executing migration v2.17.2 (at 2026-02-20 15:25:37.325973981 +0000 UTC)...
[3/93]
Migrations Finished
SQLite @/var/lib/semaphore/database.sqlite
Loading config
Validating config
Starting migration...
Exporting User 100%
Exporting Project 100%
Exporting Template 100%
Exporting TemplateVault 100%
Exporting AccessKey 100%
Exporting SecretStorage 100%
Exporting Inventory 100%
Exporting Role 100%
Exporting Integration 100%
Exporting Event 100%
Exporting Environment 100%
Exporting ProjectUser 100%
Exporting TemplateRole 100%
Exporting Repository 100%
Exporting Schedule 100%
Exporting IntegrationExtractValue 100%
Exporting IntegrationMatcher 100%
Exporting Option 100%
Exporting Runner 100%
Exporting Task 100%
Exporting TaskOutput 100%
Exporting View 100%
Exporting IntegrationAlias 100%
Exporting TaskStage 0%
Migration failed: failed to export TaskStage: duplicate key 0
Unfortunately there's no documentation for migrating for docker-based semaphore, so maybe I'm doing something wrong. I stopped the semaphore container, then modified config.json for sqlite,
{
"sqlite": {
"host": "/var/lib/semaphore/database.sqlite"
},
"dialect": "sqlite",
...
}and ran docker run --rm -v ./data:/var/lib/semaphore -v ./config:/etc/semaphore --entrypoint /bin/sh semaphoreui/semaphore:v2.17.12 -c "semaphore migrate --from-boltdb /var/lib/semaphore/database.boltdb"
Impact
Database
Installation method
Docker
Database
BoltDB
Browser
No response
Semaphore Version
2.17.2
Ansible Version
Logs & errors
No response
Manual installation - system information
No response
Configuration
No response
Additional information
No response
Reactions are currently unavailable