docker-mongodb-backup icon indicating copy to clipboard operation
docker-mongodb-backup copied to clipboard

Define auth source

Open jwillmer opened this issue 6 years ago • 2 comments

Can I define a authentication source? We normally connect like this to our mongodb: mongodb://${MONGO_USER}:${MONGO_PW}@${DATABASE_IP}/?authSource=admin

Also, does is backup all database instances that are running on the mongo server or only one?

jwillmer avatar Nov 13 '19 14:11 jwillmer

Here's the command I use for dumping: mongodump --out ${TMPDIR}/${TARGET} --host ${DBHOST} --port ${DBPORT} ${USER_STR}${PASS_STR}${DB_STR} ${EXTRA_OPTS}

There's an undocumented variable in there EXTRA_OPTS - Give that a try? If you can get me a working example on how you made it work I will build it into the image (and also tiredofit/db-backup as I'm focusing more effort into maintaining that image`)

Setting DB_DUMP_DEBUG=TRUE as will will list the command executing with your own env vars so may help with getting you where you need to be.

tiredofit avatar Nov 13 '19 14:11 tiredofit

@tiredofit if I find the time I will try it out.

jwillmer avatar Nov 13 '19 14:11 jwillmer