Mongodb – Getting empty folder when using mongodump to back up the MongoDB

mongodbmongodb2.4

Basically, I have a problem with using mongodump to back up my MongoDB.

This is the general syntax I use in SSH:

mongodump -d myDatabaseName -o ~/backups/my_backup

This is the resulting message:

Fri Apr 22 20:39:57.304 DATABASE: myDatabaseName   to     /root/backups/my_backup/myDatabaseName

This simply generates a blank folder with no files in it whatsoever. The actual database is fairly large, so not sure what's going on.

I would also like to add that my mongodump client and my MongoDB version are both the same (version 2.4.9).

Not sure how to go about fixing this. Any help is appreciated.

Best Answer

I was using the default mongodb-client deb package with Ubuntu. I removed those and installed the mongodb-org-tools package from mongodb.com https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu/?_ga=2.36209632.1945690590.1499275806-1594815486.1499275806

They have other install instructions for your specific OS if you are not on Ubuntu https://www.mongodb.com/download-center?jmp=nav#community