diff --git a/pkg/backup.go b/pkg/backup.go index 0ca48f731..8115e6042 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -396,7 +396,7 @@ func (opt *mongoOptions) backupMongoDB(targetRef api_v1beta1.TargetRef) (*restic dumpCreds = append(dumpCreds, []interface{}{ fmt.Sprintf("--username=%s", username), fmt.Sprintf("--password=%s", authSecret.Data[MongoPasswordKey]), - "--authenticationDatabase", opt.authenticationDatabase, + fmt.Sprintf("--authenticationDatabase=%s", opt.authenticationDatabase), }...) } else { @@ -413,7 +413,7 @@ func (opt *mongoOptions) backupMongoDB(targetRef api_v1beta1.TargetRef) (*restic dumpCreds = append(dumpCreds, []interface{}{ fmt.Sprintf("--username=%s", username), fmt.Sprintf("--password=%s", authSecret.Data[MongoPasswordKey]), - "--authenticationDatabase", opt.authenticationDatabase, + fmt.Sprintf("--authenticationDatabase=%s", opt.authenticationDatabase), }...) }