We recently deployed the Percona Server for MongoDB operator on our Kubernetes Cluster following the blog ([URL=“Install Percona server for MongoDB on Kubernetes”]https://www.percona.com/doc/kubernet...ubernetes.html[/URL])
For backups. we configured and have been using S3 as storage. The backups are working fine with both on-demand as well as YAML configuration strategies.
Restoring the backups is where the problem lies.
If we were to use the restore.yaml the restoration process works. However, we could not get the on-demand restoration to work.
As said in the blog, we launched a pod with image percona/percona-server-mongodb-operator:0.3.0-backup-pbmctl and tried listing backups and it gives the error:
$ kubectl run -it -n psmdb --rm pbmctl --image=percona/percona-server-mongodb-operator:0.3.0-backup-pbmctl --restart=Never – list backups --server-address=db-cluster-master-backup-coordinator:10001
ERRO[0000] Cannot get the list of available backups: Cannot get the connected agents list: rpc error: code = Unauthenticated desc = Request unauthenticated with bearer
So we do not know what the name of the backup file is.
Our on demand backup code looks like the following:
$ kubectl run -n psmdb -it --rm pbmctl --image=percona/percona-server-mongodb-operator:0.3.0-backup-pbmctl --restart=Never –
run backup
–server-address=db-cluster-master-backup-coordinator:10001
–storage s3-eu-west
–compression-algorithm=gzip
–description=backup-latest
Which works. It creates three files with a timestamp, 2019-11-25T06:37:30Z.json, 2019-11-25T06:37:30Z_rs0.dump.gz, 2019-11-25T06:37:30Z_rs0.oplog.gz
So we did try restoring with the command
$ kubectl run -n psmdb -it --rm pbmctl --image=percona/percona-server-mongodb-operator:0.3.0-backup-pbmctl --restart=Never –
run restore
–server-address=db-cluster-master-backup-coordinator:10001
–storage s3-eu-west
<< backup-name >>
We replaced the <<backup-name >> with the file name in S3 bucket, as well as the
backup-latest
description which we gave during the on demand backup. But nothing worked.
The error it gives is:
restoring
FATA[0000] Cannot send the RestoreBackup command to the gRPC server: rpc error: code = Unknown desc = invalid backup metadata file /data/psmdb-backup: open /data/backup-latest: no such file or directory
pod “pbmctl” deleted
Is there something that we are missing.
We are using [B]percona/percona-server-mongodb-operator:1.2.0-mongod3.6 [/B]as the cluster db.