Skip to content

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.

  1. Every successful build creates an immutable deployment with artifacts stored on CDN
  2. Production is just a pointer (project.live_deployment_id) to one of these deployments
  3. Rollback = promote a previous deployment to production
  4. The CDN edge rule is rewritten and the cache is purged
  5. Traffic serves the previous deployment immediately

List recent deployments to find the one to roll back to:

Terminal window
curl "https://api.deploybase.eu/api/v1/deployments?project_id=PROJECT_ID&status=deployed" \
-H "Authorization: Bearer $TOKEN"

Promote the target deployment:

Terminal window
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"}'

Navigate to the project’s deployment list. Each deployed deployment shows a Promote to Production button. Click it to make that deployment live.

  1. Validates the deployment belongs to the project and has status=deployed
  2. Updates the CDN edge rule to serve the target deployment’s artifacts
  3. Sets project.live_deployment_id to the target deployment
  4. Purges CDN cache for the project’s hostnames
  5. Records the promotion event for audit trail

Rollback depends on deployment artifacts still existing on CDN. See artifact retention rules for details on how long deployments are kept.

If a rollback was premature, promote the newer deployment again. There is no separate “undo rollback” — it’s all the same promote operation.