diff --git a/changelogs/unreleased/5526-qiuming-best b/changelogs/unreleased/5526-qiuming-best new file mode 100644 index 0000000000..772f6d4d90 --- /dev/null +++ b/changelogs/unreleased/5526-qiuming-best @@ -0,0 +1 @@ +fix restic backup failure with self-signed certification backend storage diff --git a/pkg/uploader/provider/restic.go b/pkg/uploader/provider/restic.go index 2715b9e9d2..00fe420571 100644 --- a/pkg/uploader/provider/restic.go +++ b/pkg/uploader/provider/restic.go @@ -147,7 +147,9 @@ func (rp *resticProvider) RunBackup( snapshotIdCmd := restic.GetSnapshotCommand(rp.repoIdentifier, rp.credentialsFile, tags) snapshotIdCmd.Env = rp.cmdEnv snapshotIdCmd.CACertFile = rp.caCertFile - + if len(rp.extraFlags) != 0 { + snapshotIdCmd.ExtraFlags = append(snapshotIdCmd.ExtraFlags, rp.extraFlags...) + } snapshotID, err := restic.GetSnapshotID(snapshotIdCmd) if err != nil { return "", false, errors.WithStack(fmt.Errorf("error getting snapshot id with error: %v", err))