Sub topic 5
Partial Copy and Full sandboxes
This chapter assumes you know what a sandbox is and the difference between metadata (configuration and code) and data (records). It covers the two sandbox types that copy production data: Partial Copy and Full.
What each type copies
Both types copy all of production's metadata. They differ in how much data they bring along.
- Partial Copy copies metadata plus a sample of production data. A sandbox template, which you build first, defines which objects and records are included. The sample is capped at 10,000 records per selected object.
- Full copies metadata plus all production data, or a subset if you apply a template. It can also include field history tracking and Chatter data, which you choose when you create it.
A Full sandbox is a replica of production, so the copy can take hours or days for a large org. A Partial Copy sandbox is smaller and finishes faster.
Comparison
| Property | Partial Copy | Full |
|---|---|---|
| Metadata | All | All |
| Data | Sample, defined by a template | All, or a subset with a template |
| Template | Required | Optional |
| Data storage | 5 GB | Same as production |
| File storage | 5 GB | Same as production |
| Refresh interval | 5 days | 29 days |
Check your edition's current limits in Salesforce Help before you plan around these numbers. Limits can change between releases.
When each type fits
Use Partial Copy for QA, user acceptance testing, and integration testing that needs realistic records but not every record. The template keeps the sandbox small and the refresh interval short, so you can reset it often.
Use Full when the test depends on production volume or on the exact shape of production data. Typical cases are performance testing, load testing, and staging a release. Data volume also affects behavior such as query selectivity and batch run time. A sample cannot reproduce that behavior.
Common errors
- Choosing Full for everyday testing. The 29-day interval means a broken Full sandbox stays broken for a long time. Pick Partial Copy when a sample is enough.
- Assuming a Partial Copy sandbox has related records. The sample is chosen per object, up to 10,000 records each. Child records may not match their parents unless the template includes the relationships you need.
- Forgetting the interval. After a refresh, you cannot refresh that sandbox again until the interval passes. Plan the refresh before a testing cycle starts, not during one.
- Leaving sensitive data in place. Both types copy real production data. Treat them with production-level care, and mask or restrict data where your policy requires it.
Exercise
A team needs to run load tests against a data set that matches production volume. Which sandbox type should they request, and what is the shortest wait before they can refresh it again?
Show answer
A Full sandbox, because it can copy all production data and has the same storage as production. It can be refreshed once every 29 days. A Partial Copy sandbox caps each selected object at 10,000 records, so it cannot reproduce production volume.
Exercise
Why is a sandbox template required for a Partial Copy sandbox but optional for a Full sandbox?
Show answer
A Partial Copy sandbox copies only a sample of data, so the template tells Salesforce which objects and records to include. A Full sandbox copies all data by default, so a template is only needed if you want a subset.