|
| 1 | +# molt fetch: Full Flag Reference |
| 2 | + |
| 3 | +## Required |
| 4 | + |
| 5 | +| Flag | Description | |
| 6 | +|------|-------------| |
| 7 | +| `--source` | Source DB connection string | |
| 8 | +| `--target` | Target CockroachDB connection string | |
| 9 | +| One of: `--bucket-path`, `--direct-copy`, `--local-path` | Intermediate storage | |
| 10 | + |
| 11 | +## Storage |
| 12 | + |
| 13 | +| Flag | Default | Description | |
| 14 | +|------|---------|-------------| |
| 15 | +| `--bucket-path` | - | Cloud storage URI (`s3://`, `gs://`, `azure://`) | |
| 16 | +| `--direct-copy` | false | Skip intermediate storage | |
| 17 | +| `--local-path` | - | Local filesystem path | |
| 18 | +| `--local-path-listen-addr` | - | HTTP server addr for local path | |
| 19 | +| `--local-path-crdb-access-addr` | - | CRDB-visible addr for local HTTP server | |
| 20 | +| `--use-implicit-auth` | false | Use IAM/ADC/managed identity | |
| 21 | +| `--assume-role` | - | AWS role ARN to assume | |
| 22 | +| `--import-region` | - | AWS region for IMPORT statement | |
| 23 | + |
| 24 | +## Data Movement |
| 25 | + |
| 26 | +| Flag | Default | Description | |
| 27 | +|------|---------|-------------| |
| 28 | +| `--mode` | `data-load` | `data-load`, `export-only`, `import-only` | |
| 29 | +| `--table-handling` | `none` | `none`, `drop-on-target-and-recreate`, `truncate-if-exists` | |
| 30 | +| `--use-copy` | false | Use COPY FROM instead of IMPORT INTO | |
| 31 | +| `--compression` | `gzip` | `gzip` or `none` (must be `none` with `--use-copy`) | |
| 32 | +| `--dry-run` | false | Test one row without full migration | |
| 33 | +| `--compile-only` | false | Validate flags without connecting | |
| 34 | + |
| 35 | +## Filtering |
| 36 | + |
| 37 | +| Flag | Default | Description | |
| 38 | +|------|---------|-------------| |
| 39 | +| `--table-filter` | - | POSIX regex: include matching tables | |
| 40 | +| `--table-exclusion-filter` | - | POSIX regex: exclude matching tables | |
| 41 | +| `--schema-filter` | - | Schema filter (PostgreSQL only) | |
| 42 | +| `--case-sensitive` | false | Case-sensitive name matching | |
| 43 | +| `--filter-path` | - | JSON file with per-table WHERE clauses | |
| 44 | + |
| 45 | +## Performance |
| 46 | + |
| 47 | +| Flag | Default | Description | |
| 48 | +|------|---------|-------------| |
| 49 | +| `--table-concurrency` | 4 | Tables migrated in parallel | |
| 50 | +| `--export-concurrency` | 4 | Export threads per table | |
| 51 | +| `--row-batch-size` | 100000 | Rows per SELECT during export | |
| 52 | +| `--flush-size` | varies | Bytes before flushing to storage | |
| 53 | +| `--flush-rows` | 0 | Rows before flushing (0 = disabled) | |
| 54 | +| `--import-batch-size` | 1000 | Files per IMPORT INTO batch | |
| 55 | + |
| 56 | +## Type & Schema |
| 57 | + |
| 58 | +| Flag | Default | Description | |
| 59 | +|------|---------|-------------| |
| 60 | +| `--type-map-file` | - | JSON file with custom type mappings | |
| 61 | +| `--transformations-file` | - | JSON file with column exclusions/aliases | |
| 62 | +| `--skip-pk-check` | false | Allow tables without primary keys | |
| 63 | +| `--use-stats-based-sharding` | false | Stats-based sharding (PG 11+; run ANALYZE first) | |
| 64 | + |
| 65 | +## Resumption |
| 66 | + |
| 67 | +| Flag | Default | Description | |
| 68 | +|------|---------|-------------| |
| 69 | +| `--fetch-id` | - | Previous run ID to resume | |
| 70 | +| `--continuation-token` | - | Token for specific table resumption | |
| 71 | +| `--continuation-file-name` | - | File to resume from within a table | |
| 72 | +| `--non-interactive` | false | Skip confirmation prompts | |
| 73 | + |
| 74 | +## Logging & Monitoring |
| 75 | + |
| 76 | +| Flag | Default | Description | |
| 77 | +|------|---------|-------------| |
| 78 | +| `--log-file` | `fetch-{datetime}.log` | Log file path or `stdout` | |
| 79 | +| `--logging` | `info` | `info`, `debug`, `trace` | |
| 80 | +| `--use-console-writer` | false | Cleaner output (slightly more latency) | |
| 81 | +| `--metrics-listen-addr` | - | `host:port` for Prometheus metrics | |
| 82 | +| `--metrics-scrape-interval` | `5s` | Metrics collection interval | |
| 83 | +| `--pprof-listen-addr` | - | `host:port` for pprof profiling | |
| 84 | + |
| 85 | +## Connection & Timeouts |
| 86 | + |
| 87 | +| Flag | Default | Description | |
| 88 | +|------|---------|-------------| |
| 89 | +| `--allow-tls-mode-disable` | false | Allow insecure TLS connections | |
| 90 | +| `--export-statement-timeout` | `1h` | Source query timeout | |
| 91 | +| `--export-retry-max-attempts` | 3 | Retry attempts for export queries | |
| 92 | +| `--export-retry-max-duration` | `5m` | Max duration for export retries | |
| 93 | +| `--crdb-pts-refresh-interval` | `10m` | Protected timestamp refresh interval | |
| 94 | +| `--crdb-pts-duration` | `24h` | Protected timestamp lifetime | |
| 95 | + |
| 96 | +## PostgreSQL-Specific |
| 97 | + |
| 98 | +| Flag | Default | Description | |
| 99 | +|------|---------|-------------| |
| 100 | +| `--pglogical-replication-slot-name` | `molt_slot` | Replication slot name | |
| 101 | +| `--pglogical-replication-slot-plugin` | `pgoutput` | Plugin for slot | |
| 102 | +| `--pglogical-publication-name` | `molt_fetch` | Publication name | |
| 103 | +| `--pglogical-publication-and-slot-drop-and-recreate` | false | Drop/recreate if exists | |
| 104 | +| `--ignore-replication-check` | false | Skip replication prereq checks | |
| 105 | + |
| 106 | +## Oracle-Specific |
| 107 | + |
| 108 | +| Flag | Default | Description | |
| 109 | +|------|---------|-------------| |
| 110 | +| `--oracle-application-users` | - | Comma-separated users to filter transactions | |
| 111 | +| `--source-cdb` | - | CDB connection for multi-tenant setups | |
0 commit comments