Safe copies
A masked copy of your database, on its own server, for developers and AI agents to test against.
A safe copy is a copy of your database with real data shapes but fake personal data, for tests, developers and AI agents. Rowsafe restores it on the database's server from your backups, masks personal data, and only then opens it to the addresses you choose. It deletes itself after a day unless you keep it longer. Nothing leaves your server.
Works for PostgreSQL, MySQL, MariaDB, MongoDB, ClickHouse, Redis, Valkey and SQLite. SQLite, Redis and Valkey copies can also be structure only (no rows, or no values). Engine details: Other engines.
Make one
- Open the database, then Guard → Safe copies.
- Click Create a safe copy. Check Who can connect (your address is filled in) and Where it listens (the server's private address by default).
- Click Create safe copy and save the connection string: the password is shown only once.
It's ready a few minutes later, when the page says Ready.
Connect
psql "postgresql://rowsafe_sc_5k2m9x7q4t1v:PASSWORD@10.0.4.12:55440/app?sslmode=require"Other engines use their own form (mysql://, mongodb://, clickhouse://, rediss://), always with TLS.
- The password is made on your computer (browser, CLI or local
rowsafe mcp) and never reaches Rowsafe, which only passes on its verifier or hash (SCRAM-SHA-256,caching_sha2_password,mysql_native_passwordor SHA-256, per engine). The API refuses a copy without one. Passwords are random (24 characters), so a hash can't be guessed back. Copies from the remote MCP endpoint start with no password: nobody can log in until one is set. - Lost it? Click Set password (or Reset password) on the copy, or run
rowsafe copies password app ID. The old one stops working within seconds. - TLS is required. Each copy has its own self-signed certificate, which the connection strings don't check; save it to check it. To use your own, set
ROWSAFE_COPY_TLS_CERTandROWSAFE_COPY_TLS_KEYon the server. - Only allowed addresses get in. Others are refused before a password is asked.
- You can write to it (migrations, tests, fixtures). The login can change your databases but not the server (PostgreSQL: a role that owns your tables, not a superuser; ClickHouse: a regular user; others: see Other engines).
Reaching the port
Copies listen on ports 55440 to 55539 (ROWSAFE_COPY_PORTS): open that range to your addresses in any firewall in front of the server. If you connect through another address or DNS name, set Host name to connect to (--connect-host).
Masking
Rowsafe suggests a choice for every column from its name and type, and applies it on the server before anyone connects. Review them in Guard → Masking (or rowsafe masking app). New columns get a suggestion automatically.
| Choice | What the value becomes |
|---|---|
A fake, unique email: olivia.3f9a2c1b7e4d5a6b@example.com | |
| First name, Last name, Full name | Common names |
| Street address, City | Made-up addresses and cities |
| Same format | Digits stay digits and letters stay letters: phone numbers, postcodes, IDs, card numbers, tokens keep their shape |
| IP address | A private address (10.x.x.x, or fd00:: for IPv6) |
| Password hash | bcrypt hashes become the hash of rowsafe-copy, so you can sign in to your app as any user with that password; other hashes keep their format but match nothing |
| Lorem ipsum | Placeholder text of about the same length |
| Numbers ±10% | Each number moved by up to 10% |
| Dates ±30 days | Each date moved by up to 30 days |
| JSON strings | Every text value inside the JSON masked; keys, numbers and structure stay |
| Empty (NULL) | No value |
| Keep | The real value |
The same value always masks the same way (with a key that stays on your server), so joins match and unique columns stay unique. Rowsafe then rebuilds table statistics (and PostgreSQL's materialized views), which would otherwise hold real values.
No masking is possible for people allowed to see production data: an admin chooses it and types the database's name, and it's audited. AI agents never get an unmasked copy.
Limits and costs
- Plans: live safe copies at a time, across the organization: Free 1, Pro 5, Business 20. Each is deleted by itself after 24 hours by default (at most 7 days), even if Rowsafe is unreachable.
- It runs on the database server, at low priority, and needs free disk: about 1.3 times the cluster's size plus 1 GB. When the agent restarts (an update, a reboot), the copy restarts too, dropping connections for a few seconds.
- Data is as fresh as your backups: at most about a minute behind production (ClickHouse: its newest backup).
- Only masked columns are masked. Personal data in columns you keep (notes, JSON, logs) stays, and large objects aren't masked. Old versions of masked rows remain in the copy's files, readable only by a superuser, which no copy login is.
- Docker sidecar agents can't make safe copies (the copy would be unreachable from outside the container). Previews work there.
- What reaches Rowsafe: table and column names and types (for the masking review), counts and sizes. Never the data.
SQLite
A SQLite safe copy is a new file on the database's server: no port, no login, no password.
- Masked copy: the file as of the newest point in your bucket (rollback-journal mode: the newest daily backup), masked by your rules with the app's triggers set aside, then
VACUUMed so no original value stays in free pages. If a masked value would break a constraint, the column is emptied. - Structure only: tables, indexes, views and triggers, no rows (
rowsafe copies create app --structure).
The file stays in a private folder (0700) under /var/lib/rowsafe/rewind/sqlite-copies, readable only by the agent's user and root (0600). To get it onto your computer, use the command under Do it yourself on the copy's card (scp, or docker compose cp): Rowsafe can't hand files over end-to-end encrypted yet. It's deleted when it expires or when you click Delete.
FTS5 tables are masked or rebuilt (contentless ones emptied). FTS3/4, R*Tree and your app's own extensions, and the triggers using them, are left out.
Other engines
- The copy: latest backup plus every binary log since, masked with no network port open, then opened over TLS only.
- Logins: production's accounts are locked. The copy's login works only from the allowed addresses (IPv4 ranges or single IPv6 addresses), with every privilege on your databases and none on the server.
- Masking: one
UPDATEper masked column, so tables without a primary key are masked too. Triggers on masked tables run during masking.
Preview a migration
Run a migration on a fresh copy of your database and see what it would do to production before you run it.
Pulse: monitoring and alerts
Health score, one-click fixes, alerts, the weekly email, and alerts by email, Slack, Discord, Microsoft Teams, PagerDuty, Opsgenie, Telegram, ntfy or webhook.