autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

Check and init command ignore YAML options

Open Chostakovitch opened this issue 2 years ago • 3 comments

When running autorestic check, at some point, autorestic runs restic check. However, any option in the YAML configuration file won't be passed to restic. Only environment is included. The code is here : https://github.com/cupcakearmy/autorestic/blob/3bc091f826704d0a95d4d500d60083bddd3dee74/internal/backend.go#L122-L124

A few lines later, restic init won't use YAML options neither.

Example configuration file:

backends:
   rest:
   [...]
    options:
      all:
        cacert:
        - /var/lib/restic/certs/ca/ca_cert.pem
        tls-client-cert:
        - /var/lib/restic/certs/client_cert_with_key.pem

In that case TLS options are ignored and the command fails with an unknown certificate error.

Chostakovitch avatar May 16 '22 13:05 Chostakovitch

Thanks for reporting and fixing it. I hope I get to review it soon!

cupcakearmy avatar May 24 '22 11:05 cupcakearmy

My issue here https://github.com/cupcakearmy/autorestic/issues/147#issuecomment-1166202685 may be a result of this bug. @cupcakearmy I know you asked for patience. Hope this one here can be prioritized when you find the time to work on this project again. Thank you!

aniqueta avatar Jul 01 '22 01:07 aniqueta

@cupcakearmy Just a little ping if you have the time to look this PR. :)

Chostakovitch avatar Jul 27 '22 18:07 Chostakovitch