Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PerconaServerMongoDBRestore: ERROR oplog no such file #1618

Open
bwnuts opened this issue Aug 12, 2024 · 1 comment
Open

PerconaServerMongoDBRestore: ERROR oplog no such file #1618

bwnuts opened this issue Aug 12, 2024 · 1 comment
Labels

Comments

@bwnuts
Copy link

bwnuts commented Aug 12, 2024

Report

I am trying to configure MongoDB backup/restore using Percona Operator. Backups are being successfully uploaded to 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]

More about the problem

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.

Steps to reproduce

  1. 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
  1. 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>

Versions

  1. Kubernetes - 1.29 GKE
  2. Operator - 1.5.0
  3. Database - percona/percona-server-mongodb:6.0.5-4

Anything else?

No response

@bwnuts bwnuts added the bug label Aug 12, 2024
@spron-in
Copy link
Collaborator

spron-in commented Oct 7, 2024

For the sake of the community - we continue the discussion here: https://forums.percona.com/t/perconaservermongodbrestore-error-oplog-no-such-file/32064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants