Skip to content
scttfrdmnPublic

About

Enterprise data archiving for AWS - built for speed and intelligence

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1,559 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CargoShip Logo

CargoShip

High-performance S3 data archiving

Go Version Go Reference License GitHub Release Go Report Card codecov Security Build Status GitHub Issues GitHub Pull Requests

CargoShip's goal is to be the fastest and most efficient — in both S3 operations and dollars — way to move data into and out of Amazon S3. It packs large directory trees into compressed, verifiable, portable archives streamed directly to S3, for research and technical datasets with many files, where ordinary copy tools create excessive S3 requests, give weak recovery guarantees, or make storage costs hard to predict.

That goal is an aim, not a blanket claim. Where it has been measured against s5cmd and rclone is recorded in the capability matrix and the benchmarks. On a many-small-file corpus (5,000 files, 9.9 MB, one run) CargoShip was the fastest tool tested and made about 700× fewer S3 requests than s5cmd. On a few large files, s5cmd is faster. If your data is a handful of big files, CargoShip's value is the manifest, verification and cost tracking, not speed.

Why not plain aws s3 cp or rclone?

Those tools copy files one-to-one, which turns a million-file dataset into a million S3 requests with no packaging, manifest, or cost model. CargoShip packs files into compressed archives, spreads the upload across S3 prefixes for concurrency, records a manifest you can verify against, and can estimate cost before you commit. See the feature comparison for a side-by-side breakdown.

Installation

# Homebrew (macOS/Linux)
brew tap scttfrdmn/tap && brew trust scttfrdmn/tap
brew install scttfrdmn/tap/cargoship

# Scoop (Windows)
scoop bucket add scttfrdmn https://github.com/scttfrdmn/scoop-bucket
scoop install cargoship

# Go install
go install github.com/scttfrdmn/cargoship/cmd/cargoship@latest

Pre-built binaries for macOS, Linux, and Windows are on the releases page. CargoShip reads AWS credentials from the standard SDK chain (environment, shared config, or IAM role); see AWS setup for the minimal IAM policy and the installation guide for more options.

Example

A complete round trip: estimate, upload, inspect, verify, and restore a single file.

# 1. Estimate storage cost before uploading (prices the uncompressed size)
cargoship estimate /data/project-2024 --storage-class DEEP_ARCHIVE

# 2. Upload a directory to S3
cargoship upload /data/project-2024 s3://my-bucket/project-2024 \
  --storage-class INTELLIGENT_TIERING

# ✅ Upload complete!
# ...
# 💡 Next steps:
#    • Verify upload:     cargoship verify s3://my-bucket/project-2024/uploads/20260721-a1b2c3d4

# Steps 3–5 address the upload by the URL that upload prints:
#   s3://<bucket>/<prefix>/uploads/<upload-id>

# 3. Inspect what was uploaded, straight from the manifest (no download)
cargoship info s3://my-bucket/project-2024/uploads/20260721-a1b2c3d4

# 4. Prove the data is intact: download it and re-hash it against the manifest
cargoship verify --deep s3://my-bucket/project-2024/uploads/20260721-a1b2c3d4

# 5. Restore a single file (OUTPUT_DIR is positional) without pulling the whole archive
cargoship restore s3://my-bucket/project-2024/uploads/20260721-a1b2c3d4 ./restored/ \
  --file results/summary.csv

Plain cargoship verify, without --deep, checks only that the manifest is consistent; it reads none of the stored data. Upload IDs have the form YYYYMMDD- plus 8 hex digits. The region comes from --region, then AWS_REGION or your profile, then the bucket itself, so you rarely need to pass it.

See the quick start for a guided walkthrough and the command reference for every command and flag.

Sharding is chosen automatically from the workload, but you can override it:

cargoship upload /data/project-2024 s3://my-bucket/project-2024 --shard-count 16

Common commands

Command Purpose
cargoship estimate Model storage cost before uploading
cargoship upload Pack, compress, and stream a directory to S3
cargoship info Inspect an archive from its manifest, no download
cargoship verify Check the manifest; --deep downloads and re-hashes the data
cargoship restore Restore all (--all) or selected files from an upload
cargoship budget Set and monitor per-project cost and volume budgets
cargoship lifecycle Manage S3 lifecycle policies for stored archives

Key differentiators

  • Streaming pipeline — files stream from disk through compression to S3. No staging copy of your data is written to local disk (CargoShip keeps only small state files, such as resume state and the cost ledger, under ~/.cargoship/), and memory stays bounded to about chunk_size × workers. A small upload (up to 1,000 files, under 500 MB, averaging under 5 MB a file) skips packing and stores each file as its own object instead.
  • Multi-prefix sharding — chunks are distributed across S3 prefixes, each with its own upload workers, so the shard count sets upload concurrency. CargoShip automatically selects between 4 and 32 shards when --shard-count is 0 (the default); if automatic selection fails, it falls back to 8. See sharding.
  • Content-aware compression — zstd compresses text and code well and skips already-compressed data. See compression.
  • Cost and budget controls — estimate spend before uploading and enforce per-project cost and volume budgets on upload, sync and fleet agents. See budgets.
  • Open, portable format — archives are tar.zst (or plain .tar) objects with a gzipped JSON manifest. See the format spec.

CargoShip suits research data, analytics output, long-term backup and compliance retention, and cold-tier data-lake migration — anywhere a large file count and predictable cost matter more than one-to-one file copies.

Safety and portability

CargoShip only reads your source files. The one exception is upload --generate-dvc-files, which writes .dvc files into the source directory unless you pass --dvc-output-dir.

Archives use the open tar.zst format alongside a JSON manifest, so your data stays recoverable with standard tools even without CargoShip installed: gunzip the manifest, read it with jq, then unpack the chunks with tar and zstd. A small upload's files are stored as plain objects, a file split across chunks has to be concatenated, and an encrypted manifest needs its KMS key. By default the manifest records a SHA-256 for every chunk and file, so cargoship verify --deep can prove the stored bytes are intact and cargoship restore checks each file as it writes it. The format spec documents the layout in full.

Documentation

Full documentation lives at cargoship.app.

Getting started

Guides & tutorials

Cost & format

Project

Project status and license

CargoShip is at v0.46.0, a community-maintained v0.x beta. The archive format is stable, and archives stay readable when you upgrade; CLI behaviour can still change between minor releases. Compatibility caveats are tracked on the maturity page. To report a security issue, see SECURITY.md.

Licensed under the Apache License 2.0; see LICENSE. Originally inspired by Duke University's SuitcaseCTL research project, now an independent project.

Support

About

Enterprise data archiving for AWS - built for speed and intelligence

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages