TarChive is a lightweight HTTP server for managing tar-based archives. It offers a simple, inspectable way to group, store, and retrieve files using logical containers called pails.
Built with an OpenAPI-first approach, TarChive is ideal for developers, home labbers, and archivists who want minimal tooling for archive storage that "just works."
- 📦 Pails as Logical Containers: Files are grouped and stored in append-only tar archives inside "pails."
- 🧬 OpenAPI-Driven: The API contract is defined in
openapi.yaml, with server and client code auto-generated usingoapi-codegen. - 🛠 CLI Client: A Go-based CLI tool simplifies scripting, uploads, and downloads.
- 🔍 Inspectable Archives: Files are stored in tar format, viewable with standard UNIX tools.
The initial release supports:
- ✅ Create/list/delete pails
- ✅ Upload files to a pail (append-only)
- ✅ List contents of a pail
- ✅ Download individual files
- ✅ OpenAPI-generated server and client
Future roadmap:
- ❌ Per-item deletion (requires tar rewriting)
- 🔐 Authentication & ACLs
- 🏷️ Metadata/tagging
- 🗜️ Compression & deduplication
- 🧪 Integrity validation
- 🖥️ Web UI
All operations are exposed via a REST API:
| Method | Endpoint | Description |
|---|---|---|
POST |
/pails |
Create a new pail |
GET |
/pails |
List all pails |
| Method | Endpoint | Description |
|---|---|---|
POST |
/pails/{pail}/items |
Upload one or more files |
GET |
/pails/{pail}/items |
List files in a pail |
GET |
/pails/{pail}/items/{filename} |
Download a file |
The CLI mirrors the API and uses the generated OpenAPI client for communication.
tarchiveClient create my-backups
tarchiveClient upload my-backups /var/log/syslog
tarchiveClient list-items my-backups
tarchiveClient download my-backups syslogThere are several targets in the Makefile for building this project.
| Target | Description |
|---|---|
| buildServer | Build the HTTP server |
| buildClient | Build the CLI Client |
| buildRepair | Build the tar repair/validator tool |
| build | Build all tools |
- Written in Go
- OpenAPI-first (openapi.yaml)
- Uses oapi-codegen for server & client
- Append-only tar files as storage backend
- Minimal external dependencies
- Designed for local-first and self-hosted deployments
- oapi-codegen – OpenAPI-to-Go code generation
🙌 Contributions
Bug reports, ideas, and PRs are welcome. If you use it, let me know — or contribute a feature!
