Description:
I am trying to configure MongoDB backup/restore using Percona Operator. Backups are being successfully uploaded on GCS:
Backups:
========
S3 us s3://https://storage.googleapis.com/mongodb-macpaw-staging-backup/test
Snapshots:
2024-08-01T10:23:21Z 26.75KB <logical> [restore_to_time: 2024-08-01T10:23:32Z]
When I try to create PerconaServerMongoDBRestore resource to restore DB from previously created backup I get an error:
Backups:
========
S3 us s3://https://storage.googleapis.com/mongodb-macpaw-staging-backup/test
Snapshots:
2024-08-01T10:23:21Z 26.75KB <logical> [ERROR: file "2024-08-01T10:23:21Z/test-rs1/oplog": no such file] [2024-08-01T10:23:36Z]
Steps to Reproduce:
Cluster backup config:
backup:
enabled: true
image: perconalab/percona-server-mongodb-operator:main-backup
serviceAccountName: <serviceAccountName>
storages:
gcs:
type: s3
s3:
region: us
credentialsSecret: <credentialsSecret>
bucket: <bucket>
endpointUrl: https://storage.googleapis.com
prefix: <prefix>
pitr:
enabled: true
tasks:
- name: daily
enabled: true
schedule: "0 11 * * *"
keep: 3
storageName: gcs
compressionType: gzip
compressionLevel: 6
PerconaServerMongoDBRestore manifest
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBRestore
metadata:
name: restore1
namespace: mongodb
spec:
clusterName: test
backupName: cron-test-20240802124900-fjk52
backupSource:
type: physical
destination: s3://<bucket>/<prefix>
s3:
region: us
credentialsSecret: <credentialsSecret>
bucket: <bucket>
endpointUrl: https://storage.googleapis.com
prefix: <prefix>
Version:
Percona MongoDB Operator - 1.5.0
Expected Result:
It looks like restore process expects Oplog file to be named oplog
and to be placed in the root directory of the bucket.
Actual Result:
Oplog file is stored under oplog
directory: oplog/20240802113626-4.20240802113631-3.gz
Additional Information:
When I reupload oplog/20240802113626-4.20240802113631-3.gz
file back into the bucket but with a different name - oplog
, restore is succesfull.