[DOCS-1472] mongooplog has invalid example of option --database. filtering on database does not work. Created: 02/May/13  Updated: 03/Nov/17  Resolved: 06/May/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: auto Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongod --version
db version v2.4.3
mongooplog --version
mongooplog version 2.4.3

Location: http://docs.mongodb.org/manual/reference/mongooplog/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22
Referrer: https://www.google.com/
Screen Resolution: 1920 x 1080
repo: docs
source: reference/mongooplog


Issue Links:
Duplicate
duplicates TOOLS-169 mongooplog should not take --db or --... Closed
Related
Participants:
Days since reply: 10 years, 41 weeks, 2 days ago

 Description   

Documentation page has an example of using --database option

mongooplog  --from mongodb0.example.net --host mongodb1.example.net --database people --collection usage

Stating

In the next command, the parameters limit this operation to only apply operations to the database people in the collection usage on the target host (i.e. mongodb1.example.net):

But the option does not work - I guess "-database" has been renamed to "-db":

$ mongooplog --from 127.0.0.1:20000 --port 20010 --database d01
ERROR: unknown option database

Unfortunately when db is used the mongooplog does not act as described - it applies changes to all database - not only the one specified:

Add doc to replica set "rs0" database "d02"

rs0:PRIMARY> use d02
switched to db d02
rs0:PRIMARY> db.data.save({a:"02"})

Apply oplog from rs0 to rs1 limiting to database 'd01' - change in d02 should not be replicated

mongooplog --from 127.0.0.1:20000 --port 20010 -d d01

but it appears on rs1 after that.

rs1:PRIMARY> use d02
switched to db d02
rs1:PRIMARY> db.data.find()
{ "_id" : ObjectId("5182929363576b32f0144132"), "a" : "02" }

Reporter: Sergei
E-mail: sbobovich@gmail.com



 Comments   
Comment by auto [ 06/May/13 ]

Author:

{u'date': u'2013-05-06T20:16:52Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1472 removing stale example.
Branch: master
https://github.com/mongodb/docs/commit/27fddc1836cff0ddd539dcd57490d17d0ac25ee9

Comment by auto [ 06/May/13 ]

Author:

{u'date': u'2013-05-06T20:16:52Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1472 removing stale example.
Branch: v2.2
https://github.com/mongodb/docs/commit/8a826219d269d43e2837a22f0681047ee4390593

Generated at Thu Feb 08 07:41:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.