mongodump

38 views
Skip to first unread message

Ciaran

unread,
Mar 15, 2017, 10:40:37 PM3/15/17
to mongodb-user
I am running a mongodb with about 1.8 million records. The db in mongoshell says it is about 2.5GB. I did a dump this morning and the file it created was about 7GB. I mongorestored using that on another machine and the data was all there. This afternoon I ran mongodump again 7 times. Each time the output was different. It ranged in size from 300MB to 2.4GB. None of the 7 had the full collection.

I am running Ubuntu 16 and the command I'm running is 
$sudo mongodump --quiet --db tweets --collection tweets --out backups/tweets/`date + "%m-%d-%y"`  

I get no error messages when I run the dump. I use --quiet because if I don't the memory runs out printing the oplogs.

Anyone have any idea why this is happening??


Gabriel Russell

unread,
Mar 20, 2017, 3:37:12 PM3/20/17
to mongod...@googlegroups.com
On Wed, Mar 15, 2017 at 4:32 PM, Ciaran <ciaran....@gmail.com> wrote:
I am running a mongodb with about 1.8 million records. The db in mongoshell says it is about 2.5GB.

First off, the size of the db in the mongod doesn't have much effect on the size of the data dumped to disk.
 
I did a dump this morning and the file it created was about 7GB. I mongorestored using that on another machine and the data was all there. This afternoon I ran mongodump again 7 times. Each time the output was different. It ranged in size from 300MB to 2.4GB. None of the 7 had the full collection.

I am running Ubuntu 16 and the command I'm running is 
$sudo mongodump --quiet --db tweets --collection tweets --out backups/tweets/`date + "%m-%d-%y"`  

I get no error messages when I run the dump. I use --quiet because if I don't the memory runs out printing the oplogs.

Don't run with --quiet, it suppresses errors. If running without --quiet revels errors, then running with --quiet just suppresses the errors, but doesn't make it work any better.

That command line that you gave doesn't include dumping oplog. Is that the correct command line?

If you run with that command line, but without --quite, does it fail while dumping the oplog? If so, that's very strange. Can you provide the generated log?

Anyone have any idea why this is happening??


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/99e7c9aa-0678-4e6e-868b-ab1695681efe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages