← All guides

Scrubbing production data in sandbox copies: privacy before play

Data, integrations & replication · 4 min read · By Dex Carter · Published 2026-10-28 · Last updated 2026-10-28

A sandbox copied from production is the most realistic test environment money can't buy, real item structures, real price logic, real transaction volumes. It is also a copy of your customers: names, emails, phone numbers, member accounts, purchase histories, sitting in an environment that typically has more admins, weaker monitoring, and a sign-in list that includes people who should never see live customer data. Scrubbing is what makes the copy safe to use.

What gets scrubbed, in priority order

What to keep, deliberately

Scrubbing is not flattening. Keep the data shapes that make tests bite: item and price structures, store and posting setup, offer logic, anonymised transaction volumes and mixes, the pathological records (the item with the odd unit conversion, the member with the giant points balance, with identity masked). A sandbox scrubbed to sterility passes tests the real system would fail.

Make it a procedure, not a person

  1. A written copy-runbook: copy, then the scrub script/steps, then verification checks (sample searches for real-looking emails and names; counts agreed), then access opened. Nobody explores the copy before the verification line is signed.
  2. Refresh rhythm: copies age into fiction; re-copy and re-scrub on the testing calendar, destroying old copies rather than accumulating a museum of production snapshots.
  3. Access list as short as the production one, for the same reason: the copy's safety comes from controls, not from the word "sandbox."

The sandbox that phones home

A copied environment inherits more than data: scheduled jobs, integration endpoints, and notification settings pointed at the real world. The copy checklist must therefore include the integrations page, not just the data page, disable outbound interfaces or repoint them to test endpoints, silence customer-facing notifications, and strip payment configurations entirely. More than one business has learned this via a test system emailing real customers or posting to a live ledger through a forgotten job. Order the work safely: network-isolate or integration-strip the copy before the scrubbing workshop begins, because the window between "copy exists" and "copy is safe" is exactly when its inherited jobs fire on their inherited schedules. The scrubbing standard protects the data; the isolation standard protects everybody else.

The supplier and staff side of the copy

Customer data gets the attention; the copy also carries your own people and partners. Employee records, user accounts with their permission structures, vendor banking details, and internal notes fields (the free-text comments where staff write the darndest things about customers and each other) all travel with a production copy. Scrub staff personal data to the same standard as customers', strip vendor payment details, and purge free-text note fields where they are not the object of the test, notes are where unguarded personal data concentrates, precisely because nobody designed them as a data store. Access reviewers of the sandbox should include whoever owns privacy in the business, with the same sign-off dignity as a production change, because that is what a production copy is, wherever it sits.

The scrubbed copy's residual risks, inventoried

After names, contacts, and balances are transformed, a copied environment still carries quieter identifiers worth listing in the scrub standard: free-text fields (delivery notes contain real names, phone numbers, gate codes with cheerful regularity), document images and attachments (invoices and ID scans inherit the copy untouched by field-level rules), metadata (created-by usernames, timestamps that reveal real trading patterns), and secrets embedded in configuration (API keys for services the copy should never call). The inventory is the standard's second page, and the verification query set should sample free text deliberately, not just the structured fields. Privacy failures in sandboxes almost never come from the fields the scrub was designed around; they come from the paragraph somebody typed into a notes box in 2023. Design the scrub for the data as it is, not as the schema promised it would be.

Success: testers who can break anything in the copy without touching a real customer's privacy, and a privacy review that treats "it's only the sandbox" as a sentence requiring evidence.

, Dex Carter, Tech Writer