Best Practices to Restore Salesforce Data

By Mike Samboy

It is not uncommon for Salesforce users and admins to accidentally delete large volumes of data, modify a bunch of records or reconfigure settings. The data could be corrupt by someone’s bad decision to change the data. In the event of data loss, it might be possible to recover data from the recycle bin. But a recycle bin has its own limitations — 15-day retention and limit on the number of stored records.

Another means to recover overwritten data is using field history tracking. Field history needs to be manually enabled on objects. It can’t be turned on in all objects and has limitations of 20 fields per object. Permanent loss of customer data is a significant risk faced by a business. In the event of a disaster, it matters how quickly a business recovers data to ensure business continuity.

Salesforce provides native data backup options using Data Export Service, Data Loader, and Report Export. Restoring data while maintaining parent-child relationships is a complex, time-consuming and error-prone task. Fortunately, Salesforce provides a last resort to recover data at a specific point-in-time.

Salesforce Data Backup and Recovery Service

Salesforce recommends its customers to seek the assistance of native metadata backup solutions or third-party offerings to efficiently backup and recover data.

Per Salesforce:

“Because of the manual intervention, there is a cost. The cost is relative to the amount of manual work and time needed to perform the recovery. The price for this service is a flat rate of $10,000 for the one Organization that’s being recovered. The work involved actually costs us much more than that, but we pay for a portion of the service.” – Salesforce Data Recovery Service


Before you proceed to log a case with Salesforce, be sure to check the recycle bin or review deleted records using “export all” in Salesforce’s Data Loader.

Here are the pre-process steps essential for restoring data to Salesforce orgs:

  • Assess Damage and Define Goals
    Understanding the extent of data loss is essential. By now we realize that the Salesforce database is highly interlinked, so deleting a single record would result in cascade deletion across all associated parent-child data.
  • Determine the What and Where of the Lost Data
    To determine the occurrence of data loss, you would compare the metadata and data from your backup file to the file exported from the Salesforce org for the impacted objects. You’ll have to use VLOOKUP in excel or an equivalent to identify the relationship.
  • Create Restore Files
    Now that you have identified the missing objects/records, you would create separate files for the parent and all their related objects in “.csv” format.
  • Minimize Transformations During the Restoration Process
    Some of the Key challenges to minimize the transformations would be as follows:
    • Exclude Audit Fields, salesforce auto updates it.
    • Deactivate workflow or validation rules or triggers.
    • Switch auto-number field type to text.
  • Restore Data
    While manual restore is to be done, rule of thumb would be “insert” operation to upload parents and “upsert” for their children. Use external id to decide insert/upsert operation is required.

Post Process Actions

Finish the process with these practices:

  • Evaluate the restoration process by reviewing the integrity of the restored data.
  • Activate workflow or validation rules or Apex triggers, etc.
  • Switch auto-number field type from text back.
  • Manually update fields that did not exist or were deleted during the backup.
  • Alter the transformed data to get as close to the original data as possible.

Hope for the Best and Prepare for the Worst

Overall, data recovery using Salesforce is an intensive and cumbersome process. From the initial evaluation to the final restoration, there is the possibility of errors and depending on the level of lost data, it may take 20 or more days to recover it.

AutoRABIT Vault – A Robust Data Backup and Disaster Recovery Solution for Salesforce

AutoRABIT Vault is a comprehensive data backup and recovery solution built for Salesforce. Vault streamlines and automates the data recovery process restoring 1-1 relationships, 1-n relationships, and n-n relationships of Salesforce data as well as metadata.

Get 6 months access of Vault for free on an annual subscription. (Offer expires July 31st, 2019)

The Author

Mike Samboy

A San Francisco based tech enthusiast and Head of Marketing for AutoRABIT.


    March 22, 2022 12:45 pm
    Very helpful information. Thanks for sharing great article.

Leave a Reply