fix deprecated config format

This commit is contained in:
BeauTroll
2025-12-16 05:28:09 +01:00
parent fc8c413599
commit 709ad61557

View File

@@ -1,108 +1,76 @@
# Configuration Borgmatic pour backup serveur Agence66 # Configuration Borgmatic pour backup serveur Agence66
# Compatible avec les backups Borg existants # Compatible avec Borgmatic 1.7.7
location: # Chemins sources à sauvegarder
# Chemins sources à sauvegarder source_directories:
source_directories: - /var/www
- /var/www - /srv/minecraftserver
- /srv/minecraftserver - /srv/reddiscordbot
- /srv/reddiscordbot - /srv/waltercoiffure
- /srv/waltercoiffure - /etc
- /etc - /opt/nextcloud
- /opt/nextcloud - /opt/traefik
- /opt/traefik - /opt/n8n
- /opt/n8n - /opt/portainer
- /opt/portainer - /opt/uptime-kuma
- /opt/uptime-kuma - /opt/vaultwarden
- /opt/vaultwarden - /opt/mailcow-dockerized
- /opt/mailcow-dockerized - /opt/netdata
- /opt/netdata - /opt/gitea
- /opt/gitea - /home
- /home
# Repository Borg (à définir selon votre configuration) # Repository Borg
# Décommentez et adaptez selon votre setup : # Défini via la variable d'environnement BORG_REPO dans /etc/borgmatic/.env
# repositories: # repositories sera lu depuis $BORG_REPO
# - /path/to/local/repo
# - ssh://user@backup-server/path/to/repo
# Patterns d'exclusion # Patterns d'exclusion
exclude_patterns: exclude_patterns:
- '*.log' - "*.log"
- '*/cache/*' - "*/cache/*"
- '*/tmp/*' - "*/tmp/*"
- '**/__pycache__' - "**/__pycache__"
- '*/node_modules/*' - "*/node_modules/*"
# Un seul fichier de config # Un seul système de fichiers
one_file_system: false one_file_system: false
storage: # Format du nom d'archive (compatible avec votre ancien script)
# Format du nom d'archive (compatible avec votre format actuel) archive_name_format: "backup-{now:%Y%m%d-%H%M}"
archive_name_format: 'backup-{now:%Y%m%d-%H%M}'
# Compression (identique à votre config) # Compression
compression: zstd compression: zstd
# Chiffrement - décommentez et configurez si nécessaire # Options SSH
# encryption_passphrase: sera lu depuis la variable d'environnement BORG_PASSPHRASE ssh_command: ssh -o StrictHostKeyChecking=accept-new
# Vérification de l'intégrité du repo # Politique de rétention
check_last: 3 keep_daily: 7
keep_weekly: 4
keep_monthly: 6
# Options supplémentaires # Préfixe des archives
ssh_command: ssh -o StrictHostKeyChecking=accept-new prefix: "backup-"
retention: # Vérifications d'intégrité
# Politique de rétention (identique à votre config) checks:
keep_daily: 7 - repository
keep_weekly: 4 - archives
keep_monthly: 6
# Pfixe des archives à considérer # Fquence des vérifications
prefix: 'backup-' check_last: 3
consistency: # Hooks pour notifications ntfy
# Vérifications d'intégrité before_backup:
checks: - echo "Backup démarré"
- name: repository
frequency: 2 weeks
- name: archives
frequency: 1 month
# Vérifier uniquement les dernières archives pour économiser du temps after_backup:
check_last: 3 - /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}"
hooks: on_error:
# Hooks pour notifications ntfy - /etc/borgmatic/hooks/ntfy-error.sh "{error}"
before_backup: # Commandes PostgreSQL/MySQL si nécessaire
- echo "Backup démarré: $(date)" # postgresql_databases:
# - name: all
after_backup: # mysql_databases:
- /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}" # - name: all
on_error:
- /etc/borgmatic/hooks/ntfy-error.sh "{error}"
# Actions avant/après
before_actions:
- systemctl is-active docker || systemctl start docker
# Commandes PostgreSQL/MySQL si nécessaire
# postgresql_databases:
# - name: all
# format: custom
# mysql_databases:
# - name: all
# format: sql
output:
# Niveau de verbosité (0 = minimal, 1 = normal, 2 = verbeux)
verbosity: 1
# Afficher les statistiques
stats: true
# Envoyer les logs vers syslog
syslog_facility: LOG_USER