diff --git a/pkg/backup.go b/pkg/backup.go index 3754113f..d3252c56 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -348,8 +348,8 @@ func (opt *mongoOptions) backupMongoDB(targetRef api_v1beta1.TargetRef) (*restic }...) } else { adminCreds = []interface{}{ - "--username", string(appBindingSecret.Data[MongoUserKey]), - "--password", string(appBindingSecret.Data[MongoPasswordKey]), + fmt.Sprintf("--username=%s", appBindingSecret.Data[MongoUserKey]), + fmt.Sprintf("--password=%s", appBindingSecret.Data[MongoPasswordKey]), "--authenticationDatabase", opt.authenticationDatabase, } } diff --git a/pkg/restore.go b/pkg/restore.go index be61cb77..896922e3 100644 --- a/pkg/restore.go +++ b/pkg/restore.go @@ -281,8 +281,8 @@ func (opt *mongoOptions) restoreMongoDB(targetRef api_v1beta1.TargetRef) (*resti } else { adminCreds = []interface{}{ - "--username", string(appBindingSecret.Data[MongoUserKey]), - "--password", string(appBindingSecret.Data[MongoPasswordKey]), + fmt.Sprintf("--username=%s", appBindingSecret.Data[MongoUserKey]), + fmt.Sprintf("--password=%s", appBindingSecret.Data[MongoPasswordKey]), "--authenticationDatabase", opt.authenticationDatabase, } }