109 lines
2.7 KiB
YAML
109 lines
2.7 KiB
YAML
# Configuration Borgmatic pour backup serveur Agence66
|
|
# Compatible avec les backups Borg existants
|
|
|
|
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
|
|
|
|
# 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
|
|
|
|
# Patterns d'exclusion
|
|
exclude_patterns:
|
|
- '*.log'
|
|
- '*/cache/*'
|
|
- '*/tmp/*'
|
|
- '**/__pycache__'
|
|
- '*/node_modules/*'
|
|
|
|
# Un seul fichier de config
|
|
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}'
|
|
|
|
# Compression (identique à votre config)
|
|
compression: zstd
|
|
|
|
# Chiffrement - décommentez et configurez si nécessaire
|
|
# encryption_passphrase: sera lu depuis la variable d'environnement BORG_PASSPHRASE
|
|
|
|
# Vérification de l'intégrité du repo
|
|
check_last: 3
|
|
|
|
# Options supplémentaires
|
|
ssh_command: ssh -o StrictHostKeyChecking=accept-new
|
|
|
|
retention:
|
|
# Politique de rétention (identique à votre config)
|
|
keep_daily: 7
|
|
keep_weekly: 4
|
|
keep_monthly: 6
|
|
|
|
# Préfixe des archives à considérer
|
|
prefix: 'backup-'
|
|
|
|
consistency:
|
|
# Vérifications d'intégrité
|
|
checks:
|
|
- name: repository
|
|
frequency: 2 weeks
|
|
- name: archives
|
|
frequency: 1 month
|
|
|
|
# Vérifier uniquement les dernières archives pour économiser du temps
|
|
check_last: 3
|
|
|
|
hooks:
|
|
# Hooks pour notifications ntfy
|
|
before_backup:
|
|
- echo "Backup démarré: $(date)"
|
|
|
|
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
|