Exec command do not use backend options
rdelaage opened this issue · 0 comments
rdelaage commented
Describe the bug
I am using mTLS to connect to my backend server so I need to use the tls-client-cert
with the path to my bundle file. My config looks like this:
version: 2
extras:
chat_fail: &chat_fail
failure:
- /path/to/my/fail/script.sh ${AUTORESTIC_LOCATION}
global:
forget:
keep-hourly: 24
keep-daily: 7
keep-weekly: 4
keep-monthly: 12
backends:
remote1:
type: sftp
path: remote1-backup:/backup/mySuperBackup/
remote2:
type: rest
path: https://backup.remote2.example.org/mySuperBackup
options:
all:
tls-client-cert: /path/to/my/certs/bundle.pem
backup:
compression:
- auto
locations:
mySuperFiles:
from:
- /a/path
- /an/other/path
to:
- remote1
- remote2
cron: 0 0 * * *
forget: "yes"
hooks:
<<: *chat_fail
There is no problem when running check or backup, but there is a problem with the rest backup when calling exec command. I found that autorestic do not use the user defined flags in the options
section of the backend on the exec command.
Expected behavior
Autorestic use options:all
and maybe options:exec
?
Environment
- OS: Debian Buster
- Version: 1.7.3
Additional context
I think we just have to add args = append(args, combineBackendOptions("exec", b)...)
to this function before executing the command https://github.com/cupcakearmy/autorestic/blob/master/internal/backend.go#L140