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 user, 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 (systemd)
Section titled “Binary (systemd)”# 1. Stop services (agent first to drain in-flight jobs, then server)systemctl stop dbward-agentsystemctl stop dbward-server
# 2. Update binaries (specify version, or omit for latest)DBWARD_VERSION=0.2.0 curl -fsSL https://dbward.dev/install.sh | sh
# 3. Start services (server first — applies SQLite migrations on startup)systemctl start dbward-serversystemctl start dbward-agentDo not update binaries while services are running. The install script overwrites files in place, which can corrupt a running process.
Install script options:
| Variable | Default | Description |
|---|---|---|
DBWARD_VERSION | latest | Pin to a specific version |
DBWARD_INSTALL_DIR | /usr/local/bin | Installation directory |
DBWARD_COMPONENTS | all | all, cli, or comma-separated list (dbward-server,dbward-agent) |
Update CLI on developer machines (independent of server/agent):
dbward self-updateChecking 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