Add backup-tool: dockerized incremental backup with monitoring and Telegram alerts#7
Draft
Copilot wants to merge 3 commits into
Draft
Add backup-tool: dockerized incremental backup with monitoring and Telegram alerts#7Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
…g and Telegram alerts Agent-Logs-Url: https://github.com/punppis/linux-utils/sessions/88973cfd-3783-48b4-aabe-60a810972405 Co-authored-by: punppis <6446823+punppis@users.noreply.github.com>
…horter temp container Agent-Logs-Url: https://github.com/punppis/linux-utils/sessions/88973cfd-3783-48b4-aabe-60a810972405 Co-authored-by: punppis <6446823+punppis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add backup tool with Docker and interactive config manager
Add backup-tool: dockerized incremental backup with monitoring and Telegram alerts
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Homelab backup tool — dockerized, runs on swarm manager as a normal compose stack. Supports SSH hosts (rsync) and Docker container volumes (docker cp), with interactive config, retention policies, drive replication, and Telegram alerting.
Package structure (
packages/backup-tool/)backup-tool— main entry point: continuous backup loop with background monitor, or single-shot modes (once,monitor,retention,replicate)setup— interactive wizard: select SSH hosts or Docker nodes, pick paths/volumes, choose drives for replication, configure Telegram botDockerfile/docker-compose.yml— privileged container, host network, mounts docker socket + SSH keys + backup destinationLibrary modules (
lib/)backup.sh—rsync -a --delete --link-destfor incremental SSH backups; temp container +docker cpfor volume backupsretention.sh— per-host/path time-based (retention_days) and size-based (retention_max_size) cleanup, always keeps at least one snapshotreplication.sh— copies latest important snapshots to all configured drives, compresses replicas viatar -czf(main copy stays uncompressed for rsync)monitor.sh— background loop: SSH host reachability every 30s, disk space every 60s, independent of backup scheduletelegram.sh— stateful alerts with exponential back-off (2min → 4min → … → 8h cap), auto-resolves with recovery messagecommon.sh— INI config read/write (cfg_get/cfg_set), logging, path helpersConfig layout
Backup directory structure
Usage
README includes full Telegram bot setup instructions (BotFather → token → chat ID → test message).