Skip to content

ephemeral

Run sanitization in a disposable Docker container without a pre-configured destination database.

clonit ephemeral <target> [snapshot_index] [flags]
Argument Description Required
target Name of the target to sanitize Yes
snapshot_index Index of the snapshot to use No (defaults to latest)
Flag Type Default Description
--build bool false Force building a new original snapshot
--fast bool false Skip debug/analysis steps
--image string Override Docker image (e.g., postgres:16)
--query-id string Use specific sanitize query ID

Runs the sanitization pipeline inside an ephemeral Docker container, eliminating the need for a pre-configured sanitize destination database (sanitize_dst_url). Docker must be running.

The command performs the following steps:

  1. Resolve or build a source snapshot
  2. Start an ephemeral PostgreSQL container
  3. Load the snapshot into the container
  4. Execute the sanitization query
  5. Dump the sanitized database to a new snapshot
  6. Stop and remove the container

The --build flag forces a fresh original snapshot before the pipeline runs. The --fast flag skips the debug/analysis steps that otherwise run on failure. Use --image to override the PostgreSQL image used for the ephemeral container, and --query-id to select a specific sanitize query instead of the active one.

The web UI at /targets/{id} shows real-time step progress and maintains a history of ephemeral runs with retry support.

Run ephemeral sanitization on the latest snapshot using the active query:

clonit ephemeral mydb

Use a specific snapshot by index:

clonit ephemeral mydb 0

Skip the debug analysis steps:

clonit ephemeral mydb --fast

Force building a new snapshot first:

clonit ephemeral mydb --build

Override the Docker image:

clonit ephemeral mydb --image postgres:15
  • sanitize – Run the sanitization pipeline against a configured destination
  • build – Create a snapshot of the source database
  • snapshots – List snapshots for a target
  • load – Load a snapshot into the destination database