Salesforce offers different solutions for data backup, and there are also different apps available for the same. Salesforce has a local system also for data backup, and we are left with the need to deal with two different categories of salesforce backup of data.
- Data Backup (native)
Native data backup is to keep the data available readily at the Salesforce ecosystem. This will be the priority when you consider keeping data secured and avoiding any further data discrepancies. All types of configuration and customization-related data discrepancies can be addressed this way. We can also avoid data loss with a cleanup of data and also importing original data as backup.
- Metadata Backup (native)
Native Metadata Backup aims a keep the metadata related to the configuration settings like the page layouts, dashboards, reports, custom fields, and the custom code as Apex. It may also refer to the data schema and model which is built-in at Salesforce. We haven’t considered it as a priority usually since this model is usually changed through the basic setups. We have metadata backups as various sandboxes have their data model as the same.
Salesforce native options for backup
Here are some of the methods available for Salesforce native backup.
This is the basic and simplest feature in Salesforce. With this, we can simply export Salesforce data in CSV format and keep a copy of it. The users can also schedule the data export at their comfort or can do it manually then and there using the ‘Export Now’ option. You can also send it through email to the registered email ID of the users. A link will be sent to the mail for CSV data file download, which will be active for 48 hours for the recipient to click and download. The steps involved in data export are.
- Go to Setup.
- Choose Data Management.
- Select the Data Export option (this required the profile permission.)
- Select objects or choose all data to be included in the backup file.
However, the data explore of Salesforce is not supported in the sandboxes. An export can be requested in the sandbox, but it will not be exported. The ideal mode of removing your export request if it already got queued is by refreshing the sandbox.
You also need to consider the file size while doing manual export of data backup. If the org size is large, then there may be multiple zip files created on data CSV export. ZIP archives will be created. Each of these zip archives may contain one or multiple CSV files, which can be as big as 512 MB for each 512 MB of data export, separate. Further, let us explore some of the native salesforce data backup apps.
Data loader tool
Data Loader is a tool that helps to export and import data on Salesforce. This tool can also support the export of CSV files for data loading and backing up. We use a data loader to export data objects in tables in the CSV and keep a backup in the local system. An important consideration to make on using the data loader tool is that it does not allow to export attachments. As an alternative, you may use the option of data exports weekly in the online apps for exporting attachments.
We can use the Export Report option for exporting data and to save it on the local machine. The two options available for data export are as below.
- Formatted Reports
Formatted Report is available in Salesforce with groupings, report header, and filter details. As the formatting is kept the same, you will not be able to choose any encoding which only supports the .XLSX file type.
- Details Only
It will export each of the detailed rows without any formatting, and it is also useful to do more calculations using a spreadsheet. In such a case, we may need some data but not in any special formatting, so this approach is only preferred if we use the Report exporting option. The view of details-only will also avoid any limitations in the number of reports, which remains unlimited in the given view. Let us further explore the automatic backup of data code and data.
Backup the automatic code and data
These features can be made available within the Salesforce system for backing up data regularly, natively, and externally.
Native backup: It is easy to write codes and take the backup of every record and not the attachments. These can be saved in CSV inside the files or attachments. We can save about ten thousand records of about 20 fields in each CSV for less than about 2 MB space. As this could be exported in CSV format, the restoration code can also be clicked for comparing with the old as well as new records. You may generate the reports for such comparison, and as the data admins may ask to overwrite the data in full or in partial, then this code may be written further to get it done automatically.
External backup: For this, we may write a custom code and then schedule a particular batch of data to be saved with the files and records in an external application or server. One drive, Google drive, and even the external database can be used to save data. We can also schedule the backup process at our convenience. It can be scheduled weekly or daily. This can be a much-secured way for the data backups as the apps built already and available at the app exchange may have many loopholes that cause data loss.
Full copy Salesforce Sandbox backup
This is the actual copy of the entire Salesforce environment which includes all Salesforce environment data as well as the metadata. It is possible to replicate the Salesforce Org fully for data, metadata, and Sandbox Partial Copy. Sandbox backup is also available in Performance edition and Unlimited edition etc. Some of the applications used for Salesforce backup are:
- Storage Helper Free Edition.
- OwnBackup for Salesforce.
- CloudAlly Backups for Salesforce.
- S3 Link Features.
- Spanning Backup for Salesforce.
- Druva inSync Backup.
Whichever mode of Salesforce backup you use, it is important to ensure that you keep the latest version of the Salesforce data backup available as in case of any failure or data loss, it is important to have an updated backup version available for timely restoration.