Skip to content

Instantly share code, notes, and snippets.

View tobiraak's full-sized avatar
🎯
Focusing

Tobias Raak tobiraak

🎯
Focusing
View GitHub Profile
@KristianP26
KristianP26 / backup.sh
Last active May 21, 2026 07:45
Auto-discovery Docker backup to Cloudflare R2: volumes + DB dumps + bind mounts, encrypted via rclone, with retention and Healthchecks.io monitoring. No config needed for new containers.
#!/bin/bash
# Auto-discovery Docker backup script
# Automatically finds and backs up ALL Docker volumes and databases.
# Uploads to Cloudflare R2, then cleans up local files.
# No configuration needed when adding new containers.
set -euo pipefail
HC_BACKUP_URL="${HC_BACKUP_URL:?set HC_BACKUP_URL}"