Sub topic 17
Planning refreshes: schedules and best practices
This chapter assumes you know the four sandbox types, their refresh intervals, and the steps to prepare for and run a refresh. It shows how to turn those facts into a repeatable refresh plan.
Build the schedule around the interval limits
A sandbox can be refreshed only after its minimum interval has passed. The interval is counted from when the previous create or refresh started, not from when it finished.
| Sandbox type | Refresh interval |
|---|---|
| Developer | 1 day |
| Developer Pro | 1 day |
| Partial Copy | 5 days |
| Full | 29 days |
The Full sandbox is the constraint, because a missed window costs nearly a month. Work backward from fixed dates such as a release or a performance test. Leave time for post-refresh setup and a smoke test between the refresh and the date you need the data.
Refresh in a sensible order
Teams usually have a chain of environments, for example developer sandboxes feeding QA, then a Full sandbox for staging. If you refresh the Full sandbox, refresh the downstream sandboxes that depend on its configuration afterward. Otherwise those sandboxes drift from the environment they are supposed to match.
Practices that prevent problems
- Keep a refresh calendar. Record each sandbox, its owner, its last refresh date, and its next planned date. Share it with every team that uses the sandboxes.
- Announce the window. Refresh replaces the sandbox, so anyone with unsaved changes loses them. Give people time to deploy or commit.
- Keep source control as the source of truth. If every change lives in version control, a refresh costs minutes of setup instead of lost work.
- Refresh outside working hours. Large Full sandboxes can take hours or days to copy, and the sandbox is unavailable while it copies.
- Automate the cleanup. Use a
SandboxPostCopyclass for repeatable steps such as adjusting integration endpoints or seeding test records. Test it in a sandbox before you depend on it, and keep it idempotent in case you rerun its logic by hand. - Protect sensitive data. A Full or Partial Copy sandbox contains production records. Mask or limit that data, and use a sandbox template to copy only what the team needs.
- Use the smallest type that fits. Developer sandboxes refresh daily, so they suit short-lived work. Reserve Full sandboxes for staging and performance testing.
Common errors
- Refreshing a shared sandbox without telling its users.
- Forgetting that usernames, email deliverability, and integration settings change after a refresh. Check them during your smoke test.
- Refreshing a Full sandbox early to "get fresh data" and then being unable to refresh it again for 29 days when you need it.
- Relying on manual post-refresh steps that only one person remembers.
Exercise
Your team refreshed the Full sandbox on 1 March. A performance test is planned for 20 March, and a defect later means you want fresh production data on 25 March. Can you refresh on 25 March, and what would you do differently?
Show answer
No. The Full sandbox interval is 29 days, so the next refresh is allowed on 30 March at the earliest. Plan the refresh date around the test: refresh no earlier than needed before 20 March (leaving time for post-copy setup), or reuse the current data. For a smaller data fix, use a Partial Copy sandbox, which can refresh every 5 days.