I'm trying to do a daily backup of my mongodb server (auth enabled) using the mongodump tool.
mongodump provides two parameters to set the credentials:
-u [ --username ] arg username -p [ --password ] arg password
Unfortunately they don't provide any parameter to read the password from stdin. Therefore everytime I run this command, everyone on the server can read the password (e.g. by using ps aux).
The only workaround I have found is stopping the database and directly accessing the database files using the --dbpath parameter.
Is there any other solution which allows me to backup the mongodb database without stopping the server and without "publishing" my password?
I am using Debian squeeze 6.0.5 amd64 with mongodb 1.4.4-3.