Sub topic 6
Storage limits and refresh intervals
This chapter assumes you know the four sandbox types by name and understand the difference between metadata (configuration and code) and data (records). It covers two limits that decide which type fits a job: how much each sandbox can store, and how soon it can be refreshed.
Storage limits
Each sandbox type has a data storage limit and a file storage limit. Data storage counts records. Most records count as about 2 KB each, whatever their field contents. File storage counts files, attachments, and documents.
| Sandbox type | Data storage | File storage | Refresh interval |
|---|---|---|---|
| Developer | 200 MB | 200 MB | 1 day |
| Developer Pro | 1 GB | 1 GB | 1 day |
| Partial Copy | 5 GB | Same as production | 5 days |
| Full | Same as production | Same as production | 29 days |
These are the standard values. Your contract can change them, so check Setup > Sandboxes in your own org for the limits you actually have.
What the limits mean in practice
Developer and Developer Pro sandboxes copy metadata only. They start with no records, so the storage limit applies to data you load yourself.
Partial Copy and Full sandboxes copy data from production. A Partial Copy sandbox copies only a sample, chosen by a sandbox template, and that sample must fit in 5 GB. A Full sandbox copies everything, so its capacity matches production.
You can check a sandbox's current usage from Apex. This snippet runs in the sandbox itself and needs no setup:
Map<String, System.OrgLimit> limits = OrgLimits.getMap();
System.OrgLimit dataStorage = limits.get('DataStorageMB');
System.debug('Data storage used (MB): ' + dataStorage.getValue());
System.debug('Data storage limit (MB): ' + dataStorage.getLimit());Refresh intervals
A refresh replaces a sandbox with a fresh copy of its source org. The refresh interval is the minimum wait between one create or refresh and the next. Until the interval has passed, you cannot start another refresh of that sandbox.
The intervals set a practical rhythm for each type:
- Developer and Developer Pro can be reset daily, which suits throwaway development work.
- Partial Copy can be refreshed about once a week, which suits QA cycles.
- Full can be refreshed about once a month. Plan its refreshes around release dates, because a missed window costs you nearly a month.
Common errors
- Planning a Full sandbox refresh the day before a release. If it is still inside the 29-day interval, the Refresh option is unavailable.
- Loading test data into a Developer sandbox past 200 MB. Loads fail once you reach the limit. Move to Developer Pro or Partial Copy, or load a smaller data set.
- Assuming file storage follows data storage. For Partial Copy and Full sandboxes, file storage follows production, so large file libraries can take much longer to copy.
Exercise
Your team needs a sandbox with about 3 GB of sampled production data, and you want to be able to refresh it before each weekly test cycle. Which type fits, and why?
Show answer
Partial Copy. Its 5 GB data limit holds 3 GB of sampled data, and its 5-day refresh interval allows a refresh before each weekly cycle. Developer Pro holds only 1 GB, and a Full sandbox can be refreshed only every 29 days.