How to effectively archive your Salesforce data

How to effectively archive your Salesforce data

Eliza Pepper on

Share with



Salesforce data is vital. It holds critical information needed by customer-facing teams like sales, marketing, and customer service, as well as insights needed for tracking those functions. As a result, every business wants to ensure their Salesforce data works efficiently, and is accessible and secure.

However, with thousands of records being added each day in busy orgs, your data can become compromised. You may be inadvertently keeping legacy data in live environments, breaking compliance requirements for data retention periods, or clogging up business processes with unnecessary data.

There are a few different options for removing data from your Salesforce orgs, but some are more secure and effective than others. Read on for a complete guide to Salesforce data management, and how data archiving can streamline your process.

The challenges with Salesforce data

Naturally, as Salesforce becomes more central to your business’ core functions, your use will increase — this means more business data in your orgs. As a result, it’s easy to hit Salesforce data and file storage limits as your business scales. Org storage limits are set based on the type of org and number of users, but even with the highest storage limits — set at 2 GB of file storage per user license in Enterprise, Performance, and Unlimited Editions — many teams find they run out.

Sadly, as you near Salesforce’s data and file storage limits, you’ll notice your org performance begins to drop — for example, your reports might take a long time to produce. And once you’ve reached the limit, performance will drop dramatically and Salesforce also has the ability to restrict record creation, which could stall your end users and prevent you from collecting up-to-date customer data.

At this point, most admins think they only have two options:

  1. Delete data from Salesforce orgs. This option is far from ideal as you may still need to access this data in the future for ongoing customer relationships, compliance, or auditing requirements.
  2. Pay for increased Salesforce storage. While it’s simple to purchase additional Salesforce storage, repeatedly doing so leads to exponential storage costs. This makes it difficult to forecast your Salesforce spend and even reduce your Salesforce ROI.

These options are far from perfect, but thankfully data archiving provides a third, more appealing solution.

What is data archiving?

Data archiving allows you to remove data from your Salesforce orgs and move it into safe off-platform storage. This means your business data will still be available for you to view and audit within the archive, and you can easily restore it at any time.

Why should you archive your Salesforce data?

Alongside the immediate benefit of saving you from mass-deleting data or Salesforce storage costs, there are two sides to archiving’s benefits for your business: increased efficiency for your Salesforce team and increased security of your data.

Archiving increases the efficiency of your data management through:

  • Improved org performance. Archiving ensures that you don’t approach org storage limits and experience the associated performance slow-down. This keeps your orgs running efficiently and smoothly for your Salesforce team and end users.
  • Unblocking key business processes. Archiving reduces risk for your business, by ensuring that processes like report creation won’t be blocked by exceeding Salesforce org limits or masses of unnecessary data displaying.
  • Removing irrelevant data. Stale data can cause you to make decisions based on information that is no longer true. Reports and calculations based on stale data can result in misleading findings.

Archiving also underpins your organization’s security and compliance by:

  • Retaining legacy data. Archiving allows you to remove legacy data that’s no longer accessed daily, stopping unnecessary data from clogging up your org. However, the legacy data will still be preserved in case you need to review it for auditing or compliance requirements.
  • Dovetailing with wider disaster recovery and backup. Across your orgs and data, you should be applying the Principle of Least Privilege: only giving users the minimum access they need to complete their tasks. Archiving reinforces this approach by removing user access from data that they aren’t using on a daily basis, strengthening your existing disaster recovery plan and backup process.

Archiving strategies

While all Salesforce teams can benefit from increased org storage and bolstered security, each company will implement their data archiving strategy slightly differently. To decide how your team will approach archiving data, it’s important to consider:

  • What data will you archive? This choice has to be made on a case-by-case basis as it will depend on what data your Salesforce team and end users are accessing. Using the LastModified field on Objects to identify what data seems to be inactive and then communicating this with your team to confirm it’s not needed is a sensible approach.
  • How often will you archive data? Will this be done as soon as the data reaches the criteria to be archived, or on a set regular cadence?
  • When will you restore archived data? You’ll need to establish a process to monitor or for end users to request that data is restored.
  • Will you delete archived data? The most common reason your team will need to delete archived data is to in keep with data retention policies set by compliance regulations. For example, under GDPR, your business should only retain personal data for as long as it’s necessary.

For more archiving strategy considerations, take a look at our blog post on Salesforce archiving best practices.

What’s the difference between backup and archiving?

It’s easy to get confused between data backup and archiving, as both are storing your data outside of Salesforce. However, they have clearly distinct purposes and shouldn’t be used interchangeably.

Salesforce backup is there to protect you in the event of unexpected data loss — from malicious attacks to human error. Backup works by creating a copy of your live environment and safely storing this in another environment, so that you can restore the replicated data and metadata in the event of data loss. This means the data and metadata is unchanged by backup, and your backup is an accurate reflection of your live environments.

By contrast, archiving is the tool you should use when you want to remove data from your Salesforce orgs. Archiving removes unwanted data from your live environments and moves it to storage. Like backed up data, archived data can be restored at any time and is a key part of your DevSecOps process.

Workarounds to archive your Salesforce data

If you’re ready to move on from deleting data or paying for additional Salesforce storage, it’s time to start archiving! Some teams have been able to do this with Salesforce workarounds:

  1. Big Objects. You can move data from your usual objects into Big Objects, which can store billions of records in read-only format. However, the process of transferring all this data is complex and requires a robust deployment tool.
  2. External Objects. These are similar to custom objects, but they store the record data outside of your Salesforce org. To use External Objects, you’ll need to establish an external data source definition that allows you to access the external system. While this will allow you to remove data from your orgs, moving data to an unsecured external storage that is accessed by weak connections creates a security risk.
  3. CSV Files. You can always download Salesforce data as .csv files. However, this will store data as flat files that don’t reflect your data hierarchies or relationships, meaning you’ll have to manually restore.

Alongside these native Salesforce workarounds, some teams have also been able to manipulate open source cloud tools to archive data. For example, using Heroku Connect, you can sync your orgs and store Salesforce data on the Heroku Postgres platform. Storing data on Heroku is certainly more secure than using External Objects or .csv files, as Heroku does use encryption and allows you to configure encryption keys to restrict access. However, restoring from Heroku storage is still a manual process and you won’t be able to edit the store without using External Objects.

How to securely archive your Salesforce data with Gearset

Teams with high security standards and the need to quickly archive data or restore confidently need a tailored, Salesforce-specific archiving solution.

Gearset’s archiving solution handles the nuances of your Salesforce data, and comes with the same intuitive restore process as backup. Want to find out more? Let’s walk through how to set up your first archive in Gearset!

Create an archive

Start off by heading over to the Archiving tab and click Create an archive.

Create your first archive in the archiving tab

Set up your archive

Choose the org that you want to archive records from using the drop down menu and set an Archive name.

Select which org to archive data from

At this point, you’ll also need to check you’ve enabled the right permissions for archiving: QueryAlllFiles, ModifyAllData and HardDelete. If you don’t, you’ll need to go and enable the right permission set.

Hit Create Archive.

Ensure you have the right permissions on your fields

When you first go to set up your archive, it’s also likely that you won’t have the right permissions for your fields. This is needed so that all related child records and field data are archived.

Instead of having to go and manually apply these permissions, you can simply click Create a permission set.

Allow Gearset to automatically create a permission set

Gearset will then display all the fields that need to have the permissions enabled. All fields will be automatically selected, but you can easily search through and tick or untick them as you please.

Gearset will automatically display the fields that need permission

Once you’re happy with your selection, click Deploy all missing permissions and then hit Continue.

Set future permissions

On the next screen, Gearset will prompt you to select what will be done if there are missing permissions in future. You have the choice between:

  • Deploy missing permissions automatically
  • Don’t archive any data if there are missing permissions
  • Ignore missing permissions and continue archiving

We suggest choosing Deploy missing permissions automatically, so future archiving processes are smooth.

Choose what Gearset will do if there are missing permissions in future

Create your first policy

On the next screen, you’ll need to create your archiving policy — this determines which Object you’re archiving records for and what will trigger that Object being archived.

Create your first archiving policy

You can also hit preview matching records to see which records match your policy criteria.

Preview the records that will be archived by your policy

Archive related objects

Gearset will also display related objects, and allow you to archive these alongside your designated object in the archiving policy. This ensures that any child records will be archived along with their parent records.

Preview and archive related records

Once you’ve reviewed this, hit Create policy & validate with a preview to review and finalize your archiving policy.

Preview your archiving policies

On the next page, you can view your archiving policies. At this point, your new archive will still be validating and we recommend that you wait for this to complete before taking the next step to delete data from your org.

Once validation is complete, click on any of your policies and either select for it to run now and/or schedule it for later.

View your policies and select when they run

Clicking Run Now will start the archiving process.

Search for archived records

Once archiving is complete, you can navigate to the Archived records tab and search for specific records by any value within the record, such as its name or RecordID.

View archived records

View your archiving history

You can also navigate to the Archiving History tab to view your past runs and click on each run for a complete view of what records, files, and attachments were archived.

View the history of your archiving runs

As Gearset charges based on your number of users, rather than your storage usage, there’s no limit to how many records, files, or attachments you can archive.

Take control of your data

Archiving should be a cornerstone of your Salesforce data management, allowing you to maintain compliance and business efficiency.

If you’re ready to unblock the daily workflow of your end users and take control of your Salesforce data storage, click here to learn more about Gearset’s data archiving solution. Or, see it in action for yourself by booking a custom demo with our Salesforce experts.

Book your Gearset demo to learn more
Contact sales