adamlamers dc94893dc5
Continuous Integration / backend-tests (push) Successful in 30s
Continuous Integration / frontend-check (push) Successful in 16s
Continuous Integration / e2e-tests (push) Successful in 6m14s
address these:
| # | Issue | Location |
|---|-------|----------|
| 1 | **Archiver backs up deleted files** — `get_unbacked_files` never checks `is_deleted`, so files the scanner marked missing still get archived (wastes media, fails at tar assembly when source is gone) | `archiver.py:157-163` |
| 2 | **Hashing phase marks wrong files as deleted** — after one sub-batch finishes, the code iterates over ALL fetched records (`path_to_record`) not just the completed sub-batch. Files in pending sub-batches get falsely `is_deleted=True` if not on disk | `scanner.py:854-861` |
| 3 | **Multiple threads mutate ORM objects concurrently** — `ThreadPoolExecutor` workers share and write to session-bound objects (`sha256_hash`, `is_deleted`) from different threads. SQLAlchemy sessions are not thread-safe | `scanner.py:814-861` |
2026-04-30 17:06:55 -04:00
2026-04-30 17:06:55 -04:00
2026-04-22 21:59:23 -04:00
2026-04-25 17:03:28 -04:00
2026-04-29 01:26:48 -04:00
2026-04-22 21:59:23 -04:00
2026-04-29 23:53:53 -04:00
2026-04-30 15:10:51 -04:00
2026-04-22 21:59:23 -04:00
2026-04-25 23:01:18 -04:00

TapeHoard

A robust, index-driven Tape Backup Manager designed for single-tape drive users and scalable to tape libraries.

For full architectural details, see PLAN.md.

Docker Deployment

TapeHoard is designed to run as a Docker container with native hardware access.

Permissions (PUID/PGID)

The container supports PUID and PGID environment variables to ensure files written to volumes match your host user's identity.

Critical: To ensure fast startup times, TapeHoard does not perform a recursive chown on your data. You must ensure your host directories are owned by the same PUID/PGID you provide to the container:

# Example: If PUID=1000 and PGID=1000
sudo chown -R 1000:1000 ./db ./staging ./source_data ./restores

Example docker-compose.yml

services:
  tapehoard:
    image: tapehoard:latest
    container_name: tapehoard
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - ./db:/database
      - ./staging:/staging
      - /mnt/my_data:/source_data:ro
      - /mnt/restores:/restores
      # LTO Tape Drive Passthrough
      - /dev/nst0:/dev/nst0
      - /dev/sgX:/dev/sgX
    devices:
      - /dev/nst0:/dev/nst0
      - /dev/sgX:/dev/sgX
    ports:
      - "8000:8000"
    restart: unless-stopped

Project Structure

  • backend/: Python/FastAPI application handling the heavy lifting (hashing, streaming, db indexing).
  • frontend/: Svelte 5 application providing the Web UI.
  • docker/: Files required for building the multi-stage Docker container.
  • docs/: Additional documentation.

Quickstart

(Coming soon)

S
Description
backup manager
Readme 4.9 MiB
Languages
Python 45.1%
Svelte 33.5%
TypeScript 20.1%
CSS 0.5%
Just 0.3%
Other 0.4%