Skip to content

Documentation / Projects

Cloning and anonymization

Create a working copy of your database in which personal data is replaced, and have the agent work on that copy.

What cloning is for

Cloning creates, from a source database, a copy in which personal data is replaced. The project then works on that copy. It is the strongest protection when you use a third-party AI provider: even if the agent reads rows, they no longer contain real data.

Cloning requires the CLONE privilege.

Start a cloning run

At the last step of creating a project, choose Clone instead of Save.

1. Choose the target database

Say where to create the copy: the engine and connection settings of the target database. OpenDB suggests a separate database, named after the source (shop_clone, or shop-clone.sqlite for SQLite), with create the database checked: the source is never suggested as the target.

2. Set up the anonymization

By default, the cloning copies all the data as it is, without reading anything from the source at this step.

The Automatic anonymization button analyses the source database and suggests a strategy for each column. Columns that look like personal data are spotted by their name, in English, French and German: first_name, email, date_of_birth, phone, prenom, vorname... The analysis can take a moment on a large database.

You then adjust the strategy column by column. Keep all goes back to a copy without anonymization, and the reset button restores the suggested strategies.

3. Choose the tables

Decide which tables are copied and which remain accessible to the agent.

4. Run

OpenDB copies the structure and then the data, applying the transformations. During the copy, a window shows the current step, the table being copied with its row count, and the elapsed time.

Cancel the cloning stops it after the current batch of rows. The target database keeps the tables already copied, and the project keeps its connection. The cloning also stops cleanly if you close the page.

At the end, the project's connection becomes the one of the cloned database. The window shows the outcome: success, a warning if rows were skipped, or failure, with access to the log.

Transformation strategies

Strategy Effect Applies to
keep Keeps the value Any type
fake Replaces it with a plausible fake value Text, number, boolean, date
hash Replaces it with a hash Text
mask Masks part of the value, for example ****1234 Text
null Replaces it with NULL Columns that accept NULL
static Replaces it with a fixed value Columns without a uniqueness constraint
template Builds the value from a template Text
remapping Renumbers integer primary keys Primary keys

For each column, OpenDB only offers the strategies compatible with its type, nullability and uniqueness.

remapping changes identifiers and carries the change over to foreign keys: relationships between tables stay consistent.

Recognized data categories

The catalogue covers thirteen families: government identifiers, identity, contact, location, finance, health, biometrics, professional life, digital identity, authentication, relationships, social media and vehicles.

Note Detection relies on column names. A sensitive column with an unusual name is not spotted: review the suggestion before you start the cloning run.

Limits

  • Very large tables take a long time to clone.
  • remapping is only offered for tables that fit in the cloning memory budget.
  • A table whose name contains a dot, or whose structure cannot be read, is skipped with an explanation. A table is never copied unless its columns have been read.

Log

Each cloning run leaves a log in ~/.opendb/logs/. The View logs button of the result window shows it directly.