Mongodump using the mongoc driver


Is there any way that mongodump/mongorestore can be performed using the mongoc driver ?

Invoking mongodump/mongorestore utilities programmatically and passing credentials through command line imposes security risks.


1 Like

Hi @santhanu_mukundan :wave:

I don’t believe this is possible. You could still invoke mongodump/mongorestore without exposing the password using environment variables.

Something like this:

echo $SECRET |  mongodump --username backup

Where $SECRET is a predefined environment variable having the actual password.