I’m using minIO to store the backup data that backup for a mongoDB replica set. In case, all nodes are down and lost, but the backup data still exists on minIO bucket storage, How can the new pbm-agent fetches and uses this backup data? or Which is suitable solution?
There are two ways you can approach your restore:
Create a new cluster (same number of nodes, same hardware from lost cluster), and configure PBM to connect to the new RS cluster.
PBM needs to access your s3 bucket location so it can restore your backup data. But it should be connected to the new cluster. Therefore, when running pbm config from your new environment, follow the steps from the documentation, but with 2 extra considerations:
- You need to disable PITR, for safety (you want to restore PITR from the lost cluster, not the new one)
- When running pbm config, you need to use an extra flag:
Please check: PBM commands - Percona Backup for MongoDB for more information
This should make the bucket with backups accessible from your new environment.
After this, you can follow pbm restore steps as detailed here: Restore a backup - Percona Backup for MongoDB and re-enable PITR after restore is complete.
As long as you have access to the backups data (logical or physical) you can restore them in a new environment.
With logical backups, you can use mongorestore for restoring your dump files.
With physical backups, you have to manually copy datafiles from your bucket to all new mongo nodes, start each mongod process in maintenance mode and change the replica set configuration object by editing local.system.replset collection so it is compatible to your new servers. Much more time consuming, but still possible.
Please let us know if you have further questions.