Top-5 backup solutions for Salesforce
It is a common misconception that cloud systems such as Salesforce do not need backup.
It’s true that cloud service providers will handle disaster-recovery type of restore if something goes wrong on their part, this however does not extend to everyday use. In fact, even when in the cloud, data may be deleted or overwritten by the users and an effective backup strategy still needs to be in place.
Historically Salesforce was able to perform a disaster recovery (“Disaster Recovery” service) as a last resort (and costly) restore option; however effective July 31 2020 Salesforce discontinued this option.
In 2022 Salesforce introduced its own, native Backup & Restore service. Since it is generally a good idea to have a third-party backup provider for increased data security, Salesforce Backup & Restore is not included on the list below.
Possible causes of data loss
There are multiple scenarios in which data can get lost:
- Human error such as changing value of a field, deleting a record or a piece of metadata (for example, a report)
- Data import or mass update overwriting data with wrong values
- Workflow rule, trigger or anonymous APEX script modifying values in an unintended way
- Malicious user behavior
Data vs. metadata
It is important to distinguish between data and metadata:
- Data means values stored in the object store, similar to contents of database tables
- Metadata is additional configuration data specific to your organization including custom fields, layouts, APEX triggers, rules, reports and others — anything that can be customized or added to a Salesforce org
For organizations using Salesforce without much customization, metadata backup may not be as important as data backup (at least initially).
For organizations heavily customizing their instance, there may be a considerable investment/IPR that requires protection via metadata backup.
|Important||Salesforce recycle bin does not track updates or metadata changes and should not be only way of ensuring data protection.|
Free tools provided with Salesforce
Salesforce provides a few options that can be used for simple backups:
- Manual data export (Setup → Data Management → Data Export)
- Data export via reports
- Data Loader import/export
- Metadata backup via the Package Manager (Setup → Package Manager)
Using a full Sandbox
A full sandbox is a 100% mirror of the production instance holding both data and metadata. It costs extra and can be only refreshed every six weeks. Typically, it is used by organizations doing a lot of Salesforce development or testing large data migrations, however it can be used as a backup tool as well.
Managing metadata with development tools
For organizations that have Salesforce development teams, metadata is usually retrieved for development using tools like IntelliJ with Illuminated Cloud or MavensMate and can effectively be versioned and backed up on source code management systems like Git.
Mirroring as a database
While the underlying Salesforce database is not directly accessible, there are multiple tools (Heroku, cData, Skyvia and others) that enable mirroring of Salesforce object data as a relational database such as Microsoft SQL Server, PostgreSQL, etc.
This is a good option when a RDBMS system is already in place (along with backup). These solutions do not back-up metadata (except for customized object fields) so it has to be backed up separately, e.g., by a development team.
|Important||Not all products allow bi-directional synchronization, so restore may require extra steps like export, preparing data files, creating Data Loader scripts, etc.|
Using a specialized backup tool
This is definitely the best solution, especially for organizations that use Salesforce for more than just a CRM.
For example, we recommend a backup solution for customers using Nextian products — when customer orders or subscription services are deleted (along with their entire history), it is difficult to re-create them from recycle bin or Data Loader export files.
How does a Salesforce backup work?
The inner workings of Salesforce backups are significantly different from those of a filesystem or a database.
While the latter rely in some form of copying files to backup storage, in Salesforce there is no direct access to database and the filesystem — everything has to be accessed via the API.
A backup solution for Salesforce is really an advanced data import/export tool rather than a file-based backup/restore.
API based access does not distinguish between backup or other applications, which means that triggers and workflows will still be executed.
For an effective restore they need to be disabled along with email sending and batch jobs. For example, ownBackup recommends the following steps before restoring the data:
Top-5 backup solutions for Salesforce
Nextian choice for full metadata/data backup.
Nextian choice for data-only backup.
Other solutions can be found on Salesforce AppExchange.
Differences between restoring Salesforce data and a relational database
There are some differences for the restore process in Salesforce vs. a relational database because object ids and auto-generated names cannot be set by users.
The lookup fields to new objects are easily handled by the most backup packages, however auto-generated fields are a bigger problem.
Consider the following scenario:
- An object with an auto-generated name of SRV-000001 was deleted
- Restore operation is invoked and the object is re-created
- Next available name will be generated, for example SRV-000002
Possible workarounds for this include:
- Temporarily changing object names to text rather than auto-generated for the restore time
- Designing objects names as text fields generated via a trigger with an option to bypass the trigger
|Tip||It is always a good idea to have a setting to disable trigger processing for your own code.|
Additional benefits of backup tools for Salesforce
Salesforce backup tools typically offer additional features enabling effective Salesforce administration including:
- Alerting & notifications about deleted/modified objects making it easy to spot unwanted or unusual operations (e.g., deletion of accounts).
- Ability to generate diffs between backups to identify when a change was made. This reduces need for field history tracking in Salesforce, which in turn leads to lower storage requirements and cost. As a result, change tracking in Salesforce can be limited to critical objects/fields only.
- Ability to restore data & metadata across Salesforce instances for testing or migration. Some tools can anonymize the data as well.
Despite Salesforce being in the cloud, backup strategy and configuration are still important, and we strongly recommend making it a part of overall Salesforce development strategy.
Nextian is a vendor of Quote-to-Cash (QTC) software for cloud and communications helping providers accelerate growth and increase customer lifetime value.
Contact us today to find out how we can help you!
An overview of best practices for handling different account types (partners, resellers, vendors, customers) in Salesforce.
Learn how to dynamically call static Salesforce APEX methods to create applications with configuration-driven, adaptable run-time behavior.
GET THE NEXTIAN ADVANTAGE
We help enterprises increase revenue, profitability and gain efficiencies by realizing the full potential of the Salesforce platform.