Upgrading
Upgrading dbward
Section titled “Upgrading dbward”Update order
Section titled “Update order”Always update in this order:
- Server (holds state, runs schema migrations)
- Agent (stateless, reconnects automatically)
- CLI (each developer, at their own pace)
Docker Compose
Section titled “Docker Compose”docker compose pulldocker compose up -dThe server container stops gracefully (drains active requests), restarts with the new image, and applies any pending SQLite schema migrations. The agent waits for the server healthcheck before starting, ensuring correct update order automatically.
Image registries:
ghcr.io/dbward-dev/dbward-serverghcr.io/dbward-dev/dbward-agent
Tag options:
v0.1.5— pinned to a specific release (recommended for production)latest— latest release (for development)
# compose.yml exampleservices: dbward-server: image: ghcr.io/dbward-dev/dbward-server:v0.1.5 # ...Binary
Section titled “Binary”# Update CLIdbward self-update
# Restart server (applies SQLite migrations on startup)systemctl restart dbward-server
# Restart agent (gracefully drains in-flight jobs)systemctl restart dbward-agentChecking for updates
Section titled “Checking for updates”Check installed versions:
dbward --version # CLIdbward-server --version # Serverdbward-agent --version # AgentCheck the running server version and minimum supported agent version:
curl http://localhost:3000/health# {"status":"ok","version":"0.1.5","min_agent_version":"0.1.5"}The CLI displays a warning when the server version differs from the CLI version.
SQLite backup
Section titled “SQLite backup”Before applying schema migrations, the server creates a backup:
dbward.db.bak.v7 ← backup of schema version 7 before migrating to 8If an upgrade causes issues, restore the backup and use the previous binary:
cp dbward.db.bak.v7 dbward.db# Use previous binary versionVersion compatibility
Section titled “Version compatibility”- All components within the same minor version (0.1.x) are compatible
- The server rejects poll requests from agents with a version older than
min_agent_version - The CLI shows a one-time warning when the server’s minor version differs
- SQLite schema changes are forward-compatible within a minor version
- Downgrade is not supported for SQLite schema; use Litestream PITR or file backup
Rollback
Section titled “Rollback”# 1. Stop servicessystemctl stop dbward-server dbward-agent
# 2. Restore previous binarycp /usr/local/bin/dbward.bak /usr/local/bin/dbward
# 3. Restore SQLite (only if schema changed)cp dbward.db.bak.v7 dbward.db
# 4. Restartsystemctl start dbward-server dbward-agent