How to copy and mask database test data
Copy and mask database test data for development or QA. Select a focused dataset, then check the sensitive values and relationships your test depends on.
Download the correct productOn this page
01 / RESOURCES
1. Define the case and permission
Identify the failing workflow or test scenario and confirm you are authorized to use the source records. Use same-engine connections and a recoverable target. Choose primary keys, a WHERE condition or row limits to narrow the copy; a smaller set is easier to review.
02 / RESOURCES
Turn selected records into a useful test dataset.
Prepare a selected test dataset between connections of the same database engine.
03 / RESOURCES
2. Include the required relationships
Review the selected tables and parent dependencies so the destination can satisfy its foreign keys. Check how filters affect related records. A copied order without its customer or product may not reproduce the original case, even when the order itself looks correct.
04 / RESOURCES
3. Configure replacements
Apply masking rules to sensitive columns and fixed overrides where the test needs a known value. Use the masking playground to inspect examples. Check free text, JSON and other fields outside the obvious names and email addresses. Consistent replacements can preserve useful links, but they can also connect records across datasets.
05 / RESOURCES
4. Review destination behavior
Select the supported replace, append or upsert behavior intentionally. Confirm permissions and inspect trigger behavior. Before copying, check the application's outbound email, payment and other integrations separately; masking a column does not disable those services.
06 / RESOURCES
5. Rehearse and copy
Read the reported rehearsal mode and sample scope. PostgreSQL and SQL Server use rollback for supported paths; MySQL may use a shadow target or a permission-limited fallback with different behavior. Rehearsal is not proof that every selected row was tested, and identity or sequence counters can advance.
07 / RESOURCES
6. Verify before sharing
Inspect replacement values, row counts, relationships and the application scenario. Eligible checksum checks have exclusions, including transformed values. If the copy fails, review the destination and run outcome before retrying; do not assume it is untouched. Retain the profile only after reviewing its filters and masking coverage.
Questions & answers
Does masking make a dataset anonymous?
No. Remaining fields, predictable hashes and relationships can still identify people or reveal confidential information. Review the result for its intended use.
Can I reuse the same profile next month?
Yes, but first review new columns, changed relationships, filters and destination settings. A saved profile does not automatically cover a changed schema.