12

Can you please suggest the backup options available for salesforce org?

I want to have daily backup of my salesforce production org having around 1 TB of data (both records and metadata) so that i can restore it back to any date.

Does salesfore have any functionality to achieve this ? OR Is there any recommended tool that can support this ?

8 Answers 8

8

Salesforce does maintain back up data and can recover it, it's important to regularly back up your data locally so that you have the ability restore it to avoid relying on Salesforce backups to recover your data. The recovery process is time consuming and resource intensive and typically involves an additional fee. To avoid recovery fees and be able to recover your data whenever needed, you can use the following backup and recovery methods.

Data Export Service - This service is available for users with the "Data Export" profile permission by navigating to Setup, Data Management | Data Export. For more details see Exporting Backup Data.

  • (In the New UI ' Lightning ', users will find this under Setup Home | Data | Data Export)

Data Loader - The Data Loader is available for API Enabled organizations (Enterprise Edition and above by default) and can be used to export specific data.

  • See the Export Data documentation for more detailed instructions.

Report Export

  • Build a New Report containing the data that you'd like to backup

  • Export the report and select Comma Delimited .csv for the Export File Format.

I would suggest using a version control. It's the best way for managing all changes into your project, store history of changes and comfortable team work.

Salesforce: Automatic Metadata Backup with Force.com Migration Tool

1
  • for metadata @Devendra
    – Pavan tej
    Commented Aug 10, 2016 at 17:13
2

Most of the solutions available only do backups but does not help you with restore .For metadata backup ANT tool along with force.com migration tool along with CI solutions like Autorabit , Circle or Jenkins can be build .

For data back up I am familiar with an awesome tool known as Capstorm .This is very reliable solution uses table replication in java and backs data every 10 minutes .

1
  • 1
    This is a really important point. So many people focus on getting the data out, but fail to address "How do we use it?". The data is pretty useless if you can't view it in a meaningful way. Think about a Contact table where the AccountID field just has the SalesforceID of the Account. It doesn't mean much to the average person.
    – Nick C
    Commented Aug 12, 2016 at 4:23
1

The best "out of the box" solution is the weekly backup service, but it only backs up data, and only once per week. Otherwise, you could use the Data Loader, a mirroring service, or one of the apps on the AppExchange. If you wanted to cobble everything together yourself, a combination of the Data Loader and the Metadata Toolkit could be scripted to perform backups of both configuration and data.

1

My organization uses Backupify from Datto for this (link here). This is a cloud-based solution that backs up both data and metadata. We've been running it for almost a year. Our database is about 10GB; infrequently, our backup does not complete on schedule. Backupify does catch up in these cases. I'd recommend asking someone from Backupify if they can manage the 1TB of data you have.

Demand Tools from CRMFusion can do backups, but 1TB is a lot of data. I'm not sure the backup could be completed in a reasonable amount of time. 1TB is too much to back up to an Access db. Your only option in Demand Tools would be CSV.

1

There are two types of "backups" to consider: metadata and data.

As pointed out by others here, metadata backups are pretty easily accomplished using free tools such as Ant and the Force CLI. I personally use Ant scripts with BitBucket to periodically download metadata and commit into a snapshot/production branch. I also have to keep the package.xml file up to date to specify what to backup, and there are other limitations such as with reports, dashboards, etc. There are certainly other solutions - free and paid - that can handle this as well.

Data backups get a bit more complicated. The Weekly Data Export does work, however it's (a) weekly and (b) nothing more than a CSV export of raw data. Take this example: An Account is created on a Monday, Opportunities created on Tuesday, Opps closed on Thursday and then the Account deleted on Friday. If the Weekly Data Export takes place on Saturday, that deleted day may not be in the export. I say may because I've never been able to find this information documented. Either way though, if someone were to empty the recycle bin or use the API Hard Delete option, deleted data would never be recoverable. It's also a lot of zip files to download (if you have a lot of data) each week, and you only have 48 hours to download those zip files before Salesforce removes them.

That's where the commercial solutions come in. Products like the previously mentioned Backupify (http://www.datto.com/backupify/salesforce-backup) and OwnBackup (https://www.ownbackup.com/products/backup-for-salesforce) are capable of backing up both metadata and actual data. That's really handy if there is concern about understanding the configuration changes made directly in a Production org (proper governance policies should reduce the probability of these types of issues).

Where the commercial solutions really start to make a difference is in data recovery. I once had to restore data from a two month old Weekly Data Export (25+ ZIP files per backup). It's not easy, and dealing with lookup/master-detail fields to restore data relationships as tedious as it is complex. I've been told that restoring data with OwnBackup is significantly easier than with Backupify, but I have no personal experience to corroborate that statement. See https://www.ownbackup.com/restoring-lost-data-using-weekly-export

Finally, there are data replications services to make a complete copy of your Salesforce data to an external database. This is an attractive solution if you've got the resources to handle this already. Four key considerations here:

  1. This won't include metadata
  2. Sync policies need to be in place to ensure deleted records in Saleforce are not deleted (immediately) in the target database
  3. Restoring data into Salesforce is not straight forward and could require exporting data out of the target database before re-importing
  4. Associated costs for the external database (license, storage, api's, bandwidth)
0

To backup the Metadata an option is using the Salesforce Command Line Interface. This can allow a backup job to be scheduled from a normal shell environment in Windows, Mac or Linux and extract the majority of the metadata using the export command, e.g

force export

@bob-buzzard has got a useful blog post about doing this and picking up the Lightning components that are not currently picked up by the export command.

The command line interface can be used to extract data but requires SOQL queries for this so would have an extensive amount of setup to do it and would probably be unwieldy in an example with a large amount of data.

0

Zinc is a free solution to replicate your sObjects into a Relational database. It is fully open source and free (MIT licensed)

0

ro is a command-line application to back up all of a Salesforce org's data to CSV or JSON.

If you want to script your own export that uses a similar model, you can:

  • get a list of all of the sobjects, e.g. force describe -t sobject
  • for each object
    • get a list of the fields, e.g. force describe -t sobject -n <object> and check each field's queryable attribute
    • generate a SOQL query for all of the queryable fields
    • start a Bulk API query job with your query, e.g. force bulk query <object> <query>
    • retrieve all of the results, e.g. force bulk batch retrieve <job> <batch>

(Handling objects that don't support the Bulk API and retrieving base64 fields makes it a bit more complicated, but this is the general idea.)

1
  • I'm one of the authors of ro so I'm biased, but we're trying to make it the fastest way of exporting all of your Salesforce data.
    – xn.
    Commented Jun 6, 2019 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .