Files
agence66-borgmatic/config.yaml
BeauTroll 21355eceff
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
Add Uptime Kuma monitoring integration with dedicated hooks
Implement Uptime Kuma Push Monitor support with separate hook files
following separation of concerns principle.

Changes:
- Add UPTIME_KUMA_PUSH_URL to .env.example
- Create dedicated uptime-kuma-success.sh hook
- Create dedicated uptime-kuma-error.sh hook
- Update config.yaml to call both ntfy and Uptime Kuma hooks
- Each notification service has its own file for modularity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 17:26:48 +01:00

98 lines
2.1 KiB
YAML

# Configuration Borgmatic 2.0 pour backup serveur
# Compatible avec les backups Borg existants
#
# IMPORTANT: Nécessite Borgmatic ≥ 2.0.0 pour l'interpolation des variables d'environnement
# Repository Borg - utilise la variable d'environnement
repositories:
- path: "${BORG_REPO}"
label: production
# Chemins sources à sauvegarder
source_directories:
- /var/www
- /srv/minecraftserver
- /srv/reddiscordbot
- /srv/waltercoiffure
- /etc
- /opt/nextcloud
- /opt/traefik
- /opt/n8n
- /opt/portainer
- /opt/uptime-kuma
- /opt/vaultwarden
- /opt/mailcow-dockerized
- /opt/netdata
- /opt/gitea
- /home
# Patterns d'exclusion
exclude_patterns:
- "*.log"
- "*/cache/*"
- "*/tmp/*"
- "**/__pycache__"
- "*/node_modules/*"
- "/opt/nextcloud/backups"
#- "/opt/nextcloud/data/appdata_*/preview/*" # Miniatures d'images
#- "/opt/nextcloud/updater-*" # Fichiers de mise à jour
- "/opt/gitea/backups"
# Un seul système de fichiers
one_file_system: false
# Format du nom d'archive (compatible avec votre ancien script)
archive_name_format: "backup-{now:%Y%m%d-%H%M}"
# Compression
compression: zstd
# Options SSH
ssh_command: ssh -o StrictHostKeyChecking=accept-new
# Politique de rétention
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
# Sélection des archives pour rétention (remplace 'prefix')
match_archives: "sh:backup-*"
# Vérifications d'intégrité
checks:
- name: repository
frequency: 2 weeks
- name: archives
frequency: 1 month
# Nombre d'archives à vérifier
check_last: 3
# Hooks pour notifications (syntaxe Borgmatic 2.0)
commands:
- before: action
when: [create]
run:
- echo "Backup démarré"
- after: action
when: [create]
run:
- echo "Exécution hooks de succès"
- /etc/borgmatic/hooks/ntfy-success.sh
- /etc/borgmatic/hooks/uptime-kuma-success.sh
- after: error
run:
- echo "Exécution hooks d'erreur"
- /etc/borgmatic/hooks/ntfy-error.sh
- /etc/borgmatic/hooks/uptime-kuma-error.sh
# Commandes PostgreSQL/MySQL si nécessaire
# postgresql_databases:
# - name: all
# mysql_databases:
# - name: all