Data, backups and upgrades
Source install
Where the data is
| System | Default data directory |
|---|---|
| Windows | %LOCALAPPDATA%\SoduWork\source-service |
| macOS | ~/Library/Application Support/SoduWork/source-service |
| Linux | $XDG_DATA_HOME/soduwork/source-service, or ~/.local/share/soduwork/source-service |
Use --data-dir to choose another directory (Run from source).
| Item | Contents |
|---|---|
soduwork.db | Users, issues, tasks, settings and other records |
local-service.json | The administrator account name and a random service signing key. Keep it private. It does not contain the administrator password. Deleting or replacing the key signs everyone out |
library/, application/hub-backend/uploads/ | Library items and task attachments |
runtime/, home/ | Runtime folders and agent configuration for this instance |
venv/, application/ | Dependencies and a copy of the source used to run this instance. Do not edit code here |
startup.log | Install, build, migration and server logs |
Back up
Stop the Hub (Ctrl+C in the launcher window), then copy the whole data directory.
Upgrade
- Stop the Hub and back up the data directory.
- Update the source, for example
git pull. - Run the same start command as before.
The launcher updates its own copy of the code and keeps the data.
Roll back
Restore both the source version you used before and the data backup made with it. Downgrading the source alone doesn't work, because the newer version may already have migrated the database.
Docker install
Where the data is
- Private configuration:
deployment.jsonin the self-host directory (Deploy with Docker). - Database and files: Docker named volumes for this instance.
Back up and upgrade
- Stop dispatching new work and wait for running tasks to finish.
- Back up the database and all file volumes from the same point in time. Back up
deployment.jsonand note the source version separately. - Run
python ops/self-host/deploy.py stop. - Switch to the new source version.
- Run
python ops/self-host/deploy.py up.
The single instance runs versioned database migrations automatically. If a migration fails, the Hub does not report healthy. Do not run more than one migration against the same database at the same time.
The repository includes hub-backend/full_backup.py for full encrypted backups and hub-backend/db_admin.py for database checks and restores. Practice a restore before you rely on a backup.
Roll back
Restore the matching source version, database, file volumes and keys together. Do not connect an older version to a database that a newer version has migrated.
Upgrade order
When a release includes both, upgrade the Hub first, then the clients. Upgrading a client keeps its server address, device identity, sign-in and local data.
harness harnesses runtime runtimes 底座