# DockerVault > Intelligent Docker backup discovery for real systems DockerVault scans your Docker environments and figures out **what actually matters to back up** โ€” automatically. No guesswork. No forgotten volumes. No broken restores. --- ## ๐Ÿ“š Contents * [๐Ÿš€ What is DockerVault?](#what-is-dockervault) * [โšก Quick Start](#quick-start) * [๐Ÿง  How it Works](#how-it-works) * [๐Ÿ—‚ Classification Model](#classification-model) * [๐Ÿ’พ Borg Integration](#borg-integration) * [๐Ÿค– Automation Mode](#automation-mode) * [๐Ÿ”ข Exit Codes](#exit-codes) * [๐Ÿ›  Tech Stack](#tech-stack) * [๐Ÿ” Example](#example) * [๐Ÿงฑ Current Features](#current-features) * [๐Ÿ”ฅ Roadmap](#roadmap) * [๐Ÿง  Philosophy](#philosophy) * [๐Ÿ“œ License](#license) * [โค๏ธ Credits](#credits) --- ## ๐Ÿš€ What is DockerVault? DockerVault analyzes your `docker-compose.yml` and identifies: * What **must** be backed up * What can be **ignored** * What needs **human review** It bridges the gap between: ๐Ÿ‘‰ โ€œeverything looks fineโ€ and ๐Ÿ‘‰ โ€œrestore just failedโ€ --- ## โšก Quick Start ```bash git clone https://github.com/YOUR-USER/dockervault.git cd dockervault pip install -e . ``` Run analysis: ```bash python -m dockervault.cli docker-compose.yml --borg --repo /backup-repo ``` Run backup: ```bash python -m dockervault.cli docker-compose.yml \ --run-borg \ --repo /backup-repo ``` --- ## ๐Ÿง  How it Works DockerVault parses your compose file and inspects: * bind mounts * volume targets * known data paths It then classifies them using heuristics: * database paths โ†’ critical * logs/cache โ†’ optional * unknown โ†’ review --- ## ๐Ÿ—‚ Classification Model DockerVault divides everything into three categories: ### โœ… INCLUDE Must be backed up. Example: ``` /var/lib/mysql /data /config ``` ### โš ๏ธ REVIEW Needs human decision. Triggered when: * path does not exist * path exists but is empty * named volumes (Docker-managed) Example: ``` ./mc-missing โ†’ /data ``` ### โŒ SKIP Safe to ignore. Example: ``` /var/log /tmp /cache ``` --- ## ๐Ÿ’พ Borg Integration DockerVault can generate and run Borg backups directly. Example: ```bash python -m dockervault.cli docker-compose.yml \ --run-borg \ --repo /mnt/backups/borg/dockervault ``` Generated command: ```bash borg create --stats --progress \ /repo::hostname-2026-03-23_12-44-19 \ /path/to/data ``` ### Features * automatic archive naming (with seconds precision) * deduplicated paths * safe command generation * subprocess execution * optional passphrase support --- ## ๐Ÿค– Automation Mode Designed for cron / scripts / servers. ```bash python -m dockervault.cli docker-compose.yml \ --run-borg \ --quiet \ --automation \ --repo /backup-repo ``` ### Behavior * no plan output * no interactive prompts * minimal output * suitable for logs / CI --- ## ๐Ÿ”ข Exit Codes | Code | Meaning | | ---- | ------------------------------------ | | 0 | Success | | 1 | General error | | 2 | Missing required args | | 3 | No include paths | | 4 | Review required (`--fail-on-review`) | ### Fail on review ```bash --fail-on-review ``` Stops automation if something needs human attention. --- ## ๐Ÿ›  Tech Stack * Python 3.10+ * PyYAML * BorgBackup * CLI-first design --- ## ๐Ÿ” Example Input: ```yaml services: db: volumes: - ./db:/var/lib/mysql mc: volumes: - ./mc-missing:/data nginx: volumes: - ./logs:/var/log/nginx ``` Output: ``` INCLUDE: db REVIEW: mc-missing SKIP: logs ``` --- ## ๐Ÿงฑ Current Features * Docker Compose parsing * Bind mount detection * Intelligent classification * Borg backup integration * Automation mode * Exit codes for scripting * Safe path handling * Deduplication --- ## ๐Ÿ—บ Roadmap DockerVault is built with a clear philosophy: **simple core, intelligent behavior, and extensible design โ€” without unnecessary complexity or vendor lock-in.** --- ### ๐Ÿš€ v1 โ€” Core Engine (Current Focus) > Build a reliable, deterministic backup discovery engine - [x] Docker Compose scanning - [x] Volume and bind mount detection - [x] Intelligent classification (critical / review / skip) - [x] Backup plan generation - [x] Borg backup integration - [x] Dry-run mode - [x] Automation mode (`--automation`, `--quiet`) --- ### ๐Ÿ”ง v2 โ€” Observability & Automation > Make DockerVault production-ready - [ ] Advanced logging (human + JSON output) - [ ] Webhook support (primary notification system) - [ ] ntfy integration (lightweight alerts) - [ ] Email notifications (optional reports) - [ ] Change detection (new/missing volumes) - [ ] Backup summaries (stats, duration, warnings) - [ ] Basic run history (file-based, no database) --- ### ๐Ÿง  v3 โ€” Intelligence Layer > Move from tool โ†’ system awareness - [ ] "Explain why" classification decisions - [ ] Anomaly detection (size, duration, structure) - [ ] System understanding confidence - [ ] Backup diff between runs - [ ] Smarter classification patterns --- ### ๐Ÿงช v4 โ€” Reliability & Safety > Ensure backups are actually usable - [ ] Restore testing (ephemeral container validation) - [ ] Integrity checks (borg/restic verify) - [ ] Pre/post execution hooks - [ ] Backup profiles (critical / full / custom) --- ### ๐Ÿ” v5 โ€” Security & Encryption > Strong, transparent data protection - [ ] Engine-native encryption (Borg / Restic) - [ ] Encryption validation checks - [ ] Optional post-process encryption (age / gpg) - [ ] Clear key handling guidelines --- ### ๐Ÿ”Œ v6 โ€” Plugin Ecosystem > Extend without bloating core - [ ] Storage backends (S3, WebDAV, SSH, etc.) - [ ] Optional cloud integrations (Dropbox, Google Drive, Proton Drive) - [ ] Notification plugins (webhook-first approach) - [ ] Pluggable architecture for extensions --- ### ๐ŸŒ v7 โ€” Platform & Deployment > Make DockerVault easy to run anywhere - [ ] Official Docker image - [ ] Non-interactive container mode - [ ] Unraid Community Apps template - [ ] Configurable via environment + config file --- ### ๐Ÿงญ Design Principles - **No vendor lock-in** โ€” webhook over platform integrations - **Self-hosting friendly** โ€” works fully offline/local - **Transparency over magic** โ€” explain decisions - **Stateless-first** โ€” no database required by default - **Extensible architecture** โ€” plugins over core bloat - **Backup โ‰  done until restore works** --- ### ๐Ÿ”ฎ Future Ideas - Multi-host awareness (Lanx environments) - Centralized monitoring integration (OpenObserve, etc.) - Web UI (optional, not required) - Automation pipelines via webhook - Advanced reporting and visualization --- > Built with โค๏ธ for real systems โ€” not toy setups. --- ## ๐Ÿง  Philosophy DockerVault is built on a simple idea: > Backups should reflect reality โ€” not assumptions. * No blind backups * No hidden data * No silent failures Just clarity. --- ## ๐Ÿ“œ License GNU GPLv3 This project is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3. --- ## โค๏ธ Credits Created by **Ed & NodeFox ๐ŸฆŠ** Built with โค๏ธ for Lanx Maintained by Eddie Nielsen Feel free to contribute, suggest improvements or fork the project.