top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Will mongodump leave any message in log file?

0 votes
779 views

If I use mongodump command dump data to my computer, will leave any message in log file? Or no any message be loged ?

posted Jan 5, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

mongodump has it is own logfile and logs there the progress:

2017-01-05T13:02:47.081+0100 writing test.coll3 to
2017-01-05T13:02:47.081+0100 writing mean-dev.users to
2017-01-05T13:02:47.082+0100 writing mean-dev.sessions to
2017-01-05T13:02:47.082+0100 writing test.coll to
2017-01-05T13:02:47.083+0100 done dumping mean-dev.users (1 document)
2017-01-05T13:02:47.083+0100 done dumping mean-dev.sessions (0 documents)
2017-01-05T13:02:47.115+0100 done dumping test.coll3 (6000 documents)
2017-01-05T13:02:47.133+0100 done dumping test.coll (2000 documents)

Mongodump behaves like a client, so the only thing by default you see on mongod side is the connections opening:

2017-01-05T13:02:28.738+0100 I CONTROL [initandlisten]
2017-01-05T13:02:28.743+0100 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory './db/diagnostic.data'
2017-01-05T13:02:28.743+0100 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2017-01-05T13:02:28.743+0100 I NETWORK [initandlisten] waiting for connections on port 27017
2017-01-05T13:02:47.057+0100 I NETWORK [initandlisten] connection accepted from 127.0.0.1:43850 #1 (1 connection now open)
2017-01-05T13:02:47.069+0100 I NETWORK [initandlisten] connection accepted from 127.0.0.1:43852 #2 (2 connections now open)
2017-01-05T13:02:47.082+0100 I NETWORK [initandlisten] connection accepted from 127.0.0.1:43855 #3 (3 connections now open)
2017-01-05T13:02:47.082+0100 I NETWORK [initandlisten] connection accepted from 127.0.0.1:43854 #4 (4 connections now open)
2017-01-05T13:02:47.135+0100 I NETWORK [conn4] end connection 127.0.0.1:43854 (3 connections now open)
2017-01-05T13:02:47.135+0100 I NETWORK [conn1] end connection 127.0.0.1:43850 (3 connections now open)
2017-01-05T13:02:47.135+0100 I NETWORK [conn3] end connection 127.0.0.1:43855 (3 connections now open)
2017-01-05T13:02:47.135+0100 I NETWORK [conn2] end connection 127.0.0.1:43852 (3 connections now open)

Maybe with auditing you can get more details:
https://docs.mongodb.com/manual/core/auditing/

answer Jan 5, 2017 by Abhay
Similar Questions
0 votes

we currently have an installation of mongodb3.4 inside Openshift. So, every mongod instance is installed inside a container with limited memory.

When we are trying to run mongodump on a 3GB database from rather small container ( for example, 1 GB ram), we are getting OOM.

As far as I can understand, mongodump cant understand cgroup limits and thinks that it has 64 GB RAM available (its our docker host available ram), so it tries to eat more than it can chew and container is killed

Are there any workarounds for this issue?

+1 vote

At some point I added a large file into a git repository. It now exists on multiple branches, possibly with some changes to it. I'd like to remove it from git, but leave its current form (say the one on the master branch) on the file system.

I tried (on a dummy git archive)

git filter-branch --index-filter 'git rm --cached --ignore-unmatch bigfile' master branch1 branch2

That, however, does not leave a copy of bigfile on the file system.It isn't clear to me why not, though the description of the --tree-filteroption to filter-branch (I'm using the --index-filter option, but is is "similar") states:" (new files are auto-added, disappeared files are auto-removed ... )".
Is there a direct way to do what I want, with git? I've found similar requests;none of the responses point out that the above command actually deletes the file from the file system.

...