Rollbacks
Rollback in deploybase is the same operation as promotion: point production at a different deployment. It’s instant (no rebuild) because every deployment is an immutable snapshot with artifacts already on CDN.
How Rollback Works
Section titled “How Rollback Works”- Every successful build creates an immutable deployment with artifacts stored on CDN
- Production is just a pointer (
project.live_deployment_id) to one of these deployments - Rollback = promote a previous deployment to production
- The CDN edge rule is rewritten and the cache is purged
- Traffic serves the previous deployment immediately
Performing a Rollback
Section titled “Performing a Rollback”Via API
Section titled “Via API”List recent deployments to find the one to roll back to:
curl "https://api.deploybase.eu/api/v1/deployments?project_id=PROJECT_ID&status=deployed" \ -H "Authorization: Bearer $TOKEN"Promote the target deployment:
curl -X POST https://api.deploybase.eu/api/v1/projects/PROJECT_ID/promote \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"deployment_id": "PREVIOUS_DEPLOYMENT_ID"}'Via Dashboard
Section titled “Via Dashboard”Navigate to the project’s deployment list. Each deployed deployment shows a Promote to Production button. Click it to make that deployment live.
What Happens on Promote
Section titled “What Happens on Promote”- Validates the deployment belongs to the project and has
status=deployed - Updates the CDN edge rule to serve the target deployment’s artifacts
- Sets
project.live_deployment_idto the target deployment - Purges CDN cache for the project’s hostnames
- Records the promotion event for audit trail
Artifact Retention
Section titled “Artifact Retention”Rollback depends on deployment artifacts still existing on CDN. See artifact retention rules for details on how long deployments are kept.
Rolling Forward
Section titled “Rolling Forward”If a rollback was premature, promote the newer deployment again. There is no separate “undo rollback” — it’s all the same promote operation.