diff --git a/controller/README.md b/controller/README.md index e5e10a0..4b598bc 100644 --- a/controller/README.md +++ b/controller/README.md @@ -4,7 +4,7 @@ A single, lightweight Go container that replaces Portainer + scattered systemd scripts with a unified, Hungarian-language web dashboard for managing Docker Compose stacks, backups, storage, monitoring, and notifications on customer hardware. -**Current version: v0.14.0** +**Current version: v0.14.1** --- @@ -194,7 +194,7 @@ self-sufficient backup** — any single tier can fully restore an app. The nightly backup has two phases that run sequentially. All paths are **per-drive** — each physical drive gets its own restic repo and per-app DB dump directories. -**Drive layout (v0.14.0):** +**Drive layout (v0.14.1):** ``` / ├── appdata// ← app user data @@ -208,6 +208,7 @@ Path computation is centralized in `backup/paths.go`: - `PrimaryResticRepoPath(drivePath)` → `/backups/primary/restic/` - `AppDBDumpPath(drivePath, stackName)` → `/backups/primary//db-dumps/` - `AppDataDir(drivePath, stackName)` → `/appdata//` +- `SecondaryInfraPath(drivePath)` → `/backups/secondary/_infra/` **Phase 1 — Database Dumps** (`internal/backup/dbdump.go`, scheduled 02:30) @@ -240,6 +241,13 @@ Does NOT protect against drive failure (backup is on the same physical drive). **Complete backup** to a different physical drive. Available for **all apps** — apps with HDD data back up config + DB + user data; apps without HDD back up config + DB dumps only. +- **Auto-enable for small apps (v0.14.1):** Apps without HDD mounts (config-only, DB-only) are + automatically configured for daily rsync Tier 2 when ≥2 storage paths are registered. + `AutoEnableSmallApps()` runs at the start of each nightly backup cycle. Never overwrites + existing user-configured cross-drive settings (even disabled ones). +- **Infrastructure config backup (v0.14.1):** `syncInfraConfig()` rsyncs the stacks directory + and `controller.yaml` to `/backups/secondary/_infra/` on every secondary destination + drive. Runs before per-app backups. Cross-drive restic also includes infra paths. - **Two methods:** - **rsync** — Simple mirror with `--delete` (fast, no versioning, **browsable** on disk) - **restic** — Versioned, deduplicated, encrypted (shared repo across apps, not browsable) @@ -254,9 +262,12 @@ data back up config + DB + user data; apps without HDD back up config + DB dumps | External mount (different device than `/`) | Block if <100 MB free | | System drive (same device as `/`) | Require ≥10 GB free AND <90% used; logged warning | -- **Secondary drive layout (v0.14.0):** +- **Secondary drive layout (v0.14.1):** ``` /backups/secondary/ + ├── _infra/ ← infrastructure config mirror (v0.14.1) + │ ├── controller.yaml + │ └── stacks/ ← full stacks dir (all app configs) ├── /rsync/ ← per-app rsync mirror │ ├── _db/ ← DB dump files │ ├── _config/ ← compose.yml, app.yaml, .felhom.yml @@ -266,7 +277,7 @@ data back up config + DB + user data; apps without HDD back up config + DB dumps - DB dump files read from **per-app home drive** path (`AppDBDumpPath`) - `_` prefix directories prevent collision with user data - For non-HDD apps, only `_db/` and `_config/` are present (no user data directory) -- **Restic backup paths:** includes HDD mounts (if any) + config dir + per-app DB dump dir from home drive +- **Restic backup paths:** includes HDD mounts (if any) + config dir + per-app DB dump dir from home drive + stacks dir + controller.yaml (infra, v0.14.1) - Safety guards: destination ≠ source, path-overlap check (HDD mounts only), writable check - **Chained execution:** runs immediately after nightly restic — daily apps every night, weekly apps on Sundays - Per-app concurrency lock prevents overlapping runs @@ -783,7 +794,7 @@ Response format: `{"ok": true/false, "data": ..., "error": "...", "message": ".. # On build server (192.168.0.180) cd ~/build/felhom-controller git -C ~/git/deploy-felhom-compose pull -./build.sh v0.14.0 --push +./build.sh v0.14.1 --push ``` ### Deploy on customer node @@ -791,8 +802,8 @@ git -C ~/git/deploy-felhom-compose pull ```bash # On customer node (e.g., 192.168.0.162) cd /opt/docker/felhom-controller -sudo docker pull gitea.dooplex.hu/admin/felhom-controller:v0.14.0 -sudo sed -i 's|image: gitea.dooplex.hu/admin/felhom-controller:.*|image: gitea.dooplex.hu/admin/felhom-controller:v0.14.0|' docker-compose.yml +sudo docker pull gitea.dooplex.hu/admin/felhom-controller:v0.14.1 +sudo sed -i 's|image: gitea.dooplex.hu/admin/felhom-controller:.*|image: gitea.dooplex.hu/admin/felhom-controller:v0.14.1|' docker-compose.yml sudo docker compose up -d ``` @@ -830,6 +841,8 @@ See `docker-compose.yml` for the full volume configuration. - [x] Dashboard alert system - [x] Per-drive backup architecture (v0.14.0) — per-drive restic repos, per-app DB dumps, path helpers - [x] Cross-drive restic pruning (v0.14.0) +- [x] Auto Tier 2 for small apps (v0.14.1) — auto-enable daily rsync for non-HDD apps when ≥2 drives +- [x] Infrastructure config in cross-drive backup (v0.14.1) — stacks dir + controller.yaml in `_infra/` + restic ### In Progress / Planned @@ -846,7 +859,7 @@ See `docker-compose.yml` for the full volume configuration. | Node | Hardware | Domain | Status | |------|----------|--------|--------| -| demo-felhom | Acemagic GK3PLUS N100, 16G RAM, 512G SSD + 1TB HDD | demo-felhom.eu | Controller v0.14.0 (pending OS reinstall) | +| demo-felhom | Acemagic GK3PLUS N100, 16G RAM, 512G SSD + 1TB HDD | demo-felhom.eu | Controller v0.14.1 (pending OS reinstall) | | pi-customer-1 | Raspberry Pi 3B+, 1G RAM, 32G SD | pi-customer-1.local | Not yet tested | ## Related Repositories