CLI Reference¶
The following is generated from the crdb-dump command-line interface.
crdb-dump¶
crdb-dump: Export and Import CockroachDB schemas and data.
Usage:
Options:
--verbose Enable debug logging
--version Show the version and exit.
--help Show this message and exit.
crdb-dump export¶
Usage:
Options:
--db TEXT Database name [required]
--tables TEXT Comma-separated list of db.table names
--exclude-tables TEXT Comma-separated list of db.table names to exclude
from schema/data export
--per-table Output individual files per object
--region TEXT Only export tables matching this region
--format [sql|json|yaml] Schema output format
--include-permissions Export CREATE ROLE, GRANT, and membership
statements
--archive Compress output directory
--diff TEXT Compare output with existing SQL file
--parallel Enable parallel exports
--data Export table data
--data-format [sql|csv] Data export format
--data-split Split each table into a separate file
--data-limit INTEGER Limit rows per table
--data-compress Compress CSV output
--data-order TEXT Order data by column(s)
--data-order-desc Order data descending
--data-parallel Parallel data export
--data-order-strict Fail if ordered column(s) not found
--chunk-size INTEGER Rows per CSV chunk
--as-of-system-time TEXT Read data at a consistent snapshot. Use 'auto' (or
the bare flag) to pin cluster_logical_timestamp(),
'follower' to pin follower_read_timestamp() for
follower reads, or pass a value like '-30s', a
timestamp, or a decimal.
--verify Verify exported chunk checksums
--verify-strict Stop if any checksum fails
--out-dir TEXT Output directory for all exports
--print-connection Print resolved database connection URL and exit
--retry-count INTEGER Number of retry attempts
--retry-delay INTEGER Initial retry delay in milliseconds
--use-s3 Enable S3 upload/download for data chunks
--s3-bucket TEXT S3 bucket to upload to or read from
--s3-prefix TEXT S3 key prefix path
--s3-endpoint TEXT Custom S3 endpoint (e.g. for Cohesity, MinIO)
--s3-access-key TEXT S3 access key
--s3-secret-key TEXT S3 secret key
--help Show this message and exit.
crdb-dump load¶
Usage:
Options:
--db TEXT Target database name [required]
--schema PATH Schema SQL file to load
--data-dir PATH Directory containing manifest and data files
--region TEXT Only import tables from this region (matches manifest
region)
--resume-log TEXT Path to JSON file tracking loaded chunks
--resume-log-dir PATH Directory to store per-table resume logs (overrides
--resume-log)
--resume-strict Abort on first failed chunk when using resume
--dry-run Show what would be imported without executing
--include-tables TEXT Comma-separated list of fully-qualified tables to
include (e.g., movr.users)
--exclude-tables TEXT Comma-separated list of fully-qualified tables to
exclude
--print-connection Print resolved database connection URL and exit
--parallel-load Use parallel loading of chunks
--validate-csv Validate row/column match before COPY
--retry-count INTEGER Number of retry attempts
--retry-delay INTEGER Initial retry delay in milliseconds
--use-s3 Enable S3 upload/download for data chunks
--s3-bucket TEXT S3 bucket to upload to or read from
--s3-prefix TEXT S3 key prefix path
--s3-endpoint TEXT Custom S3 endpoint (e.g. for Cohesity, MinIO)
--s3-access-key TEXT S3 access key
--s3-secret-key TEXT S3 secret key
--help Show this message and exit.
crdb-dump version¶
Show detailed version info.
Usage:
Options: