[feature request] Condition section in profile
What do you think about new condition section in the profile, and in it a list of conditions that must be met (logic AND) to proceed with each action, backup, prune etc. in this profile ?
You could call a script to check if the VPN tunnel or VM is working, etc.
profiles:
photos:
condition:
- check_if_vpn_working.sh
- check_if_vm_working.sh
It can be usefull in issue 135
Think we had discussed this for a possible remote shell / remote backup feature ( #69 ):
A conditional configuration that allows to have a single profiles.yaml running on different hosts where individual profiles decide whether they should be skipped or not depending on the conditions.
Might be a good addition even without remote shell (which probably takes time to arrive).
I was just looking for something like this. I have a scheduled backup to a local (external) disk, but this disk is most of the time at home and so the backup fails every time I'm away from home and I get a notification (send-after-fail) for that.
I also would like to have conditions, I could also settle for a way to stop the backup without failing in a run-before. Maybe just something like: if the run-before exit-code is 127 don't trigger send-after-fail.