Hi,
Im trying to setup Percona backup for Mongodb, and its not as easy as i thought.
The setup is quite simple
1x mongodb docker container
1x percona backup for mongodb container
Mongodb server is running, and is working, started pbm container with: docker run --name percona_backup_master -e PBM_MONGODB_URI=“mongodb://172.25.0.7:27017” --network trax_repox_mongo_net -d percona/percona-backup-mongodb:latest’
after 20-30 sec the container exits with the logs entries below:
It looks like you have a standalone MongoDB instance. PBM does not work against a standalone server, it works only if the Replica Sert is configured.
The thing you can do is restarting the container setting the ReplSetName configuration option and then running rs.initiate() on the node. This way you will get a 1-node Replica Set and sp PBM should work.
Thanks for the swift reply,
I´m a lot closer now, have gotten the backup running and everything is almost good
Only issue I´m facing now, is that I´m running percona mongodb server, in my dockerfile i install the pbm-agent. Created a shell script, that starts the pbm-agent, and put it in /docker-entrypoint-initdb.d and mounted the backup folder via docker-compose.
Everything on the config servers are running like a charm. but the data nodes aint running the entrypoint script, because the database is initialised (i can see in the entrypoint.sh script that is the case).
So how is it intended to start the pbm-agent inside the containers when they start up?