diff --git a/config.yaml b/config.yaml index bd0de82..37266e1 100644 --- a/config.yaml +++ b/config.yaml @@ -51,8 +51,8 @@ keep_daily: 7 keep_weekly: 4 keep_monthly: 6 -# Préfixe des archives -prefix: "backup-" +# Sélection des archives pour rétention (remplace 'prefix') +match_archives: "sh:backup-*" # Vérifications d'intégrité checks: @@ -64,17 +64,27 @@ checks: # Nombre d'archives à vérifier check_last: 3 -# Commandes/hooks pour notifications -before_actions: - - echo "Backup démarré" +# Commandes/hooks pour notifications (nouvelle syntaxe Borgmatic 2.0) +commands: + - name: "Notification de démarrage" + when: + - before_backup + run: + - echo "Backup démarré" -after_backup: - - echo "Exécution hook de succès" - - /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}" + - name: "Notification de succès" + when: + - after_backup + run: + - echo "Exécution hook de succès" + - /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}" -on_error: - - echo "Exécution hook d'erreur" - - /etc/borgmatic/hooks/ntfy-error.sh "{error}" + - name: "Notification d'erreur" + when: + - on_error + run: + - echo "Exécution hook d'erreur" + - /etc/borgmatic/hooks/ntfy-error.sh "{error}" # Commandes PostgreSQL/MySQL si nécessaire # postgresql_databases: