Skip to main content

Restore Salesforce Data

Overview

The capability to restore data without any downtime is critical to any business. A stable disaster recovery solution ensures business continuity.

Here are a few examples requiring the restoration of Salesforce data with minimal impact on day-to-day business operations.

  • If manual errors cause changes to the metadata of an organization, it can impact critical configuration changes. In this situation, you would quickly like to recover only the impacted metadata changes.

  • Recover your data quickly when a malicious activity impacts your business-critical data

  • Avoid impact on business data due to unintended user errors. Achieve this using selective restore of records or metadata to roll back to the previous stable state of data.

You can select records or metadata from a snapshot and restore them to the same or different Salesforce organization. You can also perform a direct restore of records from a snapshot.


📝 Note

By default, when restoring a deleted record, Salesforce replaces the name of the record creator with the Admin user who initiated the restore in the CreatedBy field. To populate the original name of the record creator, enable the 'Create Audit Fields' permission. For detailed steps, see Salesforce documentation.


Data Restore Workflow for Salesforce

The following workflows are available for enhanced data restoration.

  1. Restore specific records or metadata from a snapshot

  2. Restore specific records or metadata from a snapshot using the comparison method

  3. Quick restore triggered from the backup or archive job listing

When restoring records, the Salesforce App provides the capability to restore all levels of parent-child relationships and also orphan records. For more information, see Understanding Object Relationships.

Restore Records

You can restore records using a comparison view of the created, updated, and deleted records. This enables you to reduce the overall recovery time.

Procedure

  1. On the Salesforce App console, click Backup.

  2. Select the desired Backup Set and navigate to the Compare section and click Records.

  3. Specify the date range to find the list of snapshots within the specified date range. A list of snapshot details with the list of associated records appears.

  4. Select the records for comparison.



    📝 Note

    • A deleted record means the record is deleted from both Salesforce Organization's Recycle Bin and Salesforce User’s Recycle Bin.

    • If you have deleted a file saved as a ContentDocument object record, the deleted count does not reflect this update as the replicateable property for this object in Salesforce is set to false. As a result, the object is not replicated via the API. For more information, see getDeleted() call.


Steps

Description

Step 1

Click the arrow corresponding to a snapshot listing. This displays the snapshot details with a list of associated records, which were created, updated, or deleted.

Step 2

Enter the search criteria in the Search by Object Name search box to filter the records.

Step 3

Click Export to CSV or Export to JSON to download the record details in CSV or JSON format, respectively.

Click Show Detail to display details about the associated record. A window with the record details appears.

5. Perform the following steps to restore records from the selected snapshot listing.

Step

Description

1

Click Created/Updated or Deleted to filter the records.

  • Created/Updated - This option filters the created/updated records from the snapshot instance.

  • Deleted - This option filters only the deleted records from the snapshot instance.

2

Click Select All to select all the displayed records.

Alternatively, specify a SOQL statement in the search box, click Search to filter specific records, and then select individual records.


📝 Note

You can skip the WHERE keyword in the SOQL statement.


3

Click Create Restore to restore the selected records.

The restore wizard guides you through the following steps:

  1. Basic Configuration - Select the destination organization. Source Project, Backup Set, and Snapshot are pre-filled. Configure Additional Settings (retry count, metadata handling, notifications).

  2. Restore Settings (Optional) - Fine-tune the restore using Record Selection, External ID, Exclude Objects, Exclude Fields, Data Translations, Data Mask, Validations, Junction Objects, and Batch Size. Note: Record Selection is disabled when records are pre-selected from the Compare view.

  3. Preview - Review the restore configuration and submit the job. Background discovery is supported: you can submit the restore job without waiting for the UI to complete loading.

For more information, see Understanding Object Relationships.

6. If you want to compare records from the selected snapshot with records from another snapshot instance, perform the following steps.

Step

Description

1

Enter the date and time of another snapshot instance in the Compare with Snapshot date field.

2

Click Created/Updated or Deleted to filter the records.

  • Created/Updated - This option filters the created/updated records from the snapshot instance.

  • Deleted - This option filters only the deleted records from the snapshot instance.

3

Click Select All to select all displayed records.

Alternatively, specify a SOQL statement in the search box, click Search to filter specific records, and then select individual records.


📝 Note

You can skip the WHERE keyword in the SOQL statement.


4

Click View Detailed Record Comparison to display comparison results for a single record selection. This displays a window highlighting the changes to the record as per both snapshots.

Select Show only items with difference to view differences in data at the top of the list for quick analysis.


📝 Note

This preview also highlights updates to the system object records.


Click Download to download the record comparison results in a CSV format.

5

Click Create Restore to restore the selected records.

The restore wizard guides you through the following steps:

  1. Basic Configuration - Select the destination organization. Source Project, Backup Set, and Snapshot are pre-filled. Configure Additional Settings (retry count, metadata handling, notifications).

  2. Restore Settings (Optional) - Fine-tune the restore using Record Selection, External ID, Exclude Objects, Exclude Fields, Data Translations, Data Mask, Validations, Junction Objects, and Batch Size. Note: Record Selection is disabled when records are pre-selected from the Compare view.

  3. Preview - Review the restore configuration and submit the job. Background discovery is supported: you can submit the restore job without waiting for the UI to complete loading.

7. Click Start Data Restore in the top-right corner. A Confirmation - Data Restore Summary window appears.

9. Review the details and click OK.


❗ Important

To ensure validations are present within your production instance during a data restore activity, do not select the Disable destination metadata during Data Restore option.


The restore process begins for the selected records. You can check the status of your data restore tasks from the Tasks page. For more information, see Managing Tasks.

Compare and Restore Metadata

You can restore metadata using a comparison view of the created, updated, and deleted changes in the metadata files. This enables you to reduce the overall recovery time.

Procedure

  1. On the Salesforce App console, click Backup.

  2. Select the desired Backup Set and navigate to the Compare section and click Records.

  3. Specify the date range to find the list of snapshots within the specified date range. A list of snapshot details with the list of associated records appears.

  4. Select the Metadata for comparison.

6. Perform the following steps to restore, download, or view details about the selected metadata file from the snapshot listing.

Steps

Description

Step 1

Click Show Details to preview the selected metadata file.

Step 2

Click Restore to restore the metadata file. The Restore window appears.

Enter the following information:

Select the destination organization to which you want to restore the metadata file.

  1. Select the following options as per your requirements.

  • Partial Deployment - If you enable this option, the restore activity continues even if some objects or metadata fail to restore, resulting in partial deployment.

  • Validate Only - If you enable this option, the object schema is also validated during the restore activity.

  • Send Notification Email when finished - Configure email notifications to receive emails about completion of the restore activity.

3. Click Confirm.


📝 Note

You can also select only metadata types from the left pane and restore the package.


Step 3

Click Download to download the metadata file.


📝 Note

You can also select only metadata types from the left pane and download the package.


7. If you want to compare metadata from the selected snapshot with metadata from another snapshot instance, perform the following steps.

Steps

Description

Step 1

Enter the date and time of another snapshot instance in the Compare Date and Time fields.

A list of metadata types with the count of files appears.

Step 2

Select a metadata type. The details for the selected metadata type appear on the right pane

Step 3

Select the required metadata files.

Step 4

Click Show Details to preview the updated and deleted changes for the selected metadata file between the two snapshots.

The highlighted changes display the delta between the two snapshots.

Step 5

Click Restore to restore the metadata file. The Restore window appears.

Enter the following information:

  1. Select the destination organization to which you want to restore the metadata file.

  2. Select the following options as per your requirements.

  • Partial Deployment - If you enable this option, the restore activity continues even if some objects or metadata fail to restore, resulting in partial deployment.

  • Validate Only - If you enable this option, the object schema is also validated during the restore activity.

  • Send Notification Email when finished - Configure email notifications to receive emails about completion of the restore activity.

3. Click Confirm.


📝 Note

You can also select only metadata types from the left pane and restore the package.


Step 6

Click Download to download the metadata package file.


📝 Note

You can also select only metadata types from the left pane and download the package.


You can check the status of your data restore tasks from the Tasks page. For more information, see Managing Tasks.

4. Review the details and click OK to start the data restore.


❗ Important

To ensure validations are present within your production instance during a data restore activity, do not select the Disable destination metadata during Data Restore option.


Monitor Restore

You can view the progress of a restore activity using one of the following options from the Salesforce App console:

  • Click Tasks from the taskbar at the bottom-right of the page.

  • Click Tasks from the navigation bar and view details about the pending restore job.

For more information about the Tasks page from the navigation bar, see Managing Tasks.

Also, as an Cloud Administrator, you can view data restore details available through a report. For more information about the generated report, see Backup Activity Report for Salesforce and Data Restore Activity Report.

Where to go from here

Did this answer your question?