Uploading data
cargoship upload is the canonical way to archive a directory to S3. This guide covers the options you'll actually reach for; the exhaustive flag list lives in the command reference.
cargoship upload SOURCE_DIR s3://BUCKET/PREFIX/Basic upload
cargoship upload ./my-data s3://my-bucket/archives/CargoShip scans, chunks, shards, compresses, and uploads in parallel, then prints an upload ID. See How it works for the pipeline, or Your first upload for a gentle walkthrough.
Choosing a storage class
cargoship upload ./my-data s3://my-bucket/archives/ \
--storage-class INTELLIGENT_TIERINGCommon choices: STANDARD (default), INTELLIGENT_TIERING (S3 auto-tiers cold data), GLACIER / GLACIER_IR, DEEP_ARCHIVE (cheapest storage, slowest and priciest retrieval). To assign classes per chunk by file age, use tier-aware storage:
cargoship upload ./my-data s3://my-bucket/archives/ \
--auto-tier --tier-strategy tier-awareCost implication
--tier-strategy tier-aware prompts for confirmation because it changes retrieval characteristics. Add --yes to accept in automation, and --tier-max GLACIER to cap how cold anything goes. See Tier-aware storage.
Sharding & compression
CargoShip automatically selects between 4 and 32 shards when --shard-count is 0 (the default); if automatic selection fails, it falls back to 8. Override it, or pick a distribution strategy:
cargoship upload ./my-data s3://my-bucket/archives/ \
--shard-count 16 --shard-strategy size \
--compression-level 9--shard-strategy—round-robin(default),hash,size,type,directory. See Sharding.--compression-level— Zstandard 1–22 (higher = smaller + more CPU). This overrides content-aware selection and pins every chunk to one level, including chunks CargoShip would otherwise leave nearly uncompressed. Omit it to keep per-chunk selection. See Compression.
Deduplication
Skip storing identical files more than once:
cargoship upload ./my-data s3://my-bucket/archives/ --enable-dedupWorthwhile for datasets with redundant files; adds a hashing pass.
Encryption
cargoship upload ./my-data s3://my-bucket/archives/ \
--kms-key-id alias/my-key --encrypt-manifestData chunks are written with SSE-KMS; --encrypt-manifest additionally envelope-encrypts the manifest. See Encryption.
Integrity checksums
Every upload records a SHA-256 checksum at two levels: per stored chunk, and per file. These are what let verify --deep confirm the stored bytes still match, and what restore checks as it writes files back. Per-file checksums are on by default.
# Faster uploads, but verify --deep can no longer confirm per-file integrity
cargoship upload ./my-data s3://my-bucket/archives/ --no-file-checksumsOnly use --no-file-checksums when upload speed matters more than per-file verifiability; chunk-level checksums are still recorded either way. See the Integrity model for what the checksums guarantee.
Incremental sync
Upload only what's new or changed since a previous run:
cargoship upload ./my-data s3://my-bucket/archives/ \
--incremental --prev-manifest ./manifest.json.gzFor a dedicated sync workflow (including delete tracking), see Incremental sync.
Cost tracking
Tag an upload to a project so its spend rolls up in reports and budgets:
cargoship upload ./my-data s3://my-bucket/archives/ --project genomics-2026Then see Budgets & quotas and Cost management.
Best practices
TIP
- Estimate first for large datasets:
cargoship estimate ./my-data --show-comparison. - Set a region default (
AWS_REGION) or pass--regionto match your bucket. - Leave shard count on auto unless benchmarking — it's tuned to your workload.
- Turn on
--enable-deduponly when you expect duplicate files; it costs a hash pass. - Keep per-file checksums on (the default) so
verify --deepand restore can confirm per-file integrity; only add--no-file-checksumswhen speed wins. - Tag
--projectfrom day one so cost reporting is meaningful later. - Use
--quietin scripts and cron; keep the progress UI for interactive runs.
See also
- upload vs. create upload — which command to use.
- Resuming interrupted uploads.
- Reference:
upload.
