From 9164e0273ed6558d21344c5a8b0ffcded2ae8a14 Mon Sep 17 00:00:00 2001 From: BeauTroll <-> Date: Tue, 16 Dec 2025 06:04:00 +0100 Subject: [PATCH] Fix commands syntax for Borgmatic 2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use correct 'before: action' and 'after: action' syntax instead of 'name' and 'when: [before_backup]' - Simplify hook structure: before/after action for create, after error for failures - Remove invalid schema fields that caused validation errors - Commands now validate without errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- config.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/config.yaml b/config.yaml index 37266e1..491efc6 100644 --- a/config.yaml +++ b/config.yaml @@ -64,24 +64,20 @@ checks: # Nombre d'archives à vérifier check_last: 3 -# Commandes/hooks pour notifications (nouvelle syntaxe Borgmatic 2.0) +# Hooks pour notifications (syntaxe Borgmatic 2.0) commands: - - name: "Notification de démarrage" - when: - - before_backup + - before: action + when: [create] run: - echo "Backup démarré" - - name: "Notification de succès" - when: - - after_backup + - after: action + when: [create] run: - echo "Exécution hook de succès" - /etc/borgmatic/hooks/ntfy-success.sh "{archive_name}" "{stats}" - - name: "Notification d'erreur" - when: - - on_error + - after: error run: - echo "Exécution hook d'erreur" - /etc/borgmatic/hooks/ntfy-error.sh "{error}"