Gearset's data backup jobs provide comprehensive data restore capability. In the event that any data is lost, corrupted, or otherwise changed in an org, you can easily use a snapshot from your backup job to restore that data to its previous state while maintaining their relationships and your data structure.
Restoring metadata before you restore data
Records can only be restored correctly if the underlying metadata (configuration) between the backup snapshot and your org is consistent. If there have been significant changes to your org's metadata and data, we recommend you restore the metadata first, before the data. This will reduce the chances of unexpected data deployment errors.
You can see how to run a metadata restore from a data backup job here.
Want to restore a single record?
This article is aimed at restoring large numbers of records in an org. If you'd like to restore a single record or a small number of records, you may want to use the quick data restore option in Gearset. See how here.
Data restoration happens from the history of a data backup job.
View detailson the data backup job you want to restore from.
- Choose the date of the org snapshot you'd like to restore from. It's a good idea to verify the state of the data from a backup before you restore from it by clicking the
Browse dataoption first. From here, you can view the data from that snapshot to confirm it's in the state you wish to restore to.
- Once you've confirmed the data is in the state you wish to restore to, click on the row for the snapshot you'd like to restore from to expand it out and click
- In the dialogue that opens, confirm the target org where this data will be restored to and the date of the snapshot being used to restore from. By default, the org that is being backed up will be selected, but it is possible to restore data to a different org by changing this selection.
Start restore configuration.
- You'll now run through a data deployment in Gearset's data loader, with the source of the deployment being the snapshot from the data backup job and the target the org you're restoring to. The steps to follow are listed below, but for more in-depth details on how the data loader works, see our support documents here.
- In the column on the left side, select which objects you'd like to restore the records for by checking the box next to their name. You can search and filter for objects.
- When a parent object is expanded, which you can do by clicking on it, Gearset checks for and lists any dependencies that are detected that can then be included within your data subset. Gearset will then traverse the dependency graph to determine any further indirect dependencies necessary to deploy records from the selected objects.
- For each object, you can enter optional filtering by field values to control exactly which records are restored. For example, if you want to restore a single specific record, you can filter by its Salesforce record ID as in the screenshot below.
- Once you've chosen which objects you wish to restore, and set any field level filtering, click
- Choose how you want to match existing records, which related objects to include, and customize their field mapping for upserting.
- Choose whether you'd like the data deployment to continue if it hits an error deploying a record. In that case, if a deployment step fails, the remaining deployment steps will continue to execute, ignoring the errors encountered and deploying as many of the records as possible. Or, if you want the deployment to stop in the event of an execution step error, select the
Stop deploying remaining recordsoption.
NEXTto move to the pre-deployment summary.
- Gearset will create and list out the steps we’re about to take in your data deployment. You'll be able to see the object records to be deployed and the actions Gearset will take to retrieve the records, such as fetching, including, creating and upserting, as well as the field count and any applied filters.
- Click on
DEPLOY DATAto deploy the selected data to the target org. When the deployment is running, each stage will mark as completed and show you how many records have been processed in each step.
- Once it has completed, the deployment will be stored in your data deployment history in the app. Learn more about data deployment history here.
You should now verify that the records have been restored to your org as expected.