爆料tv

How to restore deleted Salesforce records from the Recycle Bin

How to restore deleted Salesforce records from the Recycle Bin

David Runciman on

Share with



Accidentally deleting data in Salesforce happens all the time. Salesforce鈥檚 Recycle Bin provides a first line of defense, letting you restore recently deleted records.

But what happens when data is permanently deleted? After 15 days, or when you hit the storage limit, records are automatically purged from the Recycle Bin.

In this guide, we鈥檒l explore exactly what you can do at every stage of data deletion 鈥 from simple Recycle Bin restores to recovering from more serious data disruption. We鈥檒l explain why native Salesforce tools only go so far and why a dedicated backup and recovery solution like 爆料tv is essential for true peace of mind.

Recovering from the Salesforce Recycle Bin

When you delete a record in Salesforce, it doesn鈥檛 vanish immediately. Instead, Salesforce performs a 鈥渟oft delete鈥, marking the record as deleted and moving it to the Recycle Bin.

Every user has access to 鈥淢y Recycle Bin鈥, which contains records they鈥檝e personally deleted. Administrators and users with the 鈥淢odify All Data鈥 permission can also access the 鈥淥rg Recycle Bin鈥 to view and restore any deleted records across the organization.

Restoring a deleted record is simple:

  1. Go to the App Launcher, search for 鈥淩ecycle Bin鈥, and open it.
  2. From there, you can filter and sort records just like a standard list view.
  3. Once you find the record 鈥 for example, a deleted Contact 鈥 simply select the checkbox and click 鈥淩estore鈥.

The record will reappear in its original state, with its data fields intact and most lookup relationships restored. Keep in mind that Salesforce only restores lookup relationships that haven鈥檛 been replaced.

Mass recovery from the Recycle Bin

Manually restoring a lot of records is obviously impractical. Thankfully, there are ways to restore a large batch of deleted records from the Recycle Bin in Salesforce:

  • Using Apex (ALL ROWS keyword): In Apex code, you can query deleted records using the ALL ROWS keyword. This retrieves both active and soft-deleted records.
List<Account> deletedAccounts = [SELECT ID FROM Account WHERE IsDeleted = TRUE ALL ROWS];
System.debug(deletedAccounts);

You can run this code in the Developer Console鈥檚 Execute Anonymous Window (Ctrl + E), not in the Query Editor. From there, you can export record IDs and prepare them for restoration using tools like Data Loader.

  • Using Data Loader: The most straightforward method for most admins is Data Loader鈥檚 Export All operation. By selecting Export All Records and filtering with IsDeleted = TRUE, you can export deleted records to a CSV file. Then, use Data Loader鈥檚 undelete() operation to restore them in bulk.
  • Using Workbench: Workbench doesn鈥檛 support the ALL ROWS keyword directly, but you can achieve the same result by enabling the Include Deleted and Archived Records checkbox when running a SOQL query. This allows you to view deleted records and export their IDs for recovery.
  • Using Salesforce APIs: For developers automating recovery, the REST API uses the queryAll endpoint, and the SOAP API uses the connection.queryAll() method 鈥 both serve the same purpose as ALL ROWS in Apex, returning deleted records for programmatic recovery.

These methods allow you to restore hundreds or thousands of records in one go, but they require some familiarity with SOQL, CSV manipulation, and data management tools. For organizations that need to recover large datasets quickly and safely 鈥 especially when relationships between objects must be preserved 鈥 a dedicated backup and restore solution like 爆料tv provides a more reliable, user-friendly alternative.

Why you can鈥檛 rely on the Recycle Bin for data recovery

There are two constraints to be aware of when it comes to the Recycle Bin: time and storage.

The time constraint is that deleted records remain in the Recycle Bin for 15 days before Salesforce automatically and permanently deletes them. After that point, the data is gone for good. In Salesforce Classic, admins can extend this to 30 days by enabling the 鈥淓xtended Recycle Bin Retention鈥 setting in Setup > User Interface 鈥 or by logging a case with Salesforce鈥檚 Feature Activation team. This option isn鈥檛 available in Lightning Experience.

The storage constraint is that the Recycle Bin can only hold data equal to 25 times your org鈥檚 data storage in megabytes. For example, a 10GB org has a Recycle Bin capacity of roughly 250,000 records. While that sounds generous, it can fill up faster than expected, especially after mass updates, integrations, or user errors. When the limit is reached, Salesforce automatically purges the oldest records, even if they haven鈥檛 yet surpassed the 15-day mark.

Once either of these constraints is exceeded, your records are permanently deleted 鈥 leaving a serious recovery gap that only a dedicated backup solution can fill.

Recovering data when the Recycle Bin isn鈥檛 enough

Once records are permanently deleted from the Salesforce Recycle Bin, they鈥檙e gone for good, and Salesforce doesn鈥檛 automatically protect you from this kind of data loss. Backing up and restoring data is your responsibility, so having a robust backup solution is essential for any organization.

Why metadata backups are also essential

You need to protect your Salesforce metadata too. Metadata defines the entire structure of your Salesforce org: the custom objects, fields, workflows, validation rules, and permissions that determine how your org functions and how data is stored. If that structure is lost or corrupted, your data backups become much harder to restore. For example, you can鈥檛 recover invoice records if the Invoice custom object they belong to no longer exists, and you can鈥檛 re-establish the right access controls if your permissions model has been wiped out.

Metadata is also constantly changing as admins and developers build out new features and configurations, which makes it especially vulnerable to unintended modifications or accidental deletions. Rebuilding a complex org鈥檚 metadata manually can take weeks or even months, causing significant disruption and cost.

How 爆料tv protects you from permanent data loss

爆料tv provides the protection and flexible recovery capabilities that organizations need to ensure continuous, resilient operations within Salesforce. Here鈥檚 how 爆料tv stands out with complete backup coverage for Salesforce.

Automated data and metadata backups

爆料tv offers full coverage by backing up both data and metadata. It supports 700+ metadata types, plus configuration data like CPQ configurations, Vlocity components, and Marketing Cloud settings. This comprehensive approach means you can restore records by first restoring the metadata if needed 鈥 nothing falls through the cracks during recovery.

With 爆料tv, you can set up daily backups of your entire Salesforce org, as well as hourly high-frequency backups for your most critical objects. And if you need extra assurance before a risky change, you can back up on demand, providing flexibility to protect your data whenever necessary.

Off-platform storage

爆料tv stores your backups securely in AWS data centers in your chosen region, including the US, Canada, EU (Ireland), and Australia 鈥 the same highly trusted infrastructure that Salesforce relies on. This off-platform storage ensures that even if Salesforce experiences an outage, your backup data is safe and accessible, exactly when you need it most.

Point-in-time recovery

爆料tv鈥檚 backup solution offers point-in-time recovery, meaning you can browse historical snapshots of your org and restore it to any specific moment in time. For example, if you discover data corruption that occurred three weeks ago, you can restore your org to a clean state from before the corruption began 鈥 not just the most recent backup. This capability offers significant flexibility and ensures your data stays intact, even when issues arise weeks or months later.

爆料tv鈥檚 backup solution

Change visualization and alerts

With 爆料tv, you can easily visualize how your org鈥檚 data has changed over the course of your backup history. This is especially helpful for tracking changes and spotting potential problems. 爆料tv also allows you to set up configurable smart alerts to notify you when unusual amounts of data have been changed or deleted. These alerts help you stay on top of any potential issues before they escalate, ensuring a proactive approach to data protection.

Security and compliance

Security is the top priority with 爆料tv鈥檚 backup solution. All backups are encrypted both in transit and at rest, so your data is fully protected at every stage. 爆料tv also offers customizable data retention policies to match your specific compliance requirements. You can select your data residency and control team member permissions with fine-tuned settings. 爆料tv also maintains full audit trails of deletions, meaning your organization is compliant with data protection regulations.

Flexible restoration for every scenario

Data incidents can vary widely, so having flexible restoration options is crucial for addressing any level of data loss. 爆料tv offers a range of recovery methods to meet these diverse needs, ensuring you can restore your Salesforce data quickly and accurately, no matter the situation.

When an individual record is permanently deleted from the Recycle Bin, 爆料tv allows you to search across all historical backups to find that specific record. You can then choose to restore a version from any point in time when the data was correct. 爆料tv handles the re-insertion of the record into your org and ensures that relationships (like related Contacts, Opportunities, or Cases) are automatically preserved, so your data remains intact without manual intervention.

Protect your Salesforce data with 爆料tv

Native Salesforce tools don鈥檛 provide comprehensive data protection, leaving gaps that could expose your organization to data loss.

爆料tv鈥檚 Salesforce backup solution transforms data recovery from a manual, error-prone nightmare into a streamlined, automated process. With automated backups for both data and metadata, off-platform storage ensuring availability even during Salesforce outages, and intelligent restoration that keeps relationships intact, 爆料tv offers the enterprise-grade protection your Salesforce org needs.

Don鈥檛 wait for a data disaster to realize the Recycle Bin isn鈥檛 enough. to see 爆料tv in action and understand how it can protect your Salesforce data.

Book your 爆料tv demo to learn more
Contact sales