I try to backup my local mongodb. I use archlinux and installed mongodb-tools in order to use mongodump. I tried :
mongodump --host localhost --port 27017
mongodump --host localhost --port 27017 --db mydb
Every time I have the same response :
Failed: error connecting to db server: no recheable server
I'm however able to connect to the database using
mongo --host localhost --port 27017
or just
mongo
My mongodb version is 3.0.7. I did not set any username/password
How can I properly use mongodump to backup my local database ?
This appears to be a bug in the mongodump
tool, see this JIRA ticket for more detail. You should be able to use mongodump
if you explicitely specify the IP address:
mongo --host 127.0.0.1 --port 27017