Quickstart
Pack TX
Infer target from extension; primary + backup redundancy with hashes.
cargo run -p tx-cli -- pack /data backup.tx
cargo run -p tx-cli -- unpack backup.tx ./restore
Pack ISO
Index (`index.idx`) embedded and sorted first on disk.
cargo run -p tx-cli -- pack /data image.iso
Resilience
Primary + redundancy, Merkle + hashes, trustable signatures.
- Tar → zstd → shards (parity by default) or full backup, hashed & signed.
- Tar-compatible: `.tx` starts with `.tx/manifest.json` as the first tar entry, then the payload and shards/backup; `tar xf` still works.
- Optional Ed25519 signatures; trust-store enforcement.
ISO Path
Index-first images with manifest embedded.
- Staging copy with `index.idx` + `iso-manifest.json`.
- mkisofs/genisoimage/xorriso/xorrisofs places index first.
- Mount directly; no sidecars.
Signing
Passphrase and ssh-agent friendly.
export TX_SIGN_KEY=~/.ssh/colossus
export TX_SIGN_PASSPHRASE='hunter42' # if encrypted
export TX_SIGN_USE_AGENT=1 # prefer ssh-agent if loaded
Recovery Modes
Archive vs. file-aware repair.
- Default parity: per-group shards (small files grouped, large files per group) → repair individual groups/files with ~25–30% overhead.
- `--duplicate`: full backup blob (larger, simpler) → whole-archive recovery if primary is bad.
- Plain tar fallback: `tx unpack` also extracts `.tar/.tgz/.tbz2/.tzst` when no TX metadata is present (no verification).
TX vs PAR2
How it differs.
- TX is tar-compatible (`tar xf *.tx` works); PAR2 is a sidecar over files/tars.
- TX stores manifest/hashes/signatures inside the archive; PAR2 does not sign.
- TX parity defaults to per-group shards; PAR2 parity is per-file/chunk across multiple files.
- TX is one artifact (metadata+data); PAR2 requires managing `.par2` sets separately.
TX vs 7zip
Format & trust differences.
- TX is tar-compatible (`tar xf` works); 7zip is its own container.
- TX embeds manifest/hashes/signatures; 7zip has checksums but no signing.
- TX has built-in parity; 7zip needs external parity.
- TX is one artifact (metadata+data); 7zip often paired with sidecar parity.
Layout
Inside `.tx`
- Front: uncompressed tar so `tar xf` works.
- Metadata: `.tx/manifest.json` is the first entry (hashes, signatures, group map); tar users see it upfront.
- Data: `.tx/groups/<gid>/shard.N.bin` (parity mode) or `.tx/backup.tar.zst` (duplicate mode).
Pipeline
TX Pack
walk → tar → zstd → hash/merkle → optional sign → write primary+backup.
ISO Pack
stage → index/manifest → mkisofs sorted so index is first track.
Unpack
verify manifest/signatures → validate hashes → fallback to backup → untar.
Platforms
Linux
Native and musl.
cargo build --release
CC_x86_64_unknown_linux_musl=musl-gcc \
cargo build --release --target x86_64-unknown-linux-musl
Windows
MinGW toolchain required.
CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc \
cargo build --release --target x86_64-pc-windows-gnu
macOS
Build on macOS or with Apple SDK/clang (osxcross).
cargo build --release --target x86_64-apple-darwin
Downloads
Test Battery
Continuous loop with a 1s pause between suites so you can watch output.
./scripts/test.sh
Covers pack/unpack round-trip, backup failover, destructive corruptions, trust rejection (when a key is available), and CLI smoke.