release: DockerVault v0.1.0
This commit is contained in:
parent
5954e869c3
commit
2a8d7fc8b7
3 changed files with 105 additions and 95 deletions
189
README.md
189
README.md
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
> Intelligent Docker backup discovery for real systems
|
||||
|
||||
DockerVault scans your Docker environments and figures out what actually matters to back up — automatically.
|
||||
DockerVault scans your Docker environments and figures out **what actually matters to back up** — automatically.
|
||||
|
||||
No guesswork. No forgotten volumes. No broken restores.
|
||||
|
||||
|
|
@ -20,169 +20,184 @@ No guesswork. No forgotten volumes. No broken restores.
|
|||
* 🗂 Classification Model
|
||||
* 💾 Borg Integration
|
||||
* 🤖 Automation Mode
|
||||
* 🔢 Exit Codes
|
||||
* 🛠 Tech Stack
|
||||
* 🔍 Example
|
||||
* 🛠 Tech Stack
|
||||
* 🔢 Exit Codes
|
||||
* 🔥 Future Ideas
|
||||
* 📜 License
|
||||
* ❤️ Credits
|
||||
* 📜 License
|
||||
|
||||
---
|
||||
|
||||
## 🚀 What is DockerVault?
|
||||
|
||||
DockerVault is a CLI tool that scans Docker environments and determines what actually needs to be backed up.
|
||||
DockerVault is a CLI tool that:
|
||||
|
||||
It understands:
|
||||
- Docker Compose setups
|
||||
- bind mounts
|
||||
- named volumes
|
||||
- service-specific data paths
|
||||
* scans Docker Compose environments
|
||||
* detects bind mounts and named volumes
|
||||
* identifies **critical data paths**
|
||||
* warns about missing or broken setups
|
||||
* generates **ready-to-use Borg backup commands**
|
||||
|
||||
Instead of guessing, DockerVault builds a structured backup plan.
|
||||
It focuses on **real-world setups**, not theoretical configs.
|
||||
|
||||
---
|
||||
|
||||
## ⚡ Quick Start
|
||||
|
||||
```bash
|
||||
git clone https://git.lanx.dk/ed/dockervault.git
|
||||
cd dockervault
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
|
||||
python -m dockervault.cli scan /your/docker/root --repo /backup
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Run a scan:
|
||||
|
||||
```bash
|
||||
python -m dockervault.cli /path/to/docker
|
||||
```
|
||||
|
||||
Generate a Borg backup plan:
|
||||
|
||||
```bash
|
||||
python -m dockervault.cli /path/to/docker --repo /backup --dry-run
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧠 How it Works
|
||||
|
||||
DockerVault works in layers:
|
||||
DockerVault:
|
||||
|
||||
1. Scan for docker-compose.yml
|
||||
2. Parse services and volumes
|
||||
3. Resolve:
|
||||
- bind mounts
|
||||
- named volumes
|
||||
4. Classify paths:
|
||||
- critical
|
||||
- review
|
||||
- skip
|
||||
5. Generate backup plan
|
||||
1. Searches for Docker Compose files
|
||||
2. Parses all services and mounts
|
||||
3. Applies classification rules
|
||||
4. Builds a structured backup plan
|
||||
|
||||
It focuses on **what actually matters to restore a system**.
|
||||
|
||||
---
|
||||
|
||||
## 🗂 Classification Model
|
||||
|
||||
DockerVault sorts paths into:
|
||||
DockerVault divides data into:
|
||||
|
||||
### INCLUDE (critical)
|
||||
Must be backed up
|
||||
### 🔴 Critical
|
||||
|
||||
Examples:
|
||||
- /var/lib/mysql
|
||||
- /data
|
||||
Must be backed up:
|
||||
|
||||
---
|
||||
* databases (`/var/lib/mysql`, etc.)
|
||||
* application data (`/data`, etc.)
|
||||
|
||||
### REVIEW
|
||||
Needs human decision
|
||||
### 🟡 Review
|
||||
|
||||
Examples:
|
||||
- uploads
|
||||
- config folders
|
||||
Optional:
|
||||
|
||||
---
|
||||
* logs
|
||||
* caches
|
||||
* temporary files
|
||||
|
||||
### SKIP
|
||||
Safe to ignore
|
||||
### ⚪ Skip
|
||||
|
||||
Examples:
|
||||
- logs
|
||||
- cache
|
||||
- temp data
|
||||
Safe to ignore:
|
||||
|
||||
* ephemeral runtime data
|
||||
|
||||
---
|
||||
|
||||
## 💾 Borg Integration
|
||||
|
||||
DockerVault can generate ready-to-use Borg commands:
|
||||
DockerVault generates ready-to-use Borg commands:
|
||||
|
||||
```bash
|
||||
borg create --stats --progress \
|
||||
/backup-repo::{hostname}-{now:%Y-%m-%d_%H-%M} \
|
||||
/backup::hostname-YYYY-MM-DD_HH-MM \
|
||||
/path1 \
|
||||
/path2
|
||||
```
|
||||
|
||||
This makes it easy to plug into:
|
||||
- cron jobs
|
||||
- scripts
|
||||
- automation pipelines
|
||||
No guessing. No missing volumes.
|
||||
|
||||
---
|
||||
|
||||
## 🤖 Automation Mode
|
||||
|
||||
python -m dockervault.cli scan /path --automation --quiet
|
||||
DockerVault supports automation-friendly usage:
|
||||
|
||||
Designed for:
|
||||
- scheduled backups
|
||||
- CI/CD pipelines
|
||||
- unattended systems
|
||||
```bash
|
||||
python -m dockervault.cli /path --repo /backup --automation --quiet
|
||||
```
|
||||
|
||||
---
|
||||
* exit code `0` → OK
|
||||
* exit code `1` → missing critical paths
|
||||
|
||||
## 🔢 Exit Codes
|
||||
|
||||
0 = Success
|
||||
1 = Missing critical paths
|
||||
2 = General error
|
||||
|
||||
---
|
||||
|
||||
## 🛠 Tech Stack
|
||||
|
||||
- Python 3
|
||||
- Docker Compose parsing
|
||||
- Filesystem analysis
|
||||
- Borg backup integration
|
||||
- pytest (testing)
|
||||
Perfect for cron jobs and monitoring.
|
||||
|
||||
---
|
||||
|
||||
## 🔍 Example
|
||||
|
||||
```text
|
||||
DockerVault Backup Plan
|
||||
=======================
|
||||
Scan root: /srv/docker
|
||||
|
||||
INCLUDE PATHS:
|
||||
- ./db [critical]
|
||||
- ./mc [critical]
|
||||
- /srv/docker/db [critical] service=db target=/var/lib/mysql
|
||||
- /srv/docker/app/data [critical] service=app target=/data
|
||||
|
||||
REVIEW PATHS:
|
||||
- /srv/docker/logs [optional]
|
||||
|
||||
WARNING: Missing critical paths detected
|
||||
- ./db (service=db)
|
||||
- /srv/docker/app/data (service=app)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛠 Tech Stack
|
||||
|
||||
* Python 3.10+
|
||||
* Docker Compose parsing
|
||||
* Custom classification engine
|
||||
* Borg backup integration
|
||||
|
||||
---
|
||||
|
||||
## 🔢 Exit Codes
|
||||
|
||||
| Code | Meaning |
|
||||
| ---- | ---------------------------------------- |
|
||||
| 0 | Success |
|
||||
| 1 | Missing critical paths (automation mode) |
|
||||
| 2 | Error / invalid input |
|
||||
|
||||
---
|
||||
|
||||
## 🔥 Future Ideas
|
||||
|
||||
- Notifications (mail, ntfy)
|
||||
- Web interface
|
||||
- Backup reports
|
||||
- Restore validation
|
||||
- smarter classification engine
|
||||
- Docker API integration
|
||||
* JSON output (`--json`)
|
||||
* Web UI
|
||||
* Email / ntfy notifications
|
||||
* Restore validation
|
||||
* Smarter service detection
|
||||
* Backup manifests
|
||||
|
||||
---
|
||||
|
||||
## 📜 License
|
||||
|
||||
This project is licensed under the GNU GPL v3.
|
||||
|
||||
---
|
||||
|
||||
## ❤️ Credits
|
||||
|
||||
## ❤️ Credits
|
||||
|
||||
Built with ❤️ for Lanx by [NodeFox 🦊](https://nodefox.lanx.dk)
|
||||
|
||||
Maintained by [Eddie Nielsen](https://lanx.dk)
|
||||
|
||||
Feel free to contribute, suggest improvements, or fork the projec
|
||||
Feel free to contribute, suggest improvements or fork the project.
|
||||
|
||||
---
|
||||
|
||||
## 📜 License
|
||||
|
||||
This project is licensed under the GNU GPL v3.
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
M# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.1.0
|
||||
0
main
Normal file
0
main
Normal file
Loading…
Add table
Add a link
Reference in a new issue