Info
Some logging leaks into the dump when using mongodump with "--dbpath" and "--out -" options. For example:
$ sudo service mongodb stop
mongodb stop/waiting
$ sudo -u mongodb mongodump --dbpath /var/lib/mongodb/ -d datahub -c users --out - | dd bs=1M count=10 iflag=fullblock of=users.bson
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 2.66285 s, 3.9 MB/s
$ grep -a -F 'Wed Sep 25' users.bson
# here grep outputs some logging statements intermixed with bson data
File users.bson is attached (it is a bunch of public data from one social network), so you can inspect it yourselves.
Top User Comments
xgen-internal-githook commented on Wed, 27 Nov 2013 16:36:20 +0000:
Author:
{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}
Message: SERVER-10886 Create function to override rawOut destination stream to avoid corrupting tool output
Branch: master
https://github.com/mongodb/mongo/commit/1a78c32529cd9378479170b7577b1eb2509c61ca
samantha.ritter@10gen.com commented on Tue, 29 Oct 2013 20:54:24 +0000:
> mongodump --db digg --collection stories --dbpath /data/db --out - > foo
if there is data being written, it will be corrupted by a "dbexit" message that is logged by the dbexit function. This message should be suppressed, or re-routed to stderr.