diff --git a/config.yaml b/config.yaml index 89095f2..cf14249 100644 --- a/config.yaml +++ b/config.yaml @@ -1,108 +1,76 @@ # Configuration Borgmatic pour backup serveur Agence66 -# Compatible avec les backups Borg existants +# Compatible avec Borgmatic 1.7.7 -location: - # 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 +# 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 - # Repository Borg (à définir selon votre configuration) - # Décommentez et adaptez selon votre setup : - # repositories: - # - /path/to/local/repo - # - ssh://user@backup-server/path/to/repo +# Repository Borg +# Défini via la variable d'environnement BORG_REPO dans /etc/borgmatic/.env +# repositories sera lu depuis $BORG_REPO - # Patterns d'exclusion - exclude_patterns: - - '*.log' - - '*/cache/*' - - '*/tmp/*' - - '**/__pycache__' - - '*/node_modules/*' +# Patterns d'exclusion +exclude_patterns: + - "*.log" + - "*/cache/*" + - "*/tmp/*" + - "**/__pycache__" + - "*/node_modules/*" - # Un seul fichier de config - one_file_system: false +# Un seul système de fichiers +one_file_system: false -storage: - # Format du nom d'archive (compatible avec votre format actuel) - archive_name_format: 'backup-{now:%Y%m%d-%H%M}' +# Format du nom d'archive (compatible avec votre ancien script) +archive_name_format: "backup-{now:%Y%m%d-%H%M}" - # Compression (identique à votre config) - compression: zstd +# Compression +compression: zstd - # Chiffrement - décommentez et configurez si nécessaire - # encryption_passphrase: sera lu depuis la variable d'environnement BORG_PASSPHRASE +# Options SSH +ssh_command: ssh -o StrictHostKeyChecking=accept-new - # Vérification de l'intégrité du repo - check_last: 3 +# Politique de rétention +keep_daily: 7 +keep_weekly: 4 +keep_monthly: 6 - # Options supplémentaires - ssh_command: ssh -o StrictHostKeyChecking=accept-new +# Préfixe des archives +prefix: "backup-" -retention: - # Politique de rétention (identique à votre config) - keep_daily: 7 - keep_weekly: 4 - keep_monthly: 6 +# Vérifications d'intégrité +checks: + - repository + - archives - # Préfixe des archives à considérer - prefix: 'backup-' +# Fréquence des vérifications +check_last: 3 -consistency: - # Vérifications d'intégrité - checks: - - name: repository - frequency: 2 weeks - - name: archives - frequency: 1 month +# Hooks pour notifications ntfy +before_backup: + - echo "Backup démarré" - # Vérifier uniquement les dernières archives pour économiser du temps - check_last: 3 +after_backup: + - /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}" -hooks: - # Hooks pour notifications ntfy - before_backup: - - echo "Backup démarré: $(date)" +on_error: + - /etc/borgmatic/hooks/ntfy-error.sh "{error}" +# Commandes PostgreSQL/MySQL si nécessaire +# postgresql_databases: +# - name: all - after_backup: - - /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}" - - 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 +# mysql_databases: +# - name: all