← CockroachDBCONTENT HISTORY
WHAT CHANGED
Update to CockroachDB
Snapshot Oct 28, 2026 · 18:07 UTC · version 0.1.3
Collection source: downloaded plugin package.
First saved snapshot
No earlier snapshot is available to establish a change.
Save CockroachDB and check future changes in Following.
Up to 10 plugins free · no card required.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Guide for using molt fetch to migrate data from PostgreSQL, MySQL, Oracle, or MSSQL to CockroachDB. Use when running molt fetch commands, configuring storage backends, handling fetch failures/resumption, or chaining fetch with verify.",
"included_files": [
{
"relative_path": "references/flags.md",
"size_in_bytes": 4682
}
],
"name": "molt-fetch",
"skill_md_contents": "---\nname: molt-fetch\ndescription: Guide for using molt fetch to migrate data from PostgreSQL, MySQL, Oracle, or MSSQL to CockroachDB. Use when running molt fetch commands, configuring storage backends, handling fetch failures/resumption, or chaining fetch with verify.\ncompatibility: Requires molt binary. Source DB must be accessible. For Oracle, CGO and Oracle Instant Client required.\n---\n\n# molt fetch\n\nBulk data migration from source databases (PostgreSQL, MySQL, Oracle, MSSQL) to CockroachDB.\n\n## Basic Structure\n\n```bash\nmolt fetch \\\n --source \"<source-conn>\" \\\n --target \"<crdb-conn>\" \\\n --bucket-path \"s3://bucket/prefix\" # or --direct-copy or --local-path\n [options]\n```\n\n## Storage Backends (pick one)\n\n| Option | When to use |\n|--------|-------------|\n| `--bucket-path \"s3://...\"` | AWS S3 (also `gs://` for GCS, `azure://` for Azure) |\n| `--direct-copy` | No intermediate storage; fastest for accessible networks |\n| `--local-path \"/tmp/molt\"` + `--local-path-listen-addr \"0.0.0.0:9005\"` | CRDB must reach the listen addr |\n\nCloud auth: pass `--use-implicit-auth` for IAM/ADC/managed identity, or set `AWS_ACCESS_KEY_ID`/`GOOGLE_APPLICATION_CREDENTIALS` env vars.\n\n## Table Handling (`--table-handling`)\n\n| Value | Behavior |\n|-------|----------|\n| `none` (default) | Append to existing tables |\n| `drop-on-target-and-recreate` | Drop + recreate from source schema; enables auto schema creation. Destroys existing target tables and their data, so use only on fresh or empty targets |\n| `truncate-if-exists` | Truncate before loading; errors if table missing |\n\n## Import Mode\n\n**IMPORT INTO** (default): Table goes OFFLINE during load. Highest throughput.\n\n**COPY FROM** (`--use-copy`): Table stays ONLINE. Use with `--direct-copy`. Cannot use compression.\n\n```bash\n# Zero-downtime load\nmolt fetch --source \"...\" --target \"...\" --direct-copy --use-copy\n```\n\n## Key Flags\n\n```bash\n# Filtering\n--table-filter \"customers|orders\" # POSIX regex for tables to include\n--table-exclusion-filter \"temp_.*\" # exclude pattern\n--schema-filter \"public\" # PostgreSQL only\n\n# Performance\n--table-concurrency 4 # parallel tables (default: 4)\n--export-concurrency 4 # export threads (default: 4)\n--row-batch-size 100000 # rows per SELECT (default: 100k)\n\n# Schema\n--type-map-file \"types.json\" # custom type mappings\n--transformations-file \"transforms.json\" # column exclusions, table aliases\n\n# Logging\n--log-file \"migration.log\" # or \"stdout\"\n--logging debug # info (default), debug, trace\n--metrics-listen-addr \"0.0.0.0:3030\" # Prometheus scrape endpoint\n```\n\n## Source-Specific Prerequisites\n\n**MySQL**: GTID mode required (`gtid_mode=ON`, `enforce_gtid_consistency=ON`). `ONLY_FULL_GROUP_BY` must be off. Or use `--ignore-replication-check`.\n\n**Oracle**: Binary must be built with `CGO_ENABLED=1 -tags=\"cgo source_all\"`. Oracle Instant Client in `LD_LIBRARY_PATH`.\n\n**PostgreSQL**: Replication privileges needed, or `--ignore-replication-check`.\n\n## Common Workflows\n\n### 1. Full migration with schema creation\n\n`drop-on-target-and-recreate` drops any existing target tables first; run this only against a fresh or empty target.\n\n```bash\nmolt fetch \\\n --source \"postgresql://<user>:<password>@pg:5432/db\" \\\n --target \"postgresql://root@crdb:26257/db\" \\\n --bucket-path \"s3://mybucket/migration\" \\\n --table-handling drop-on-target-and-recreate \\\n --table-filter \"customers|orders|payments\" \\\n --log-file migration.log\n```\n\n### 2. Resume after failure\n```bash\n# List available continuation tokens\nmolt fetch tokens --fetch-id \"abc-123\" --target \"postgresql://root@crdb:26257/db\"\n\n# Resume all failed tables\nmolt fetch \\\n --source \"...\" --target \"...\" \\\n --bucket-path \"s3://mybucket/migration\" \\\n --fetch-id \"abc-123\" \\\n --non-interactive\n```\n\n## Error Recovery\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| \"GTID-based replication not enabled\" | MySQL missing GTID | Enable `gtid_mode=ON` or add `--ignore-replication-check` |\n| \"Column mismatch\" | Schema diverged | Fix target schema manually or use `--type-map-file` |\n| Silent IMPORT INTO | CockroachDB import running | `SHOW JOBS` on CRDB to check progress |\n| \"timestamp in the future\" | Docker/Mac clock drift | Sync clocks between hosts |\n\n## Gotchas\n\n- COPY mode: cannot use `--compression gzip`; must use `--compression none` (or omit, default is none with copy)\n- Table is **offline** during IMPORT INTO — use `--use-copy` for zero downtime\n- Schema changes between runs require starting from scratch\n- `--fetch-id` continuation tokens live in the target's exceptions table\n- For MySQL, `--ignore-replication-check` skips GTID validation but replication-dependent features won't work\n- After fetch, run `molt verify` to confirm data integrity\n\nSee [flags reference](references/flags.md) for the full flag list.\n"
}SHA-256 of public snapshot: 9493e8807acd2654f22a44cadc0dd0e302523bfb5567bd8c75520e1fe153f643