Skip to content

amf3/tarchive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TarChive

The Tarchive Logo

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."


✨ Features

  • 📦 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 using oapi-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.

🚧 MVP Scope

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

📚 API Overview

All operations are exposed via a REST API:

🪣 Pail Management

Method Endpoint Description
POST /pails Create a new pail
GET /pails List all pails

📁 File Operations

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

🛠 CLI Client

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 syslog

Building

There 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

📐 Design Notes

  • 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

🔗 Related Projects

  • oapi-codegen – OpenAPI-to-Go code generation

📜 License

Apache License 2.0

🙌 Contributions

Bug reports, ideas, and PRs are welcome. If you use it, let me know — or contribute a feature!

About

**TarChive** is a lightweight HTTP server for managing tar-based archives.

Resources

Stars

Watchers

Forks

Packages

No packages published