Refresh Salesforce Sandbox

How to Refresh Salesforce Sandbox

Refreshing the Salesforce Sandbox is a crucial task to ensure the sandbox or lower environments are updated with the latest data and configurations from the Production org. In this blog, we will discuss what a sandbox is, how to refresh a Salesforce sandbox and what happens when a sandbox is refreshed.

Before we dive into sandbox refresh, let’s first understand what a sandbox is.

What is a Sandbox?

A Salesforce sandbox is a test environment where the development and testing activities are implemented before they are released to production or the live environment.

Types of Salesforce Sandboxes

Below are the different types of sandboxes in Salesforce.

Types of Salesforce Sandboxes

1. Developer Sandbox

  • The developer sandbox is for coding and testing by a single developer in an isolated environment.
  • It copies metadata only (configurations, customisations) from the production org.
  • Data storage is limited to 200 MB(can be upgraded to 400 MB).
  • File storage is 200 MB.
  • This is ideally used for basic development tasks and unit testing.
  • The refresh interval is one day.

2. Developer Pro Sandbox

  • The Developer Pro sandbox is similar to the Developer sandbox, but with increased storage capacity.
  • Data storage is limited to 1 GB(can be upgraded to 2 GB).
  • File storage is 1 GB.
  • This sandbox is suitable for larger development tasks, integrated testing, and user acceptance testing.
  • The refresh interval for this sandbox is one day.

3. Partial Copy Sandbox

  • The Partial Copy sandbox contains a subset of the production data, along with all metadata.
  • It provides a more realistic testing environment than the Developer or Developer Pro sandbox.
  • Data storage is limited to 5 GB.
  • File storage is the same as the production org.
  • This is more useful for functional testing, integration testing, and user acceptance testing.
  • The refresh interval for this sandbox is five days.
  • This sandbox utilises sandbox templates to select specific data and objects to copy from the production data.

4. Full Copy Sandbox

  • The Full Sandbox is a complete replica of the production environment, including all data and metadata.
  • This sandbox is used for comprehensive testing, user training, and staging environments.
  • Data storage capacity is the same as the production org.
  • This sandbox is more suitable for data load testing, integration testing, performance testing, and load testing.
  • The refresh interval is 29 days.

Sandbox Template

Salesforce Sandbox templates allow you to pick specific objects and data to copy to your Full or Partial Copy sandbox to control the size and content of each sandbox. These are only available for use with Full or Partial Copy sandboxes.

When you create a sandbox template, you select the object data (standard and custom) to copy during the creation or refresh of a sandbox.

Refreshing Salesforce Sandbox

Sandboxes Page

To refresh a sandbox, log in to your Salesforce Production org and navigate to Setup.

From the quick find box, search for “Sandboxes” and open the Sandboxes page.

After you open the sandbox page, you can see all of your org’s Available Sandbox Licenses, Sandboxes, Sandbox Templates and Sandbox history.

You will also be able to create a new sandbox using the “New Sandbox” button.

refresh sandbox setup

Refresh Sandbox

Step 1

  • To refresh the sandbox from the list of available sandboxes, click on the “Refresh” action on the left side of the sandbox name. (Note – The refresh action only appears if the sandbox has completed the refresh interval time. For example, you can refresh a Full copy sandbox only after 29 days from the previous refresh.)

sandbox refresh action

no refresh action

Step 2

  • After clicking the Refresh action, you will be redirected to the “Refresh Sandbox” page.
  • From the Sandbox license section, click on the “Next” button, based on the type of sandbox you are refreshing. For example, click the “Next” button in the Developer Sandbox if you are refreshing it.

refresh sandbox page

Step 3

  • After clicking next, you will be redirected to the Sandbox Options page. Here’s an example below: it’s a Developer Sandbox.
  • In the Sandbox page, select the Sandbox access (public group of users), and any Apex class from your org and the Sandbox template(if partial/full copy sandbox).
  • Here, mark the checkbox Auto Active to automatically activate the Sandbox without the need to manually activate it.
  • Finally, click on the “Create” button to successfully start the refresh activity for the sandbox. The sandbox status will change to “In Progress”, indicating the refresh is in progress

sandbox options page

 

  • After a sandbox is successfully refreshed, it creates a new copy of your sandbox environment by copying metadata and data from your production org.

Also Read – Formula fields in Salesforce with examples

Salesforce Sandbox Refresh Best Practices

  • If the refresh will impact other teams or users, make sure to notify them in advance to avoid any disruptions.
  • Before refreshing, back up custom metadata and test records that aren’t part of the production environment. This helps you restore them easily post-refresh.
  • After the refresh, Salesforce adds “.invalid” to user email addresses by default. Be sure to remove this so users can log in and access the sandbox normally.

FAQs

Q1. What is the difference between a sandbox and production?

Production is the live Salesforce environment where real users work with real data every day. Whereas Sandbox is a copy of your production org used for development, testing, training, or experimentation by developers and admins to try out changes safely without affecting real users or data.

Q2. How often can you refresh a sandbox?

Salesforce Sandbox refresh interval varies with the type of sandbox.

Developer Sandbox – 1 day

Developer Pro Sandbox – 1 day

Partial Copy Sandbox – 5 days

Full Copy Sandbox – 29 days

Q3. How do I refresh my Salesforce sandbox?

Go to Setup, type “Sandboxes” in the Quick Find box, and click on Sandboxes. You’ll see a list of your sandboxes. If a sandbox is ready to be refreshed, you’ll see a Refresh link next to its name. Just click on Refresh to start the process.

Conclusion:

Refreshing a Salesforce sandbox is a straightforward but critical process that helps maintain an accurate and secure testing environment. By following the steps above and adhering to best practices, you can ensure your sandbox stays synchronised with production, enabling effective development and testing cycles. Remember to plan your refreshes carefully, communicate with your team, and back up any important data before proceeding.

Get a complete Roadmap To Learn Salesforce Admin and Development

Share Now

Surya is a passionate Salesforce Developer specialising in Salesforce development and administration.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *