dc94893dc53b577b442dd07a790f5b36a241bf88
| # | 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` |
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)
Description
Languages
Python
45.1%
Svelte
33.5%
TypeScript
20.1%
CSS
0.5%
Just
0.3%
Other
0.4%