188 lines
2.8 KiB
Markdown
188 lines
2.8 KiB
Markdown
<p align="center">
|
|
<img src="images/dockervault_logo.png" width="600">
|
|
</p>
|
|
|
|
# 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?
|
|
* ⚡ Quick Start
|
|
* 🧠 How it Works
|
|
* 🗂 Classification Model
|
|
* 💾 Borg Integration
|
|
* 🤖 Automation Mode
|
|
* 🔢 Exit Codes
|
|
* 🛠 Tech Stack
|
|
* 🔍 Example
|
|
* 🔥 Future Ideas
|
|
* 📜 License
|
|
* ❤️ Credits
|
|
|
|
---
|
|
|
|
## 🚀 What is DockerVault?
|
|
|
|
DockerVault is a CLI tool that scans Docker environments and determines what actually needs to be backed up.
|
|
|
|
It understands:
|
|
- Docker Compose setups
|
|
- bind mounts
|
|
- named volumes
|
|
- service-specific data paths
|
|
|
|
Instead of guessing, DockerVault builds a structured backup plan.
|
|
|
|
---
|
|
|
|
## ⚡ Quick Start
|
|
|
|
git clone https://git.lanx.dk/ed/dockervault.git
|
|
cd dockervault
|
|
|
|
python -m dockervault.cli scan /your/docker/root --repo /backup
|
|
|
|
---
|
|
|
|
## 🧠 How it Works
|
|
|
|
DockerVault works in layers:
|
|
|
|
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
|
|
|
|
---
|
|
|
|
## 🗂 Classification Model
|
|
|
|
DockerVault sorts paths into:
|
|
|
|
### INCLUDE (critical)
|
|
Must be backed up
|
|
|
|
Examples:
|
|
- /var/lib/mysql
|
|
- /data
|
|
|
|
---
|
|
|
|
### REVIEW
|
|
Needs human decision
|
|
|
|
Examples:
|
|
- uploads
|
|
- config folders
|
|
|
|
---
|
|
|
|
### SKIP
|
|
Safe to ignore
|
|
|
|
Examples:
|
|
- logs
|
|
- cache
|
|
- temp data
|
|
|
|
---
|
|
|
|
## 💾 Borg Integration
|
|
|
|
DockerVault can generate ready-to-use Borg commands:
|
|
|
|
borg create --stats --progress \
|
|
/backup-repo::{hostname}-{now:%Y-%m-%d_%H-%M} \
|
|
/path1 \
|
|
/path2
|
|
|
|
This makes it easy to plug into:
|
|
- cron jobs
|
|
- scripts
|
|
- automation pipelines
|
|
|
|
---
|
|
|
|
## 🤖 Automation Mode
|
|
|
|
python -m dockervault.cli scan /path --automation --quiet
|
|
|
|
Designed for:
|
|
- scheduled backups
|
|
- CI/CD pipelines
|
|
- unattended systems
|
|
|
|
---
|
|
|
|
## 🔢 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)
|
|
|
|
---
|
|
|
|
## 🔍 Example
|
|
|
|
DockerVault Backup Plan
|
|
=======================
|
|
|
|
INCLUDE PATHS:
|
|
- ./db [critical]
|
|
- ./mc [critical]
|
|
|
|
WARNING: Missing critical paths detected
|
|
- ./db (service=db)
|
|
|
|
---
|
|
|
|
## 🔥 Future Ideas
|
|
|
|
- Notifications (mail, ntfy)
|
|
- Web interface
|
|
- Backup reports
|
|
- Restore validation
|
|
- smarter classification engine
|
|
- Docker API integration
|
|
|
|
---
|
|
|
|
## 📜 License
|
|
|
|
This project is licensed under the GNU GPL v3.
|
|
|
|
---
|
|
|
|
## ❤️ Credits
|
|
|
|
## ❤️ Credits
|
|
|
|
Built with ❤️ for Lanx by [NodeFox 🦊](https://gnodefoxlanx.dk)
|
|
|
|
Maintained by [Eddie Nielsen](https://lanx.dk)
|
|
|
|
Feel free to contribute, suggest improvements, or fork the projec
|