Reference
crab import
Import existing cloud buckets as a Crab repository.
Synopsis
crab import [SOURCE] [OPTIONS]Description
crab import takes an existing raw object-storage prefix or local directory and
converts it into a Crab repository — chunking, indexing, creating pointer blobs,
and publishing the metadata structures needed for Crab operations.
For conceptual background, see Importing Existing Buckets.
Arguments
| Argument | Required | Description |
|---|---|---|
SOURCE | Unless --from or --resume | Source URL or local path. Equivalent to --from when provided. |
Options
| Option | Default | Description |
|---|---|---|
--from <URL> | Raw source prefix: s3://, gs://, az://, azure://, or file://. | |
--to <URL> | Target repo URL: crab://... or the same raw scheme as --from. | |
--bucket <BUCKET> | Target Crab bucket, used with --name to build crab://<bucket>/<name>. | |
--name <REPO> | Target Crab repo name/path, used with --bucket. | |
--into <DIR> | leaf of target URL | Local directory for the initialized Git repo. |
--dest-prefix <PATH> | Directory prefix to place imported files under inside the Git repo. | |
--include <GLOB> | Include glob, relative to the source prefix. Repeatable. | |
--exclude <GLOB> | Exclude glob, relative to the source prefix. Repeatable. | |
--versions <MODE> | auto | Version handling: auto, on, or off. |
--window <DURATION> | 1h | Commit window for versioned imports, such as 30m or 24h. |
--at <RFC3339> | Import one snapshot at a specific time. | |
--since <RFC3339> / --until <RFC3339> | Bound versioned history imports. | |
--dry-run | false | Plan the import without mutating the target. |
--resume | false | Resume an interrupted import from <into>/.crab/import-journal.db. |
--yes | false | Skip large-import confirmation. |
--json | false | Emit structured JSON output |
--jsonl | false | Emit streaming JSONL output |
Examples
Import a source prefix
crab import \
--from s3://my-data-bucket/models/ \
--to crab://crab-repos/modelsQuick import with target derivation
crab import s3://my-data-bucket/models/ \
--bucket crab-repos \
--name modelsImport a local directory
crab import ./large-files \
--bucket crab \
--name import-demoPlace files under a repo path
crab import s3://crab/crab/large-files \
--bucket crab \
--name import-demo \
--dest-prefix crab/large-files