Rollback and backup after a production deployment
Key Takeaway
A successful production deployment can't be rolled back, so back up the target org before you start.
A production deployment in Salesforce is all-or-nothing while it runs, but permanent after it succeeds. If the deployment can't finish, the whole thing is rolled back. A successful deployment has no rollback, so a sound deployment plan backs up the target org first and checks the changes before committing them.
A deployment that can't finish commits nothing
A change set deploys in a single transaction. If the deployment can't complete for any reason, the entire transaction is rolled back and no changes are committed to the org. A canceled deployment commits nothing either.
Common causes of failed and canceled deployments are:
- Missing files
- Components with errors
- Failed tests
- A cancel request