Rollback
Rollback is the process of returning to a previous version when a publication causes an error. On Zenifra, the strategy depends on the project source: Git repository (GitHub or Forgejo) or OCI image.
Before you need to revert
Prepare the project for rollback before production:
- keep identifiable tags or commits
- expose a
/healthroute - log version or commit
- avoid
latestfor OCI images in production - document variables required by each release
Git projects
For GitHub or Forgejo projects in Automatic by branch mode, the most predictable path is returning the configured branch to a known-good state and pushing it.
Common options:
- create a revert commit
- merge a quick fix
- restore the branch to a stable release according to the team's Git process
In By Tag or By Release mode, create a new tag that points to the stable commit and matches the configured pattern (and publish the release, in By Release mode). Updating an existing tag does not start a publication.
In Forgejo projects, you can also start a manual publication of a stable commit: in Console, use New build with the Exact commit SHA, or run zenifra deploy --project <project-id> --commit-sha <sha>. In Automatic by branch mode, the next push to the branch publishes the branch state again.
After the publication, follow build logs and validate the application on the public URL.
OCI projects
For OCI projects, rollback usually means changing the image to a previous tag.
| State | Image |
|---|---|
| problematic version | ghcr.io/acme/api:1.4.3 |
| rollback | ghcr.io/acme/api:1.4.2 |
After changing the image, validate logs, metrics, /health, and the application's main behavior.
Database and migrations
Application rollback does not automatically undo database changes.
Before publishing changes with migrations:
- test migrations in a separate environment
- prefer migrations compatible with two application versions
- plan how to revert or correct data
- avoid code deploys that immediately depend on destructive migrations
Post-rollback validation
After reverting:
- confirm project status
- open the public URL
- check application logs
- review metrics and HTTP requests
- validate database, login, checkout, webhooks, or critical flows
- communicate internally which version was restored
Next steps
FAQ
Does Zenifra perform automatic rollback?
No. Zenifra does not perform automatic rollback; plan operational rollback through Git or image tags.
Does rollback solve database errors?
Not always. Schema and data changes need their own plan.
How do I reduce risk?
Use a stable branch, immutable tags, health checks, clear logs, and the production checklist before publishing.
Last updated on
Automatic by branch
Learn how automatic branch deploys work for Git projects and how GitHub and Forgejo update modes control publications by branch, tag, or release.
Health checks for HTTP projects
Configure HTTP project health checks, validate 2xx responses, review failures for 30 days, and keep Zenifra instances available.