cupcakearmy / autorestic

Config driven, easy backup cli for restic.
https://autorestic.vercel.app/
Apache License 2.0
1.28k stars 71 forks source link

Allow backends to fail/be skipped #189

Open cupcakearmy opened 2 years ago

cupcakearmy commented 2 years ago

Discussed in https://github.com/cupcakearmy/autorestic/discussions/185

Originally posted by **varac** April 25, 2022 I'd like to always backup to my remote location, and when I'm at home I'd also like to backup a my local NAS. It would be great if Autorestic could be configured for this in a way that it doesn't fail if the second location is not available. Maybe a backend config like this could do it: ``` backends: remote: type: sftp path: ... local: type: sftp path: ... only_if: cmd: check_local_avail.sh allow_fail: true ``` When the script `check_local_avail.sh` fails, and `only_if.allow_fail` is set to `true` autorestic should (silently) succeed. What do you think ?
cupcakearmy commented 2 years ago

Adding a script seems a bit too much IMO. But a flag like allow-fail to a backend seems reasonable

afuetterer commented 11 months ago

Hi, is there any update on this issue? The feature would be really helpful. Thanks.