OneUptime upgrade and rollback¶
OneUptime applies PostgreSQL, ClickHouse, and data migrations during startup. Changing an image tag back is not a complete rollback after migrations.
Upgrade prerequisites¶
- Target release reviewed against official release and upgrade notes.
- Exact app, ingress, PostgreSQL, Redis, and ClickHouse digests recorded.
- Current logical backup and isolated restore drill pass.
- Local restic snapshot and B2 copy are present.
- At least 100 GiB free on
infra-servicesbefore pulling replacement images. - Alertmanager direct Discord/ntfy routes remain independent.
- Remediation workflows are disabled during the change.
Staging test¶
- Restore the latest PostgreSQL and ClickHouse backups into isolated volumes.
- Start the target OneUptime images against those volumes.
- Allow migrations to complete.
- Verify login, projects, incidents, timelines, runbooks, workflow history, encrypted provider values, and status endpoints.
- Send a non-production firing/resolved webhook pair.
- Record migration duration and peak CPU, memory, and disk.
Do not promote a release that cannot read the restored production-shaped data.
Production upgrade¶
- Disable OneUptime notification/remediation workflows.
- Run
scripts/backup.shandscripts/restore-drill.sh. - Confirm the tier-1 restic job and B2 copy.
- Stop OneUptime ingress and app.
- Update image tags and digests in
services/oneuptime/compose.yml. - Pull the exact images.
- Start datastores, then the app.
- Wait for application readiness; first boot can take 9–12 minutes.
- Start ingress and run
scripts/smoke-test.sh --live. - Verify a synthetic incident lifecycle before re-enabling workflows.
- Retain previous images and pre-upgrade backups through the observation window.
Rollback¶
Rollback is the tested restore path:
- Stop ingress and app.
- Preserve the failed-upgrade databases and logs; do not delete them.
- Start temporary empty volumes with the previous exact datastore images.
- Restore the pre-upgrade PostgreSQL and ClickHouse logical backups.
- Restore the previous app and ingress digests.
- Render the unchanged SOPS secrets, including the original
ENCRYPTION_SECRET. - Start app, then ingress.
- Verify incidents, timelines, workflow history, and readiness.
- Keep notification/remediation workflows disabled until the operator accepts the rollback.
Do not attempt unsupported down-migrations and do not point an older app image at a database already migrated by a newer release.
Emergency shadow removal¶
Before production alert ingestion, the shadow runtime can be stopped while retaining state:
Do not add --volumes. Any deletion or relocation of database or backup
artifacts requires explicit owner approval.