post_run and pre_run hook support

This commit is contained in:
Julian Rother 2021-12-11 02:28:02 +01:00
parent 231c983205
commit e7d5a2cbc7
3 changed files with 40 additions and 12 deletions

View file

@ -100,4 +100,12 @@ exclude_files: {}
# Only supportet in restic based backups
# Ignored in vm-via-hypervisor mode
include_files: {}
# Run one or more hooks before and after each (standalone) backup run
# Items are executed in bash in their own subshell
hooks:
pre_run:
- mysqldump --all-databases > /var/backups/mysql-backup.sql
post_run:
- rm /var/backups/mysql-backup.sql
```