OwnBackup is a Salesforce data and metadata backup and recovery solution. By leveraging the OwnBackup integration with Copado, you can run data backups before and after Copado data deployments to minimize user-inflicted data loss risk and costs, and build business resiliency.
Follow these steps to set up the OwnBackup integration:
- Open or create an OwnBackup account.
- In User and Account Settings (top right), confirm that your account is API enabled:
- If not, open a support case with OwnBackup for your account to be API enabled. You can confirm this in the Overview tab on the Account Settings page.
- Setup data backup services for your main Salesforce orgs (e.g. UAT sandbox and production) and ensure the backup has completed without warnings, FLS (Field Level Security) is clear and the organization’s attachment objects have finished downloading:
- Install Copado in your main Salesforce org:
- Authenticate the orgs you will be deploying to and from.
- Request Copado licenses from your Copado account executive:
- Assign a Copado Enterprise and an Advanced Data Deploy license to your Salesforce user :
- Set up your Copado pipeline and authenticate all the organizations (org credentials).
- Install the OwnBackup integration add-on package
- Once installed, go to Setup > Objects > Environment (copado__Environment__c) and add the Data Backup Enforcement picklist field in the Environment layout:
- Go to Setup > Remote Site Settings and add a new setting for your OwnBackup domain, which is the url of the OwnBackup region the backup instance exists on:
- Go to Setup > Custom Settings and open the OwnBackup Credential custom setting and create a new record with your OwnBackup credentials. Name this record “DataBackupCredential”:
- Edit the Environment page layout and add the Data Backup Enforcement picklist field.
- Go to the Environments tab and open the Environment records of the main orgs you want to backup (e.g. UAT, production). Select Before and after deployment in the Data Backup Enforcement field:
Whenever a deployment gets created with a Data Template deployment step, if the destination org of the deployment has Data Backup Enforcement enabled, then the OwnBackup data backup steps will be included in the deployment:
When Copado starts deploying data changes into production, a callout is sent to OwnBackup to backup the production data. If the OwnBackup job is successful, Copado will continue the deployment. If the job fails, you can manually complete the URL Callout deployment step that failed in order to unblock the remaining deployment steps. This is recommended only when you fixed the issue and reran the backup directly in OwnBackup.
When the deployment starts with the first step, Copado triggers the data backup job in OwnBackup. The deployment is paused while the backup job is running in OwnBackup. You can see the backup status in OwnBackup:
After the OwnBackup job completes, the URL Callout deployment step is updated to completed. The deployment continues with the next step, if any.
After all steps complete, you can review the backup results in OwnBackup with the delta changes of the Copado data deployment:
You can perform a data recovery anytime if needed.