Fix commands syntax for Borgmatic 2.0
- 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 <noreply@anthropic.com>
This commit is contained in:
16
config.yaml
16
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}"
|
||||
|
||||
Reference in New Issue
Block a user