autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

Allow backends to fail/be skipped

Open cupcakearmy opened this issue 2 years ago • 2 comments

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 avatar Apr 26 '22 22:04 cupcakearmy

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

cupcakearmy avatar Apr 26 '22 22:04 cupcakearmy

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

afuetterer avatar Oct 23 '23 06:10 afuetterer