ephemeral
Run sanitization in a disposable Docker container without a pre-configured destination database.
clonit ephemeral <target> [snapshot_index] [flags]Arguments
Section titled “Arguments”| 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 |
Description
Section titled “Description”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:
- Resolve or build a source snapshot
- Start an ephemeral PostgreSQL container
- Load the snapshot into the container
- Execute the sanitization query
- Dump the sanitized database to a new snapshot
- 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.
Examples
Section titled “Examples”Run ephemeral sanitization on the latest snapshot using the active query:
clonit ephemeral mydbUse a specific snapshot by index:
clonit ephemeral mydb 0Skip the debug analysis steps:
clonit ephemeral mydb --fastForce building a new snapshot first:
clonit ephemeral mydb --buildOverride the Docker image:
clonit ephemeral mydb --image postgres:15