DATABASE_URL and CLICKHOUSE_URL; target commands read TARGET_DATABASE_URL and TARGET_CLICKHOUSE_URL. Explicit URL options remain available when no secret is embedded. Do not paste credentials into shared shell history, logs, or issue reports. JSON results and categorized errors never echo a connection URL.
Workflow
- Export PostgreSQL. This creates a checksummed registry archive and a migration manifest.
- Validate and import PostgreSQL on the target.
- Export ClickHouse using the PostgreSQL migration manifest.
- Validate and import ClickHouse on the target.
PostgreSQL export
--file/-f selects the archive destination. --output/-o always selects table or json. Existing destinations fail with a conflict instead of being overwritten.
The archive and sidecar manifest are written atomically with owner-only permissions. A partial archive is not published after failure.
Example JSON fields:
PostgreSQL validation and import
ClickHouse export
ClickHouse export requires the PostgreSQL sidecar manifest and a new destination directory:telemetry_manifest.json records every chunk’s range, shard, checksum, size, row count, and migration ID.
ClickHouse validation and import
- Parquet checksums
- Manifest row counts against target ClickHouse when supplied
- Agent and user references against target PostgreSQL when supplied
.import_state.json in the input directory, so a retry skips only verified completed chunks rather than an entire table or month. Deterministic insert tokens protect ambiguous retries on current non-replicated MergeTree schemas. Imported project-keyed rows normalize to the deployment project default, and session summaries are rebuilt after event import so summaries reflect complete sessions rather than individual insert blocks.
Human and JSON behavior
All six leaves accept--output table|json. Human mode renders progress and summaries. JSON mode is finite, prompt-free, suppresses progress and warnings from stdout, and returns one result document. Failures leave stdout empty and emit one categorized error to stderr.
Cleartext ClickHouse transport with credentials produces a human warning. JSON mode does not print a banner; operators should use clickhouses:// for TLS.

