Promote & roll back
Once a change is reviewed on a preview, promoting it to production is one action. Every deploy is recorded as a release, so if a promotion goes wrong you can roll back to the previous one immediately — or restore from a snapshot taken before the change.
Promote to production
Section titled “Promote to production”Promotion ships a reviewed branch’s build to the production environment. The most
direct path is a git push of the promoted branch to your default branch, which
deploys live:
git checkout maingit merge --ff-only feature/checkoutgit push managed mainYou can also promote directly from the dashboard or the API without going through a merge, when the build you reviewed is exactly the build you want live.
Open the site’s Deploys tab, find the build you reviewed on its preview, and choose Promote to production. managed.dev rolls the same content-addressed, signed artifact onto production — no rebuild.
Promotion is an async job — it returns
202 Accepted with a job to track.
curl -X POST https://api.managed.dev/v1/sites/site_01J7.../deployments \ -H "Authorization: Bearer mfk_live_..." \ -H "Idempotency-Key: 1c8f...e2" \ -H "Content-Type: application/json" \ -d '{ "build_id": "build_01J8...", "target": "production" }'Deployment history & releases
Section titled “Deployment history & releases”Every deploy to every environment is recorded. Production’s history is the list of releases that have served the live site, each tied to a commit, a build, and a timestamp. The history is your audit trail for “what was live when” and the menu you roll back from.
Instant rollback
Section titled “Instant rollback”A rollback re-points production at a previous release. Because the artifact is content-addressed and already built, rolling back is a roll, not a rebuild — it’s fast and deterministic.
- Open the production environment’s deployment history.
- Pick the last known-good release.
- Choose Roll back to this release and confirm.
Roll back from a snapshot
Section titled “Roll back from a snapshot”When you need data as well as code, restore a point-in-time snapshot. A snapshot restore brings back the database and files as they were at capture time. The habit worth building: take a snapshot immediately before any risky promotion, so you always have a clean restore point.
curl -X POST https://api.managed.dev/v1/sites/site_01J7.../snapshots/snap_01J8.../restore \ -H "Authorization: Bearer mfk_live_..." \ -H "Idempotency-Key: 9a2b...77"Promote vs clone-content
Section titled “Promote vs clone-content”Promotion ships code from one environment to production. When what you actually want is to move content — for example pull production’s fresh database down into staging, or push staging’s content up — use clone-content instead. It’s directional and lets you choose the database, files, or both, with a dry-run.
| You want to… | Use |
|---|---|
| Ship reviewed code to production | Promote |
| Refresh an environment’s data from another | clone-content (directional) |
| Bring back code and data after a bad deploy | snapshot restore |