Compare commits

...

356 Commits

Author SHA1 Message Date
Ernie Hershey
255f67a66f BUMP 2.6.3 2014-06-19 16:19:09 -04:00
Jason Rassi
3d19c459fe SERVER-14302 SERVER-14304 Fix IDHackRunner's use of sharding filter
(backport of 6fe6dee814)
2014-06-19 15:10:44 -04:00
Ernie Hershey
e10d2a68be post 2.6.2 2014-06-19 11:26:11 -04:00
Dan Pasette
4d06e27876 BUMP 2.6.2 2014-06-15 10:23:35 -04:00
Ernie Hershey
9f566f7fc4 post 2.6.2-rc1 2014-06-08 22:35:58 -04:00
Dan Pasette
e017d55474 BUMP 2.6.2-rc1 2014-06-07 15:27:02 -04:00
Eric Milkie
f65ef0b5c2 SERVER-14186 check for ismaster under write lock
We need to check master-ness under a write lock before doing a logOp() or else
the server might shut down.
2014-06-06 17:59:32 -04:00
David Storch
5dfc754e10 SERVER-13337 support queries with projections in the idhack runner
(cherry picked from commit 10d8b3d798)

Conflicts:
	src/mongo/db/query/idhack_runner.cpp
2014-06-06 17:16:50 -04:00
David Storch
3f661319e5 SERVER-14174 enforce ntoreturn during plan ranking 2014-06-06 16:51:58 -04:00
Greg Studer
90d6761433 SERVER-14138 fix shard key targeting tests backported from v2.7 2014-06-06 11:48:08 -04:00
David Storch
f8294a1310 SERVER-14176 query planner should obey $natural sort
(cherry picked from commit 89383b224f)
2014-06-06 11:44:44 -04:00
David Storch
e52e4e2deb SERVER-14180 fix double free in access planning for $elemMatch
(cherry picked from commit 2453cec627)
2014-06-06 10:57:09 -04:00
Greg Studer
03c83b9748 SERVER-14138 mongos incorrectly targets multiple shards for nested field shard keys
(cherry picked from commit 777de742ee)

Conflicts:
	jstests/sharding/hash_regex_targetting.js
2014-06-05 19:24:55 -04:00
matt dannenberg
3b612717c5 SERVER-13582 another attempt to fix server6733.js
(cherry picked from commit b32f849719)
2014-06-03 16:01:31 -04:00
Ernie Hershey
ac797bc824 post 2.6.2-rc0 2014-06-03 07:48:23 -04:00
Ernie Hershey
b064102f7c BUMP 2.6.2-rc0 2014-06-02 14:28:22 -04:00
Dan Pasette
778c80e455 SERVER-14082: freelist scan does not short circuit in MaxBucket 2014-06-01 11:15:20 -04:00
Greg Studer
6dc02ec1d0 SERVER-13865 handle edge case for v2.4 when upserted _id not returned
(cherry picked from commit 090ea9a5ad)
2014-06-01 10:44:03 -04:00
David Storch
5900e7a031 SERVER-13960 bug fixes for OR with inexact predicates
(cherry picked from commit 3242afb803)
2014-06-01 10:29:06 -04:00
David Storch
3f02f1a6a1 SERVER-13960 fix access planning for OR with inexact child predicates
Includes a refactor of QueryPlannerAccess::processIndexScans(...) which makes this
change saner.

(cherry picked from commit bee249ac89)
2014-06-01 10:28:56 -04:00
matt dannenberg
2eb48801e1 SERVER-10462 retry file deletes until the file is no longer being used by another process in testing on windows
(cherry picked from commit f9be10ecca)
2014-06-01 10:27:47 -04:00
Shaun Verch
ad9df9f23b SERVER-13760 Do not call dateToISOString if date is not formatable
(cherry picked from commit 99fa4e6058)
2014-05-30 14:49:02 -04:00
matt dannenberg
c73f7c12cd SERVER-14092 ignore local.replset.minvalid in upgradeChecker
(cherry picked from commit 79c5492d92)
2014-05-30 13:22:22 -04:00
David Storch
b1950f5fa7 SERVER-14064 provide planSummary for slow count commands 2014-05-30 08:50:31 -04:00
Anil Kumar
fa7af2e2b3 SERVER-13950 fix the dependencies in rpm packaging
Signed-off-by: Benety Goh <benety@mongodb.com>
2014-05-29 18:13:02 -04:00
David Storch
8f8192fa73 SERVER-14073 allow planSummary string to be longer
(cherry picked from commit d4a54eddde)
2014-05-29 17:41:15 -04:00
Jason Rassi
6a8781ee93 SERVER-14056 Cross-DB renameCollection needs to call commitIfNeeded
Fixes regression introduced in 0abf27ae.

Before 0abf27a, renameCollection used a DBDirectClient to read objects
from the source namespace.  The call to DBClientCursor::next() would
issue a getmore after finishing each batch, which would reach a commit
point (in DBDirectClient::call()).  The port to the new collection
interface removed the use of DBDirectClient, which removed
renameCollection's commit point.

(cherry picked from commit b27a764852)

Conflicts:
    src/mongo/db/commands/rename_collection.cpp
2014-05-28 16:54:21 -04:00
Shaun Verch
6646cd2d72 SERVER-13446 Add timegm Solaris implementation to third_party
(cherry picked from commit 1ec7a22e8b)

Conflicts:
	src/third_party/SConscript
2014-05-27 17:37:00 -04:00
Dan Pasette
c02fb34f01 SERVER-13737 CollectionOptions parser skip size/max if non-numeric
(backport 0a0ba03062)
2014-05-24 22:50:15 -04:00
matt dannenberg
9a9b2e504d SERVER-13993 log the decision to change sync targets
(cherry picked from commit e84c75764b)
2014-05-24 20:10:25 -04:00
Kamran Khan
03f395347f SERVER-13494 Use numeric sorting for versions in the multi-version script
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit 8cc8ec7cd4)
2014-05-24 20:08:32 -04:00
Randolph Tan
93dda51140 SERVER-13587 ndeleted in system.profile documents reports 1 too few documents removed
(cherry picked from commit 6c2cfda2d6)
2014-05-24 20:07:00 -04:00
Andreas Nilsson
28f06d9343 SERVER-13612 Send list of allowed SSL CAs to clients
(cherry picked from commit 1be16d8968)
2014-05-24 20:04:08 -04:00
Dan Pasette
213700b3af SERVER-13675 do not cache plans if there is a tie
(backport of 7dcbdc440a)
2014-05-24 19:59:19 -04:00
Ernie Hershey
87fd9929f9 SERVER-13862 Remove old package names from rpm Conflicts field
This is a small change removing the equivalent old package name
from every stable community and enterprise rpm Conflicts field

(cherry picked from commit bf66780fec)
2014-05-24 19:45:56 -04:00
Jason Rassi
57bd9bd1d6 SERVER-13976 Cloner::go() fail fast if any collection has bad options
(cherry picked from commit 7fced83ca5)
2014-05-24 19:38:05 -04:00
Jason Rassi
c86d218c92 SERVER-13976 Cloner::go() should check return value of userCreateNS
(cherry picked from commit f89e280ef9)

Conflicts:
	src/mongo/db/cloner.cpp
2014-05-24 19:37:38 -04:00
Andreas Nilsson
81b9d6df4f SERVER-13945 Match x.509 cluster certs per attribute
(cherry picked from commit 81967a2dce)
2014-05-23 14:57:13 -04:00
Mathias Stearn
7c75cf1da8 SERVER-13981 MR inc collection should not be replicated
Introduced in commit 8416afb7c5. Prior to that,
the collection was not replicated.

(cherry picked from commit 65ca787cfe)
2014-05-21 15:43:33 -04:00
Shaun Verch
384e8e3229 SERVER-13954 Add scriptingEnabled option to YAML config
(cherry picked from commit 86d6043139)

Conflicts:
	src/mongo/db/mongod_options.cpp
2014-05-20 17:59:15 -04:00
Eric Milkie
812af45b31 SERVER-14000 fix debian 7.1 by adding new lsb file location
(cherry picked from commit 2a0fd61c1b)
2014-05-20 13:56:05 -04:00
Shaun Verch
013e21bbe5 SERVER-13603 Move option testing support code into shared test helper
(cherry picked from commit f7d78f9511)
2014-05-16 20:00:07 -04:00
matt dannenberg
195a67eec3 SERVER-10464 allow mongodump to dump oplog without a query containing a ts field
(cherry picked from commit 50045df214)
2014-05-16 19:56:40 -04:00
Spencer T Brody
0366e4a862 SERVER-13972 Make connections_opened.js test retry any connections that fail to connect
(cherry picked from commit b64939f3ac)
2014-05-16 15:35:31 -04:00
matt dannenberg
0ef9bcd431 SERVER-13839 circumvent reconfig in sync2.js
(cherry picked from commit 0779e3a8ed)
2014-05-16 14:43:48 -04:00
Siyuan Zhou
ef0072b437 SERVER-13812 Catch exception thrown by getShardsForQuery for geo query
(cherry picked from commit 16169267c6)
2014-05-16 14:12:45 -04:00
David Storch
f076d57d42 SERVER-13890 index bounds builder should not pass already-constructed intervals to translate()
(cherry picked from commit d19801d620)
2014-05-15 20:21:08 -04:00
Jason Rassi
2cebdd054c SERVER-13899 Forbid whole index scan on plugin index to provide sort
(cherry picked from commit a6a0c243b6)
2014-05-15 20:14:57 -04:00
David Storch
c26b53eaf6 SERVER-13337 lite parsed query should set _showDiskLoc
(cherry picked from commit b0c0f83c4c)
2014-05-15 20:12:21 -04:00
James Wahlin
3fa0ec160d SERVER-13794 - only start snapshot thread on isHttpInterfaceEnabled
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit 3926d4db3a)
2014-05-15 20:01:39 -04:00
David Storch
4649c7185d SERVER-13754 explode OR solutions for sort
(cherry picked from commit 4fd34d5272)
2014-05-15 19:58:56 -04:00
Sean Wilkinson
d08a911f0d SERVER-13037 Fix misspelling ("compatability" to "compatibility")
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit e77625d394)
2014-05-15 19:56:52 -04:00
David Storch
8b326cb33c SERVER-13752 do not attempt to explode for sort with empty bounds
(cherry picked from commit 1f83b5f5e3)
2014-05-15 19:55:34 -04:00
David Storch
de14e3eed4 SERVER-13789 recursively build data access for subnodes beneath elemMatch
(cherry picked from commit eb97470c05)
2014-05-15 19:51:54 -04:00
David Storch
c2d90aad65 SERVER-13687 fix plan enumeration for compound multikey 2d or 2dsphere indices 2014-05-15 19:36:49 -04:00
Randolph Tan
f791b9d401 SERVER-13616 "type 7" (OID) error when acquiring distributed lock for first time
(cherry picked from commit 6254a575a9)
2014-05-15 19:35:38 -04:00
David Storch
bf471cd8e2 SERVER-13715 fix use of auto_ptr after release in subplan runner
(cherry picked from commit 193aba81f1)
2014-05-15 19:31:40 -04:00
David Storch
652d7a4c95 SERVER-13715 plan subqueries on construction of a SubplanRunner
This enforces the error behavior expected by aggregation.
(cherry picked from commit 20263ce4e9)
2014-05-15 19:31:06 -04:00
matt dannenberg
0661a4fa33 SERVER-13750 prevent invariant failure when ConvertToCappeding a nonexistent collection
(cherry picked from commit ff276366a8)
2014-05-15 19:25:28 -04:00
David Storch
5f50fe901b SERVER-13731 make depth limit in parsing work for deep trees other than AND and OR
(cherry picked from commit 78c850d9c5)
2014-05-15 19:16:10 -04:00
Spencer T Brody
adc534fcdd SERVER-13588 Fix regression in supression of startup warning when unauthorized
(cherry picked from commit 177d92b10d)
2014-05-15 19:15:16 -04:00
Scott Hernandez
68ae4983b1 SERVER-13368: Expose microsecs_running in currentOp
(cherry picked from commit 9dc581691b)
2014-05-15 19:11:09 -04:00
Eliot Horowitz
4a92104637 SERVER-13802: fix insert validation with timestamps
(cherry picked from commit 3061ab54eb)
2014-05-15 18:57:33 -04:00
Hari Khalsa
faaffb7477 SERVER-13714 fix enumeration of non-top-level indexed negations
(cherry picked from commit 38711ac013)
2014-05-15 18:48:11 -04:00
David Storch
8269033174 SERVER-13852 initialize IndexBounds::endKeyInclusive in constructor
(cherry picked from commit bd223e14fe)
2014-05-15 18:47:17 -04:00
Spencer T Brody
36a4358750 SERVER-13868 Mark V1 users as probed on databases that they do not have surrogate user docs on
(cherry picked from commit d900470dc3)
2014-05-15 18:45:27 -04:00
Amalia Hawkins
9436cd6cc5 SERVER-13804 add necessary privilege to the built-in restore role
(cherry picked from commit b1e42ae09d)
2014-05-15 18:40:37 -04:00
Amalia Hawkins
36cd42c86d SERVER-13727 add collStats permission to builtin backup role
(cherry picked from commit 24aeb85159)
2014-05-15 18:03:31 -04:00
matt dannenberg
def6f6952a SERVER-13948 improve stability of replsettest.awaitReplication() while getting the config version from master
(cherry picked from commit 2332856f03)
2014-05-15 18:00:48 -04:00
Spencer T Brody
a07574aaa7 SERVER-13850 Make sure cache entry is up to date before using it to update a user
(cherry picked from commit 06033e18fb)
2014-05-15 17:39:42 -04:00
Jason Rassi
28bab16469 SERVER-13769 QueryPlanner::plan() has to clear tags from query tree
(cherry picked from commit 8d48e78590)
2014-05-15 17:32:20 -04:00
Jason Rassi
8ff445004b SERVER-13769 geo_distinct.js: rewrite, add test cases
(cherry picked from commit 066ee29fd2)
2014-05-15 17:32:11 -04:00
Greg Studer
945ed48cc7 SERVER-11332 hookup of fastest query to SyncClusterConnection
(cherry picked from commit d2e4b7d17a)
2014-05-15 14:23:15 -04:00
Greg Studer
fef6805061 SERVER-11332 multi host query from fastest host using thread pools
(cherry picked from commit f8f57002f7)
(cherry picked from commit db7e5996c7)
2014-05-15 14:23:14 -04:00
Greg Studer
261a158b87 SERVER-11332 minor cleanup of SCC and chunk diff timeout
(cherry picked from commit ac43ecd3c5)
2014-05-15 14:23:14 -04:00
Greg Studer
1e9944fbed SERVER-11332 ConnectionString less-than for simpler use in maps
(cherry picked from commit 0e3d441093)
2014-05-15 14:23:14 -04:00
Andreas Nilsson
c22fbc9bc6 SERVER-13573 Fix x.509 auth exception
(cherry picked from commit c151e0660b)
2014-05-08 22:39:14 -04:00
Ernie Hershey
ac19511d67 SERVER-13724 Add --disable-warnings-as-errors scons option
This change was prompted by attempts to build 2.6.0 in SLES 10 with
its system gcc version 4.1.2. It builds fine other than a sole
warning - src/third_party/boost/boost/thread/detail/thread.hpp:316:
warning: type attributes are honored only at type definition. It
should also help in cases where compilers are too new.
(cherry picked from commit 27c128d303)
2014-05-08 15:29:21 -04:00
Matt Kangas
2ff4d735d3 SERVER-13712 fix fedora8 builders (python 2.5.1)
(cherry picked from commit 630944421e)
2014-05-08 09:05:19 -04:00
Matt Kangas
71534242a3 SERVER-13712 cleanbb should clean entire /data/db dir
Invoke cleanbb via function call, not subprocess.

clean_dbroot() now cleans entire /data/db if --with-cleanbb specified,
including periodic cleanups.

(cherry picked from commit ab47b0b217)
2014-05-08 09:05:19 -04:00
Matt Kangas
b267b2824e SERVER-13712 smoke.py --clean-every=N option
(cherry picked from commit 8cd645a8fa)
2014-05-08 09:05:19 -04:00
matt dannenberg
71e4c210ec SERVER-13723 fix flakiness in tags.js by increasing timeout
(cherry picked from commit 1d6e368b17)
2014-05-05 08:39:03 -04:00
Ernie Hershey
798f6c9a3c post 2.6.1 2014-05-05 08:18:15 -04:00
Dan Pasette
4b95b086d2 BUMP 2.6.1 2014-05-04 22:29:43 -04:00
Ernie Hershey
9568d9c60a post 2.6.1-rc1 2014-04-30 19:28:28 -04:00
Ernie Hershey
44a476ab53 BUMP 2.6.1-rc1 2014-04-30 11:58:56 -04:00
David Storch
6a900b9d4f SERVER-13677 traverse through ALL when finding predicates inside elemMatch object
(cherry picked from commit 54bdb39ba6)
2014-04-30 10:36:30 -04:00
Randolph Tan
fce2652dca SERVER-13777 migrated ranges waiting for deletion do not report cursors still open
(cherry picked from commit b36527b186)
2014-04-30 10:35:23 -04:00
Jason Rassi
83460112e7 SERVER-13766 SubplanRunner::kill() needs to clear _collection
For all child classes of Runner, implementations of Runner::kill()
must guarantee the postcondition that subsequent calls to
Runner::collection() will return NULL.  SubplanRunner:kill() was not
meeting this contract.

(cherry picked from commit 1d98478d9d)
2014-04-30 07:56:41 -04:00
Eliot Horowitz
2516d36768 SERVER-13739: don't delete new files until as late as possible during repair 2014-04-30 05:59:26 -04:00
Mark Benvenuto
116d7d799a move tests from noPassthrough to slow2
(cherry picked from commit 84022c1f5a)
2014-04-22 15:07:42 -04:00
Ernie Hershey
ed241301e5 post 2.6.1-rc0 2014-04-22 11:59:10 -04:00
Ernie Hershey
a7f5949776 BUMP 2.6.1-rc0 2014-04-21 15:54:59 -04:00
Hari Khalsa
246bfa4e9c SERVER-13666 check that lat/lng are in bounds for near queries even if point is legacy
(cherry picked from commit 3286b208b3)
2014-04-21 13:59:02 -04:00
David Storch
66da6ee14e SERVER-13661 increase the maximum allowed depth for query objects
(cherry picked from commit a4fc6b3267)
2014-04-21 13:53:46 -04:00
David Storch
e17c3e6dc0 SERVER-13664 never detach filters from inside elemMatch object
(cherry picked from commit 15bd7092e0)
2014-04-21 13:53:23 -04:00
Eric Milkie
14e0ba91a9 SERVER-13620 update fassert code 2014-04-21 11:19:22 -04:00
Eric Milkie
d4a70e8891 Revert "SERVER-13582 increase stability of server6733.js by retrying replSetSyncFrom"
This reverts commit a386aa6036.

Test is failing on Windows platforms after attempt to make it more reliable.
2014-04-21 10:46:00 -04:00
Andy Schwerin
070d58c191 SERVER-13620 When applying operations from the oplog, wait for background operations to complete as necessary. 2014-04-18 17:33:29 -04:00
Andy Schwerin
9ad97ac9fd SERVER-13620 Refactor background.h/cpp; add awaitNoBgOp methods. 2014-04-18 17:33:29 -04:00
Andy Schwerin
d4b1e9e2e5 SERVER-13620 Make indexbg_drop.js expose the bug. 2014-04-18 17:33:29 -04:00
Ernie Hershey
7303d9b39a SERVER-13563 Add old package names to RPM Provides and Conflicts
This is two changes for every package and sub-package of both
community and enterprise:
1) Add the equivalent old package name to each package's Provides
field
2) Add the equivalent old package name to each apckage's Conflicts
field.

Tested scenarios that should work:
* Upgrading from 2.4.10 (Vs. uninstalling then installing)
* Installing sub-packages with new name
* Installing sub-packages with old name
* Installing metapackage with new name
* Installing metapackage with old name
* Installing old versions of packages using new --exclude
  mongodb-org,mongodb-org-server syntax
* Installing third party package that depends on old package name
  (new packages were automatically installed)

(cherry picked from commit 019c401589)
2014-04-18 17:02:58 -04:00
matt dannenberg
4a3e38949a Revert "SERVER-13601 assert upon failing to run a replicated command"
This reverts commit ea2102c194.
2014-04-18 08:41:03 -04:00
Shaun Verch
52faaa32ef SERVER-13644 Fix command line censorship
(cherry picked from commit b1d30046c7)
2014-04-18 12:02:23 -04:00
Shaun Verch
e83de252ba Revert "SERVER-13644 Fix command line censorship"
This reverts commit 44da20890f.
(cherry picked from commit 65213714da)
2014-04-17 18:01:11 -04:00
Shaun Verch
791fcf4495 SERVER-13644 Fix command line censorship
(cherry picked from commit 44da20890f)
2014-04-17 17:01:19 -04:00
Eliot Horowitz
e1f859d6ae add logging for when file allocation from ExtentManager takes more than 1 second 2014-04-17 16:45:15 -04:00
David Storch
eeef3c3ded SERVER-13618 explode for sort tries reversing index scan direction
(cherry picked from commit ce52f313ca)
2014-04-17 13:26:47 -04:00
Wisdom Omuya
a093bfa703 SERVER-13287 delegate to shell when compressing tar archives
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit b34245c1ff)
2014-04-17 11:25:24 -04:00
Eric Milkie
8d2e6aab88 SERVER-13496 do not abort replication on secondaries when index name conflicts (via 2.4.9)
(cherry picked from commit 0fbd76d233)

Conflicts:
	src/mongo/base/error_codes.err
2014-04-17 09:05:14 -04:00
David Storch
c27685781d SERVER-13611 fix sort elimination in the case of trailing fields
(cherry picked from commit 9ec25e399f)
2014-04-17 09:00:49 -04:00
Ernie Hershey
644f645248 SERVER-13563 Add old package names to RPM Obsoletes
(cherry picked from commit 8bbe304cde)
2014-04-16 16:35:50 -04:00
Eric Milkie
f70518f887 SERVER-13589 logOp inserts into system.indexes for index builds
(cherry picked from commit 430cd62d0d)
2014-04-16 13:44:45 -04:00
matt dannenberg
ea2102c194 SERVER-13601 assert upon failing to run a replicated command 2014-04-16 06:33:08 -04:00
Siyuan Zhou
c18511e8ec SERVER-13534 Remove data in test array_shard_key.js
(cherry picked from commit 122aaea710)
2014-04-16 10:57:43 -04:00
Spencer T Brody
adbc29e06e SERVER-13441 getUser and getRole shell helpers shouldn't throw when user/role not found
(cherry picked from commit abf252cfe8)
2014-04-16 10:56:41 -04:00
matt dannenberg
9d7f0555fc SERVER-13512 add mr_drop.js to the skipTests in parallelTester.js
(cherry picked from commit 9ca0f44235)
2014-04-16 10:55:11 -04:00
Greg Studer
6ea3fac317 SERVER-13577 geo_borders.js immediately catches own assertions
(cherry picked from commit 4ded21c8fa)
2014-04-16 10:51:22 -04:00
Siyuan Zhou
f621320bee SERVER-13579 Wait for deletion after migration in feature2.js
(cherry picked from commit b3aaf2e580)
2014-04-16 10:49:15 -04:00
Benety Goh
b39c5ee1ea SERVER-13503 disallow $where under $elemMatch value
(cherry picked from commit 5aac10481a)
2014-04-16 10:14:15 -04:00
Greg Studer
f0e41e169c SERVER-13540 take CRS into account for output distances as well as input
(cherry picked from commit 132a84108f)
2014-04-16 10:04:10 -04:00
David Storch
12279052c8 SERVER-13566 oplog start stage uses only 'ts' field as a filter
(cherry picked from commit 29d7dcd55a)
2014-04-15 18:44:28 -04:00
Andreas Nilsson
5636fd6504 SERVER-13561 Improve wire API message validation
(cherry picked from commit 1490a4f30f)
2014-04-15 18:44:28 -04:00
David Storch
1b7b02db89 SERVER-13562 limit and skip stages no longer return eof without calling work() on the child
Doing so could cause missing results for a tailable cursor.

(cherry picked from commit 9d1f365bf8)
2014-04-15 18:44:27 -04:00
matt dannenberg
a386aa6036 SERVER-13582 increase stability of server6733.js by retrying replSetSyncFrom
(cherry picked from commit 9c39dd9b7b)
2014-04-15 18:44:27 -04:00
David Storch
ccb02e83df SERVER-13557 disallow negated elemMatch value from using an index scan
(cherry picked from commit 45cf39c95d)
2014-04-14 13:40:51 -04:00
David Storch
9f1ef97401 SERVER-13537 better handle numerical overflow of large limit values
(cherry picked from commit 3e4b947474)
2014-04-14 13:40:51 -04:00
Spencer T Brody
279163e380 SERVER-9358 Prevent logRotate twice in the same second from losing log data
(cherry picked from commit d53521c953)
2014-04-14 13:40:51 -04:00
Greg Studer
52da235706 SERVER-13518 break child batches up by size or number of documents
(cherry picked from commit 0b1994a25c)

Also includes SERVER-13518 make sure all tested updates are valid with update exprs
(cherry picked from commit 836b1d8281)
2014-04-14 10:48:20 -04:00
Greg Studer
b14b921ba3 SERVER-13518 generate _ids in write batches if not set in mongos
(cherry picked from commit 4b589d8aab)
2014-04-14 10:47:49 -04:00
matt dannenberg
be1905c24c SERVER-13500 prevent syncSourceFeedback segfault by not allowing NULL members to be added to _members map
(cherry picked from commit ba3823f2a7)
2014-04-10 11:48:15 -04:00
Hari Khalsa
a280cb5a78 SERVER-13489 move possible disk access out of index cursor ctor
(cherry picked from commit ae2dc0a937)
2014-04-10 11:48:15 -04:00
Hari Khalsa
f5544e542d SERVER-13489 move disk reading out of index scan ctor
(cherry picked from commit 5f3174ac46)
2014-04-10 11:48:15 -04:00
Andrew Morrow
758f9f60ff SERVER-13516 When failing to bulk right copy don't access rep after resolving
(cherry picked from commit e5be760537)
2014-04-09 18:54:21 -04:00
Shaun Verch
2af46bcef9 SERVER-13515 Check canonicalized version of logpath in Windows service startup
(cherry picked from commit b5c283687c)
2014-04-09 18:54:21 -04:00
Hari Khalsa
ac55e3f5a9 SERVER-13486 check obj size when building return of geonear cmd
(cherry picked from commit b4a2cc96b1)
2014-04-09 18:54:21 -04:00
matt dannenberg
d2030ec679 SERVER-13507 increased stability of stepdown_wrt_electable.js by altering its use of parallel shells
(cherry picked from commit 8784c38f82)
2014-04-09 18:54:21 -04:00
Eliot Horowitz
1bdf9bb511 SERVER-13495: fix ClientCursor::_pinValue concurrency
(cherry picked from commit 97bead396f)
2014-04-09 18:40:08 -04:00
matt dannenberg
8cb4c299ca SERVER-13477 make rollback5.js less likely to fail due to its assumption about which node is primary
(cherry picked from commit acc0407833)
2014-04-09 18:40:08 -04:00
Kamran Khan
a9587732dc SERVER-13466 Use correct namespace in write error when collection creation fails
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit 56136a9d8f)
2014-04-09 18:40:07 -04:00
Siyuan Zhou
ba1b569cd9 SERVER-13462 Ignore orphan docments in sharding_migrate_cursor1.js
(cherry picked from commit 789097cb18)
2014-04-09 18:40:07 -04:00
matt dannenberg
6850ecf70c SERVER-13203 replset2.js no longer swallows exceptions or assertions
(cherry picked from commit 42e199594d)
2014-04-09 18:40:07 -04:00
David Storch
423ebc231a SERVER-13066 allow negations to use multikey indices
(cherry picked from commit 7aa932a23f)
2014-04-09 18:40:07 -04:00
Randolph Tan
337729f2d0 SERVER-12638 Sharding chunks ranges overlap
(cherry picked from commit bc26f73ef6)
2014-04-09 18:40:07 -04:00
Eric Milkie
ffa99f0d36 SERVER-13499 bulk insert check for yield less often
(cherry picked from commit 68d42de9a9)

Conflicts:
	src/mongo/db/commands/write_commands/batch_executor.cpp
2014-04-09 11:00:22 -04:00
Ernie Hershey
b588b9fccc post 2.6.0 2014-04-07 17:31:26 -04:00
Ernie Hershey
1c1c76aeca BUMP 2.6.0 2014-04-06 20:36:57 -04:00
Ernie Hershey
8a71a071e5 post 2.6.0-rc3 2014-04-02 18:07:49 -04:00
Greg Studer
bafd9c7e0e SERVER-13459 migration rollback needs to use original metadata
(cherry picked from commit 9b65ac6d43)
2014-04-02 11:04:58 -04:00
Dan Pasette
8e82f5620a BUMP 2.6.0-rc3 2014-04-02 06:31:10 -04:00
Dan Pasette
4bed1574b0 Revert "SERVER-13383 validateKeyPattern allow only numeric/string key types"
This reverts commit b48e15efdd.
2014-04-02 06:30:38 -04:00
Jason Rassi
65b84b79e5 SERVER-12242 SERVER-12244 Fix typo in compact/reIndex error messages
The error messages originally were incorrectly swapped with one
another.

(cherry picked from commit df0236cab0)
2014-04-02 02:26:41 -04:00
Eliot Horowitz
91e679c210 SERVER-12550: use Context instead of ReadContext and don't check shard version
this happens later
2014-04-01 23:51:28 -04:00
Greg Studer
f93d14738c SERVER-13448 broadcast updates/deletes to all shards when more than one targeted
(cherry picked from commit 9b17edd15f)
2014-04-01 20:30:27 -04:00
Andy Schwerin
c7a673410e SERVER-13429 Update exit_logging.js to also test mongos exit logging.
(cherry picked from commit 9e041ccf43)
2014-04-01 20:04:12 -04:00
Mathias Stearn
261233b6c1 SERVER-13429 unify signal handling between mongos and mongod
(cherry picked from commit ad91eb0f75)
2014-04-01 19:44:05 -04:00
Mathias Stearn
019f0ccc9e SERVER-13429 Remove printStackAndExit
All of the functions in signal_handlers.cpp were broken when logfiles or
syslog were in use. This commit removes them and all callers. The files were
left in place for a later commit to fill them back in with a unified signal
handling system.

(cherry picked from commit 11e43325fa)
2014-04-01 19:44:05 -04:00
Mathias Stearn
fda2dca224 SERVER-13429 Eliminate rawOut and related functions
(cherry picked from commit 4e1eccfe64)
2014-04-01 19:44:05 -04:00
Andy Schwerin
2013b68ddd SERVER-13429 Use logging system in mongod signal handlers, test exit logging.
Still not really safe for signal handlers, but no worse than before,
and correctly logs to the log file/syslog, so an improvement.

(cherry picked from commit f4e6aa9ee7)
2014-04-01 19:44:05 -04:00
Shaun Verch
7ad0dc7be0 SERVER-13379 Fixing parsed naming of jsonp option in mongos
(cherry picked from commit 7863f05cb1)
2014-04-01 16:24:47 -04:00
Shaun Verch
62d38e779a SERVER-13438 Handle syslog case of systemLog.destination properly
(cherry picked from commit 9d2e260f32)
2014-04-01 16:23:36 -04:00
Scott Hernandez
1d338b82d6 SERVER-10325: support system and user flags for mongos collstats
(cherry picked from commit cfd144275d)
2014-04-01 13:52:41 -04:00
Eric Milkie
9b86a61a28 SERVER-13431 _me should not reference mmapped memory
(cherry picked from commit 54123be0d6)
2014-04-01 11:30:52 -04:00
Eric Milkie
d2eedb1dda SERVER-13435 do not run dropdb_race.js in smalloplog
(cherry picked from commit cffd39b33f)
2014-04-01 11:30:52 -04:00
Greg Studer
b3c2e5171b SERVER-13410 metadata changes in dblock
(cherry picked from commit c4f3416806)
2014-04-01 11:04:01 -04:00
matt dannenberg
9d9fcde865 SERVER-13420 remove syncSourceFeedback connection management from the notifier thread
(cherry picked from commit 26f3c3140d)
2014-04-01 03:28:00 -04:00
David Storch
67ec5c5b29 SERVER-13422 fix planning bug for elemMatch object index intersection
(cherry picked from commit 58f603c00d)
2014-03-31 18:19:20 -04:00
Shaun Verch
7ac1d21273 SERVER-13423 Rename security.sasl.authenticationMechanisms to security.authenticationMechanisms
(cherry picked from commit ae59693a8b)
2014-03-31 17:30:49 -04:00
Randolph Tan
1aa9b7b374 SERVER-13415 Strict validation of j / fsync to be boolean is backwards-breaking for some drivers 2014-03-31 15:48:02 -04:00
Shaun Verch
4f5e71237a SERVER-13416 Change security.authentication to security.authorization in comment
(cherry picked from commit 57be00c6bb)
2014-03-31 14:27:44 -04:00
Shaun Verch
6016ef6ba4 SERVER-13416 Rename security.authentication to security.authorization
(cherry picked from commit 6c38102c43)
2014-03-31 13:59:58 -04:00
Greg Studer
2927031d37 SERVER-13413 profiling should not do version checks against op namespace
(cherry picked from commit 7ccb298ff2)
2014-03-31 13:35:36 -04:00
Greg Studer
a12d09c975 SERVER-13374 change connection pool defaults
(cherry picked from commit f71610672b)
2014-03-31 11:48:45 -04:00
Hari Khalsa
9de22c408e SERVER-13406 don't extract invalid index assignments from OR subplan when it indexed sorts 2014-03-31 10:16:57 -04:00
Hari Khalsa
eea49e2e48 SERVER-13406 add debugging for OR sub-planner 2014-03-31 10:16:52 -04:00
Eliot Horowitz
ee42f85b2c SERVER-12550: insert has 3 phases:
a) outside of lock generate keys
  b) inside lock touch btree pages
  c) do insert
2014-03-30 13:01:13 -04:00
Mathias Stearn
7810679187 Increase oplog size for test
(cherry picked from commit 192fd947da)
2014-03-30 12:42:58 -04:00
Mathias Stearn
2ed3157c0c SERVER-13336 IndexUpdateTests: Only try to kill index builds
Now that counts can yield, they can be killed. The killAll() calls above were
not intended to effect the counts.

(cherry picked from commit 00c8264c88)
2014-03-30 12:42:56 -04:00
Matt Kangas
b1ee91acf6 SERVER-13379 jstests that start servers can't live in core
(cherry picked from commit 91a7d38a6b)
2014-03-29 19:32:57 -04:00
Hari Khalsa
82f2df8b93 SERVER-10026 turn off fetches for oplog start hack tests until we make the tests less sensitive 2014-03-28 15:13:30 -04:00
Randolph Tan
fb2cf5e329 SERVER-13399 Increase timeout in server_status_metrics.js
(cherry picked from commit 92ed1aa3e0)
2014-03-28 15:03:21 -04:00
Matt Dannenberg
d0a29833d9 double initiate timeout in replSetTest class to avoid timeouts during tests
(cherry picked from commit f90b360d21)
2014-03-28 14:52:40 -04:00
Shaun Verch
8af90cc7e1 SERVER-13379 Canonicalize noAutoSplit as sharding.autoSplit
(cherry picked from commit a574286b4f)
2014-03-28 13:49:45 -04:00
Shaun Verch
f9841e0136 SERVER-13379 Ensure replication.replSet overrides replication.replSetName
(cherry picked from commit 3fe346dedc)
2014-03-28 13:49:45 -04:00
Shaun Verch
2f9a07b9aa SERVER-13379 Canonicalize noIndexBuildRetry as storage.indexBuildRetry
(cherry picked from commit 8d7e71c8c0)
2014-03-28 13:49:45 -04:00
Shaun Verch
a73fb4cab5 SERVER-13379 Canonicalize profile as operationProfiling.mode
(cherry picked from commit 6ddce18d5a)
2014-03-28 13:49:45 -04:00
Shaun Verch
9537c9c535 SERVER-13379 Canonicalize shardsvr and configsvr as sharding.clusterRole
(cherry picked from commit 1c2ec3d69b)
2014-03-28 13:49:44 -04:00
Shaun Verch
ce4afbc1c2 SERVER-13379 Canonicalize moveParanoia and noMoveParanoia as sharding.archiveMovedChunks
(cherry picked from commit 3973a76ece)
2014-03-28 13:49:44 -04:00
Shaun Verch
9c93634ccc SERVER-13379 Canonicalize sslOnNormalPorts as net.ssl.mode
(cherry picked from commit 0c9df5ceba)
2014-03-28 13:49:44 -04:00
Shaun Verch
0c1fa12980 SERVER-13379 Canonicalize logpath as systemLog.destination and systemLog.path
(cherry picked from commit 064fcf3fec)
2014-03-28 13:49:44 -04:00
Shaun Verch
0d2fe93ded SERVER-13379 Canonicalize verbose and v options as systemLog.verbosity
(cherry picked from commit 41d6c151f4)
2014-03-28 13:49:44 -04:00
Shaun Verch
f81b9676fa SERVER-13379 Canonicalize nounixsocket as net.unixDomainSocket.enabled
(cherry picked from commit 9f0e88d0a4)
2014-03-28 13:49:44 -04:00
Shaun Verch
1b9917b39c SERVER-13379 Canonicalize noprealloc as storage.preallocDataFiles
(cherry picked from commit c5f52ad447)
2014-03-28 13:49:44 -04:00
Shaun Verch
2005e174be SERVER-13379 Canonicalize httpinterface and nohttpinterface to net.http.enabled
(cherry picked from commit 0a6b69f8b2)
2014-03-28 13:49:44 -04:00
Shaun Verch
dcabd35e33 SERVER-13379 Canonicalize auth and noauth as security.authentication
(cherry picked from commit cbdf562d57)
2014-03-28 13:49:44 -04:00
Shaun Verch
7f6bf41fee SERVER-13379 Do not mark Environment as valid before canonicalization is done in mongos
(cherry picked from commit 9265798fae)
2014-03-28 13:49:44 -04:00
Shaun Verch
1b7fe7694c SERVER-13379 Canonicalize objcheck and noobjcheck as net.wireObjectCheck
(cherry picked from commit 086c913130)
2014-03-28 13:49:44 -04:00
Kamran Khan
3ca3effff3 SERVER-13394 Fix typo in jValue validation error message in WriteConcern constructor
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit e4c7d8dec2)
2014-03-28 13:22:34 -04:00
Siyuan Zhou
f2e8a05f84 SERVER-13386 Move tests with getPrevError to gle test suite
Ignore getPrevError in gle sharding test
Migrate geo_oob_sphere.js

(cherry picked from commit ec89a420a8)
2014-03-28 12:46:44 -04:00
Randolph Tan
1cfdc9f9e8 SERVER-13387 CreateIndexes command allows non shard key unique indexes to be created
(cherry picked from commit a924eeb893)
2014-03-28 11:40:44 -04:00
Hari Khalsa
32514385e1 SERVER-10026 fix size accounting in sort 2014-03-28 10:27:02 -04:00
Siyuan Zhou
2b63155333 Revert "SERVER-13386 Move tests with getPrevError to gle test suite."
This reverts commit 1e1d57093a.

getPrevError is not supported for sharded environments.
2014-03-28 00:51:53 -04:00
Shaun Verch
9298aabe18 SERVER-13372 Add parameter to not mark the Environment as valid
(cherry picked from commit 113d4a9e3d)
2014-03-27 19:37:17 -04:00
Shaun Verch
feaac6b426 SERVER-13372 Canonicalize dur, nodur, journal, nojournal and storage.journaling.enabled
(cherry picked from commit 17882d68d1)
2014-03-27 19:37:10 -04:00
Jason Rassi
dbb698b61a SERVER-13383 validateKeyPattern reject patterns w/ multiple plugins
(cherry picked from commit 04eda9bb1b)
2014-03-27 19:27:59 -04:00
Jason Rassi
b48e15efdd SERVER-13383 validateKeyPattern allow only numeric/string key types
(cherry picked from commit be9cd7b940)
2014-03-27 19:26:17 -04:00
Matt Kangas
70f7743138 SERVER-13269 general log message improvements for 2.6
(cherry picked from commit c27e46ecee)
2014-03-27 19:15:09 -04:00
Matt Kangas
4d24c0155e SERVER-13268 minor grammatical cleanup of stage_builder.cpp warnings
(cherry picked from commit 984fe4b418)
2014-03-27 19:15:09 -04:00
Matt Kangas
4692aaec6e SERVER-13267 change checkForIdIndexes recommendation to dochub link
(cherry picked from commit 502bb27fae)
2014-03-27 19:15:09 -04:00
Siyuan Zhou
020e64123f SERVER-13389 Migrate assert.gleXXX in jscore test suite
(cherry picked from commit 6412fa7eca)
2014-03-27 18:46:23 -04:00
Scott Hernandez
2f3c2123ac SERVER-13297: have 'smoke.py all' use jsCore instead of js
(cherry picked from commit 0798ac066e)
2014-03-27 18:35:49 -04:00
Greg Studer
e6f210813e SERVER-13388 explicitly use w:1 for upconverted writes from mongos
(cherry picked from commit 696fba3bc9)
2014-03-27 18:02:24 -04:00
Mathias Stearn
09ab197844 SERVER-13391 Move slowest tests from noPassthrough* (formerly slow{Weekly,Nightly}) to slow*
slow1 and slow2 are new suites to hold very slow tests. The idea is that we
can create slow3, slow4, etc to keep the time to run the longest suite down.

(cherry picked from commit 43d933a286)
2014-03-27 17:47:08 -04:00
Mathias Stearn
d061fb5f99 SERVER-13391 Rename slowNightly -> noPassthroughWithMongod and slowWeekly -> noPassthrough
This better represents their purpose and the difference between them.

(cherry picked from commit d0a1e84ab2)
2014-03-27 17:47:08 -04:00
Mark Benvenuto
4201130bb0 SERVER-13390: test.exe crash (core) on windows 64 2k8
(cherry picked from commit 39143d55a3)
2014-03-27 17:21:16 -04:00
David Storch
8bb2e09856 SERVER-13205 fix merging of special leaf nodes in access planner
(cherry picked from commit 719134aa79)
2014-03-27 17:18:08 -04:00
Siyuan Zhou
1e1d57093a SERVER-13386 Move tests with getPrevError to gle test suite.
Also migrate geo_oob_sphere.js

(cherry picked from commit 2850ecc726)
2014-03-27 17:08:55 -04:00
Hari Khalsa
5047fba16c SERVER-13349 collection scan should make fetch requests 2014-03-27 16:28:38 -04:00
Quentin Conner
df37f6c684 fix misspelling in assert
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit aa84f525eb)
2014-03-27 14:28:25 -04:00
Randolph Tan
39b2a80cf0 SERVER-13376 Make sync7.js less sensitive to delays
(cherry picked from commit 06c40ab0bb)
2014-03-27 13:48:15 -04:00
Scott Hernandez
af443fd3e7 SERVER-13373 - The insert ordered option is reversed in the shell
(cherry picked from commit 34bf20197d)
2014-03-27 12:05:57 -04:00
Hari Khalsa
9e94da3867 SERVER-13356 correct an error in processing geonear index assignments 2014-03-27 10:29:58 -04:00
Siyuan Zhou
98e464bc2a SERVER-13365 Disable balancer for geoNear sharding tests
(cherry picked from commit c6be2fcd03)
2014-03-26 16:38:29 -04:00
Mathias Stearn
7595193acb SERVER-13297 support both windows and posix path separators
Also removed legacy [!_] from js and jsCore globs.

(cherry picked from commit ed7c1769b5)
2014-03-26 15:58:49 -04:00
Randolph Tan
6d3cacf2bd SERVER-13191 migrate auth jstest suite to use write commands api
(cherry picked from commit 386f1b32ba)
2014-03-26 15:56:05 -04:00
Spencer T Brody
376a9b2836 SERVER-13281 Make getUser shell helper take extra arguments to usersInfo, just like the getRole helper does
(cherry picked from commit fd1ac5955a)
2014-03-26 14:28:54 -04:00
Mathias Stearn
2998dbfb20 Fix tests in jstests/core that use duplicate collection names
I used the following pipeline to find duplicates:
\grep -Ro '\<db\.[_a-zA-Z0-9$\.]*(\?'  jstests/core/ | awk 'BEGIN {FS=":"} {print $1 " " $2}'  | sed -e 's/\.\w\+(//g' | \grep -v ' db\(\.\($cmd\|system\..*\)\)\?$' | sort -k 2 | uniq | uniq -D -f 1 | awk '{print $2 "\t" $1}'

(cherry picked from commit 1bd05a191b)
2014-03-26 14:06:48 -04:00
Siyuan Zhou
63a0c2647e SERVER-12127 Migrate js tests added recently
(cherry picked from commit ecb7f241ec)
2014-03-26 14:02:50 -04:00
Siyuan Zhou
30fe38c527 SERVER-13350 Wait for moveChunk to delete orphan docments in sharding_migrate_cursor1.js
(cherry picked from commit 04bb7c24cd)
2014-03-26 14:02:44 -04:00
Mathias Stearn
b90627fb98 SERVER-2322 use correct collection name in test
(cherry picked from commit 5205b62d5c)
2014-03-26 12:50:50 -04:00
Scott Hernandez
007615e159 SERVER-13297: enable core suite for commands and add scons smokeJsCore test
(cherry picked from commit 01a5355e05)
2014-03-26 12:15:41 -04:00
Shaun Verch
51cd272bb6 SERVER-13310 Check error status for nested configuration data
(cherry picked from commit 67fcecca64)
2014-03-26 11:18:58 -04:00
Shaun Verch
8f5d4b3afe SERVER-13312 Fix type of operationProfiling.mode
(cherry picked from commit 997eedb256)
2014-03-26 11:18:37 -04:00
Scott Hernandez
7444a98bef SERVER-13297: remove dead jstests
(cherry picked from commit 57f97f2133)
2014-03-25 18:42:15 -04:00
Greg Studer
2c324c51b0 SERVER-13332 fix scary messaging around unsharded cursors
(cherry picked from commit e0867ea625)
2014-03-25 17:46:36 -04:00
Mathias Stearn
1502899e7f SERVER-13347 Clear execStats in OpDebug::reset()
(cherry picked from commit 23adfff477)
2014-03-25 17:13:40 -04:00
Gianfranco Palumbo
10c2badf2e SERVER-13266 log messages with typos
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit d238d44ac2)
2014-03-25 16:00:27 -04:00
Scott Hernandez
174f9bea00 SERVER-13297: convert parallel suite to use jsCore tests
(cherry picked from commit 835a7cc8ea)
2014-03-25 14:24:08 -04:00
matt dannenberg
886e1c281d remove jstest/multiClient because it has only one test in it which isn't run and wouldn't do anything anyway
jstest/libs/concurrent.js is also being removed because this was the only thing that used it

(cherry picked from commit ce5a47a3b5)
2014-03-25 07:04:37 -04:00
matt dannenberg
df1e0d4ab0 SERVER-13342 add a createCollection() to guard against timeouts in tags.js
(cherry picked from commit b8c7f25613)
2014-03-25 06:58:26 -04:00
Hari Khalsa
f77427bddf SERVER-13336 count should always yield
Revert "SERVER-12554 Lazily yield on count queries."

This reverts commit 2850cc7253.
2014-03-25 11:12:50 -04:00
Dan Pasette
112c32c0fd SERVER-13334 fix maxTimeMS shell helper with count
(cherry picked from commit 5138b611cb)
2014-03-25 10:25:45 -04:00
matt dannenberg
1751a13cc6 SERVER-13328 enhance "updater not supported" error message
(cherry picked from commit 84ae6f501a)
2014-03-25 04:10:06 -04:00
Tyler Brock
258d46ecee SERVER-13331 lower GridFS default chunk size to 255k
(cherry picked from commit 632ae4e7ad)
2014-03-24 17:59:23 -04:00
David Storch
96d25f6e30 SERVER-13307 do not try to index ELEM_MATCH_VALUE if a child predicate can't be indexed
(cherry picked from commit 9713848c54)
2014-03-24 15:19:14 -04:00
Spencer T Brody
0820546eef Apply fix to bench_test3.js to jsCore version
(cherry picked from commit 9d359723b3)
2014-03-24 14:56:21 -04:00
Kaloian Manassiev
444bb62c24 SERVER-13306 mongobridge should not try forever to connect to dead
destinations.

The connect timeout is set to 15 seconds of retrying, after which the
connection to the client will be terminated.

Also added some extra logging and diagnostics so it is easier to analyse
test failures in the future.
2014-03-24 10:28:01 -04:00
Ernie Hershey
602cc638b3 post 2.6.0-rc2 2014-03-21 22:41:08 -04:00
Eric Milkie
d44539de67 SERVER-13053 fix curop query field for index builds outside of createIndexes command
(cherry picked from commit 6849110b99)
2014-03-21 14:01:08 -04:00
Ernie Hershey
d2716598fc BUMP 2.6.0-rc2 2014-03-21 13:03:23 -04:00
Hari Khalsa
0966b812bd SERVER-13292 fast path simple/fully covered projections 2014-03-21 12:57:54 -04:00
Eric Milkie
52a9e923df SERVER-13202 wait for secondary to flush buffer before assuming primaryship
(cherry picked from commit 3792e501d8)
2014-03-21 12:55:31 -04:00
David Storch
76f298f24e SERVER-10026 limit tree depth allowed by the match expression parser
(cherry picked from commit 926d45b2cd)
2014-03-21 11:48:21 -04:00
Hari Khalsa
092deb7463 SERVER-10026 don't forget to propagate restoreState down to backup plan in MPR 2014-03-21 11:49:01 -04:00
Mathias Stearn
1b6ec9b660 SERVER-13167 allow PFE in each document in insert write command
Previously PFEs could only be thrown during the first operation.

(cherry picked from commit 064702d6c3)
2014-03-21 11:14:10 -04:00
Eric Milkie
586200c20f SERVER-13053 track index builds explicitly instead of using CurOp
(cherry picked from commit 70c062eb06)
2014-03-21 10:22:35 -04:00
Eric Milkie
8ff2e19762 SERVER-13305 fix test for small_oplog
(cherry picked from commit f6713955af)
2014-03-21 10:22:35 -04:00
Randolph Tan
69ec3ce065 SERVER-13294 mongos --upgrade should exit after upgrading
Fix multiVersion tests
(cherry picked from commit 6e5c3296a9)
2014-03-20 19:52:35 -04:00
Randolph Tan
06af0c0546 SERVER-13302 Fix error message when create index during migration fails
(cherry picked from commit 63fbd2ff4d)
2014-03-20 15:32:45 -04:00
Siyuan Zhou
8b99b7e8b7 SERVER-13282 Fix leak in mongos BatchedWriteExec::execute()
(cherry picked from commit 75927c64f1)
2014-03-20 13:49:48 -04:00
matt dannenberg
50a0399775 SERVER-9765 do not noteRemoteIsPrimary when a node decides it is the superior primary in a two primary replset
(cherry picked from commit caf29197bd)
2014-03-20 08:21:44 -04:00
Benety Goh
b9da5eed52 SERVER-13293 fixed geo filter memory leak when creating index scan/fetch stages
(cherry picked from commit b03ec74111)
2014-03-20 13:06:47 -04:00
Eliot Horowitz
4b1e555f6b SERVER-13294: mongos exit after --upgrade 2014-03-20 12:32:11 -04:00
Andy Schwerin
6b5e42ed2f SERVER-13295 Ensure that user and data documents reach all nodes in auth_no_pri.js.
In order to confirm that you can authenticate to and read data from a
non-primary node with auth enabled, the test set up phase must write some data
and wait for it to reach all nodes, before taking down the majority of them.
This patch achieves this by setting an appropriate write concern on the user and
data document inserts.

(cherry picked from commit 7001e916bd)
2014-03-20 11:33:28 -04:00
David Storch
c19b54dd42 SERVER-13038 fix indentation in QLOG output
(cherry picked from commit bd89a2c804)
2014-03-20 11:26:33 -04:00
David Storch
d3b45e4327 SERVER-12438 better handling of batchSize and limit with sort
(cherry picked from commit b9167f0fe8)
2014-03-20 11:07:25 -04:00
Benety Goh
2b2cf4a9b4 BF-195 modified non-terminating map reduce function to sleep instead of spinning
(cherry picked from commit 0056ff1c76)
2014-03-20 09:22:24 -04:00
Scott Hernandez
1c5e4d72d2 SERVER-13001: fixup mongos side with mixed version shards
(cherry picked from commit 971bbb28a0)
2014-03-19 19:04:23 -04:00
Andy Schwerin
670a13d965 SERVER-13163/SERVER-13165 Target index creations correctly in the oplog on insert write commands.
(cherry picked from commit d9e4242d7f)
2014-03-19 18:13:51 -04:00
Mark Benvenuto
f5623ce7ed SERVER-13033: Static Initalizer race condition with CreateDirectClient and server-side Javascript
(cherry picked from commit 7be64ae756)
2014-03-19 17:25:31 -04:00
Spencer T Brody
21426b3b81 SERVER-13265 Fix race condition in mongorestore startup
(cherry picked from commit 47ce3aebb4)
2014-03-19 17:13:45 -04:00
Andy Schwerin
11e8a1d1b7 SERVER-13163/SERVER-13165 Assign fassert codes. 2014-03-19 17:04:11 -04:00
Andy Schwerin
2758187dd4 SERVER-13163/SERVER-13165 Refactor implementation of insert write command in mongod.
The goal of the refactoring is to clarify the control flow of the batch
execution of inserts, and in so doing to cleanly handle PageFaultExceptions,
properly handle demotion to secondary, correctly profile individual document
insertions within the batch, and correctly attribute lock hold and acquisition
time to those individual insertions.

It is also intended that this refactoring will resolve memory leaks in the
insert code path, by more carefully tracking ownership of WriteErrorDetail
objects throughout the WriteBatchExecutor class.
2014-03-19 17:02:09 -04:00
Ernie Hershey
d465ba1e2e SERVER-12095 Update project description in Linux packaging text
This change makes packaging text more consistent between rpms
and debs, as well as bringing the text up to date with more
recent verbiage.
2014-03-19 16:44:37 -04:00
Eric Milkie
b4a5812a05 SERVER-13249 adjust timeout for reInitiate
Since there is a 15 second polling delay when there are no visible primary/secondary nodes,
reInitiate was coming close to timing out in many cases.
(cherry picked from commit 4a299302a7)
2014-03-19 15:30:57 -04:00
Charlie Page
5a1f1f2866 Minor typo in sock.cpp debug msg
"Dump"->"dump"

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
(cherry picked from commit 9e8eb0482d)
2014-03-19 15:29:11 -04:00
Mathias Stearn
0147b057c2 SERVER-12615 Fix size calculation in JSReducer::_reduce
The old calculation didn't consider the size of the numeric-string fieldnames
in arrays. This error accumulated with each value added to the array. While
the new calculation doesn't consider the size of the current fieldname, it is
ok because it prevents the error from accumulating and we have plenty of room
between the User and Internal max sizes.

(cherry picked from commit 3e0aa5769d)
2014-03-19 15:25:20 -04:00
Hari Khalsa
8492832436 SERVER-13280 don't ignore deletions of DiskLoc(s) when yielding in idhack runner 2014-03-19 14:51:07 -04:00
matt dannenberg
99cd103ecf SERVER-13250 do not check local.startup_log for _id index in upgradeCheck()
(cherry picked from commit 9a53f30468)
2014-03-19 08:53:44 -04:00
Hari Khalsa
286b6ba87e SERVER-13271 don't forget to fix test in jscore as well 2014-03-19 12:13:14 -04:00
Hari Khalsa
094f1565d6 SERVER-10026 SERVER-13271 SERVER-12878 SERVER-2094 avoid surplus projections in distinct 2014-03-19 10:48:23 -04:00
Ernie Hershey
b92555698f SERVER-11045 Update man pages from the MongoDB Manual
This is a direct copy of generated man page content from
the MongoDB Manual.
2014-03-19 10:06:17 -04:00
Eric Milkie
05bd38351d SERVER-13249 fix where we set timeout for slow builders
awaitSecondaries is already called by reInitiate()
(cherry picked from commit eabded8aa6)
2014-03-19 10:00:56 -04:00
Greg Studer
05aa222eb5 SERVER-13258 ensure S2 poly loops have 3 points after dedup'ing
(cherry picked from commit 16be7b9840)
2014-03-19 09:55:52 -04:00
Hari Khalsa
36c6964edd SERVER-13184 with rooted OR query plan sub-queries independently and combine 2014-03-18 17:53:39 -04:00
matt dannenberg
7497c50db0 SERVER-13262 have mr_drop.js run on a unique DB to avoid parallel test failures
(cherry picked from commit 934c77bf4b)
2014-03-18 12:20:17 -04:00
Scott Hernandez
72e9bea86f SERVER-13210: include nModified for all mongod write commands
(cherry picked from commit e200a2274f)
2014-03-18 17:19:24 -04:00
Randolph Tan
3e62600166 SERVER-13263 Temporarily disable balancer on testshard1.js when not issuing the aggregate command
(cherry picked from commit 8d170f91b6)
2014-03-18 16:52:26 -04:00
Hari Khalsa
dd73cdcea6 SERVER-10026 fix query leak during certain error conditions 2014-03-18 15:35:23 -04:00
Greg Studer
43be3d5a87 SERVER-13057 push shell write errors more in line with other drivers
(cherry picked from commit 6ee3a36bdb)
2014-03-18 15:26:54 -04:00
matt dannenberg
510e2dda4e fixing errcode
(cherry picked from commit 4184de903c)
2014-03-18 09:53:32 -04:00
matt dannenberg
5fd8754e9b upgradeCheck() test added
(cherry picked from commit bbeca9384f)
2014-03-18 09:53:32 -04:00
matt dannenberg
c5f6e32f2b SERVER-13259 moved upgradeCheck()'s index key size checking logic from javascript to c++
previous javascript logic was wrong and to correct it we needed to move it to c++
also fix index size logic and add warning about non-V1 indexes

(cherry picked from commit 24b9ad0bc5)
2014-03-18 09:53:32 -04:00
hawka
dfe3e9aaa5 SERVER--9982 skip update_setOnInsert.js in parallel suite 2014-03-18 14:16:37 -04:00
Greg Studer
8034a8d6a1 SERVER-13252 downconvert createIndex in compatibility mode
(cherry picked from commit 910005e639)
2014-03-18 14:10:50 -04:00
hawka
f0cc6f2fdb SERVER-13257 remove shellspawn.js from jstests 2014-03-18 14:07:56 -04:00
Benety Goh
975cff4802 SERVER-13241 system profile will hold plan summary if execution stats object is too large 2014-03-18 13:42:17 -04:00
Benety Goh
0de6511419 SERVER-13241 increased buffer size for stats in curop from 512 to 2048 2014-03-18 13:42:17 -04:00
Eric Milkie
63861f53c4 SERVER-13249 double timeout for more reliability
(cherry picked from commit c2eeebe5c1)
2014-03-18 08:55:39 -04:00
Mark Benvenuto
d1e423807a Revert "SERVER-13033: Fix bad static initializer"
This reverts commit f0b367f3e0.

(cherry picked from commit 1aad465958)
2014-03-17 20:52:52 -04:00
Mark Benvenuto
7226cdfa51 SERVER-13181: Fix build break
(cherry picked from commit 57eea817bb)
2014-03-17 18:38:13 -04:00
Mark Benvenuto
77fb13bbce SERVER-13033: Fix bad static initializer
(cherry picked from commit f0b367f3e0)
2014-03-17 18:38:05 -04:00
Mark Benvenuto
5109563d5e SERVER-13181: Fix memory leaks in indexing
(cherry picked from commit 4f05d9ec58)
2014-03-17 18:38:04 -04:00
Mark Benvenuto
0838167a27 SERVER-13181: Fix BtreeBulk leaks
- Fix leak in buildAnIndex - initiateBulk allocates a BtreeBulk which is never deleted
- Fix leak in MultiIndexBlock - we are leaking BtreeBulk since we use a raw pointer

(cherry picked from commit 25aac5429d)
2014-03-17 18:38:03 -04:00
Mark Benvenuto
e08a0f09d0 SERVER-13181: Query Memory Leaks
(cherry picked from commit 7510a554b8)
2014-03-17 18:38:03 -04:00
Mark Benvenuto
224c373b84 Add barrier to coordinate thread startup
(cherry picked from commit e9d85c3804)
2014-03-17 18:38:02 -04:00
Spencer T Brody
f72cfb449a Increase timeout of replSetReconfig to leave time for initial sync in two_initsync.js test
(cherry picked from commit 298470d138)
2014-03-17 18:13:59 -04:00
Spencer T Brody
3603a62092 Increase benchRun time to improve reliability of bench_test3.js
(cherry picked from commit 689e23eace)
2014-03-17 18:13:46 -04:00
David Storch
c17ce85e7b SERVER-13221 increase plan cache size to 5000 entries
(cherry picked from commit 9faacb76de)
2014-03-17 17:58:03 -04:00
Eliot Horowitz
c78bdafae3 SERVER-13208: drop dups should be allowed to be different 2014-03-17 17:32:41 -04:00
Eliot Horowitz
7e2f84ae56 SERVER-13206: do not abort secondary on index creation conflict 2014-03-17 16:53:55 -04:00
Eliot Horowitz
8d3be24f17 SERVER-13208: dropDups should be ignored for index comparison 2014-03-17 16:53:50 -04:00
Randolph Tan
3e88add23c SERVER-13234 Remove timeout from cloneDb.js test
(cherry picked from commit 925d3c57e1)
2014-03-17 16:14:35 -04:00
Mathias Stearn
3319a45ff5 Blacklist storageDetailsCommand from sharding passthrough
It isn't intended to be run against mongos.

(cherry picked from commit db9e1ec03f)
2014-03-17 14:19:09 -04:00
Kaloian Manassiev
9f437614f4 SERVER-12949 Restore intermediate in-memory reduces, which are used to
keep the memory occupied by map/reduce small and spill extra large results
to disk.

Also adds a JS unit test to ensure this behaviour doesn't change
accidentally.

(cherry picked from commit acc47ab1b9)
2014-03-17 12:04:28 -04:00
Randolph Tan
1c177bb5d9 SERVER-13207 Unordered batch writes to a shard with version mismatch can trigger dassert at mongos
(cherry picked from commit 337b9dd3f9)
2014-03-17 11:15:01 -04:00
Dan Pasette
0de7cca4a1 Remove nYields from explain output in repair.js
(cherry picked from commit 9ebf5f742e)
2014-03-17 10:36:19 -04:00
Greg Studer
9c6fcdd277 SERVER-12977 disallow empty write batches
Also fix shell batch processing to avoid extra empty batches.
(cherry picked from commit b5756056a7)
2014-03-17 10:03:26 -04:00
matt dannenberg
ff6d29cbf6 SERVER-13068 remove other occurance of replset last message
(cherry picked from commit 8c11be20ca312e5507a5e4560d62d07010c60543)
2014-03-17 04:01:51 -04:00
Greg Studer
41f534dc96 SERVER-13032 record write errors on failures of shards and lack of progress
Dedicated mongos error code indicating partial results
(cherry picked from commit aaa29361e7)
2014-03-16 19:10:31 -04:00
Hari Khalsa
b5e634f883 SERVER-13184 don't forget to hold on to bsonobj in test 2014-03-15 19:11:26 -04:00
Hari Khalsa
0dab427a05 SERVER-13184 Add simple logical rewrite+tests 2014-03-15 17:26:20 -04:00
David Storch
dc11b6e852 SERVER-13184 limit number of enumerated plans for an OR 2014-03-15 14:48:58 -04:00
David Storch
c81d07b9b2 SERVER-13212 increase number of indexed solutions considered by the query planner 2014-03-15 14:48:38 -04:00
Dan Pasette
78f486cdc7 SERVER-12901 make test pause maxSyncSourceLagSecs 2014-03-15 14:27:11 -04:00
Shaun Verch
d2e6240d6b SERVER-13192 Fix sorting in show dbs shell helper 2014-03-14 18:07:10 -04:00
Randolph Tan
d2f973185d SERVER-13214 Temporarily restore indexbg*.js test to use legacy writes 2014-03-14 17:50:08 -04:00
Greg Studer
34559b85ba SERVER-13176 suppress legacy dup-key error codes when down/upconverting in mongos write cmds 2014-03-14 16:53:57 -04:00
Spencer T Brody
3550104638 SERVER-6665 Add test to ensure that you can auth a RS connection to a RS with no primary 2014-03-14 15:43:53 -04:00
Mathias Stearn
8cc495d5e0 Fix build-failure with small-oplog tests
The theory here is that the test exited with writes still in flight and the
dbhash was executed on the master and the slave at different logical points
in time.
2014-03-14 14:57:11 -04:00
Randolph Tan
c6dad5a441 SERVER-13188 Migrate aggregation jstest suite to use write commands api
Fix testshard1.js
2014-03-14 13:45:57 -04:00
Spencer T Brody
a4ad235adc SERVER-10640 re-enable trace_missing_docs_tests.js in auth passthrough 2014-03-14 13:17:57 -04:00
Randolph Tan
8c92b5ae58 SERVER-13190 migrate replset jstest suite to use write commands api 2014-03-14 12:06:02 -04:00
Randolph Tan
3b7aae27fe SERVER-12954 w parameter is not propagated correctly on compatibility writeMode
Send resetError only when absolutely necessary.
2014-03-14 10:36:41 -04:00
Eric Milkie
ad04c8caf4 SERVER-13202 better debug output for rollback4.js 2014-03-14 09:55:00 -04:00
Eric Milkie
0716e47f14 SERVER-12993 restore batch_write_insert test behavior to be exacting 2014-03-14 09:54:59 -04:00
Spencer T Brody
88d3c3f494 SERVER-13147 Make getUsers shell helper use system.users query when dealing with 2.4 schema users 2014-03-13 17:54:41 -04:00
Randolph Tan
5bd9fa125c SERVER-13188 Migrate aggregation jstest suite to use write commands api 2014-03-13 17:01:06 -04:00
Kaloian Manassiev
a53a7eec05 SERVER-13173 Use microseconds instead of millis in order to avoid a
division by zero exception.
2014-03-13 16:58:22 -04:00
Randolph Tan
d878b59856 SERVER-13028 fix shell to use createIndex command for createIndex method 2014-03-13 16:04:50 -04:00
Jason Rassi
3956365fcc SERVER-13128 Fix nscannedObjects calculation for $or subtree explain 2014-03-13 13:19:54 -04:00
Randolph Tan
858f12a88f SERVER-13137 Make sure secondary is up to date before querying in sharding_rs2.js 2014-03-13 12:42:21 -04:00
Shaun Verch
d1fa029106 SERVER-13178 Fix replica set name regular expression 2014-03-13 11:51:53 -04:00
Spencer T Brody
a5802c94f1 SERVER-13087 Better error messages for invalid config server writes 2014-03-13 11:38:42 -04:00
Spencer T Brody
4cde62902c SERVER-13059 Prevent addUser shell helper from mutating its argument 2014-03-13 11:38:30 -04:00
Hari Khalsa
09acefaf1e SERVER-13135 use key information to filter docs in s2near 2014-03-13 11:11:56 -04:00
Benety Goh
32085c5e4a SERVER_12951 added getPlanCache() to Collection.help() 2014-03-13 11:06:00 -04:00
Randolph Tan
f4d08212ef SERVER-12973 update command can make document larger than 16MB 2014-03-13 10:44:57 -04:00
Benety Goh
4233257f59 SERVER-13139 lazily fill in index scan specific stats 2014-03-13 10:33:44 -04:00
Benety Goh
fa53389976 SERVER-13139 replaced index descriptor field with key pattern to eliminate dependency on index catalog 2014-03-13 10:33:22 -04:00
Scott Hernandez
dad98f8d0e smoke small_oplog: don't store dups in lost in master/slave 2014-03-13 09:29:55 -04:00
Jason Rassi
d66bf3e0a6 SERVER-12819 Reject write cmds where batch size > maxWriteBatchSize 2014-03-13 00:50:55 -04:00
Jason Rassi
c59b877cb9 SERVER-13155 mongos obey maxWriteBatchSize for upconv'd bulk inserts 2014-03-13 00:50:54 -04:00
Scott Hernandez
8043d3465f SERVER-13171: Add '_forceLegacyShardWriteMode' mongos setParameter 2014-03-12 22:43:27 -04:00
Scott Hernandez
45f2cf47ea SERVER-13001: exclude nModified from legacy write results 2014-03-12 22:43:15 -04:00
David Storch
e972301dfc SERVER-13132 run candidates plans for longer 2014-03-12 18:17:05 -04:00
1457 changed files with 26295 additions and 41752 deletions

View File

@ -76,6 +76,7 @@ addSmokeSuite( "smokeModuleTests", "$MODULETEST_LIST" )
# These tests require the mongo shell
if shellEnv is not None:
addSmoketest( "smokeJs", [add_exe("mongo"), add_exe("mongod")] )
addSmoketest( "smokeJsCore", [add_exe("mongo"), add_exe("mongod")] )
addSmoketest( "smokeClone", [ add_exe("mongo"), add_exe("mongod") ] )
addSmoketest( "smokeRepl", [ add_exe("mongo"), add_exe("mongod"), add_exe("mongobridge") ] )
addSmoketest( "smokeReplSets", [ add_exe("mongo"), add_exe("mongod"), add_exe("mongobridge") ] )
@ -85,8 +86,10 @@ if shellEnv is not None:
addSmoketest( "smokeParallel", [ add_exe( "mongo" ), add_exe( "mongod" ) ] )
addSmoketest( "smokeSharding", [ add_exe("mongo"), add_exe("mongod"), add_exe("mongos"), add_exe('mongofiles') ] )
addSmoketest( "smokeJsPerf", [ add_exe("mongo"), add_exe("mongod") ] )
addSmoketest( "smokeJsSlowNightly", [add_exe("mongo"), add_exe("mongod"), add_exe("mongos") ])
addSmoketest( "smokeJsSlowWeekly", [add_exe("mongo"), add_exe("mongod"), add_exe("mongos") ])
addSmoketest( "smokeNoPassthroughWithMongod", [add_exe("mongo"), add_exe("mongod"), add_exe("mongos") ])
addSmoketest( "smokeNoPassthrough", [add_exe("mongo"), add_exe("mongod"), add_exe("mongos") ])
addSmoketest( "smokeSlow1", [add_exe("mongo"), add_exe("mongod"), add_exe("mongos") ])
addSmoketest( "smokeSlow2", [add_exe("mongo"), add_exe("mongod"), add_exe("mongos") ])
addSmoketest( "smokeQuota", [ add_exe("mongo"), add_exe("mongod") ] )
addSmoketest( "smokeTool", [ add_exe( "mongo" ), add_exe("mongod"), add_exe("mongos"), "tools" ] )
addSmoketest( "smokeAggregation", [ add_exe( "mongo" ), add_exe( "mongod" ), add_exe( "mongos" ) ] )

View File

@ -299,6 +299,8 @@ add_option("mongod-concurrency-level", "Concurrency level, \"global\" or \"db\""
add_option('build-fast-and-loose', "NEVER for production builds", 0, False)
add_option('disable-warnings-as-errors', "Don't add -Werror to compiler command line", 0, False)
add_option('propagate-shell-environment',
"Pass shell environment to sub-processes (NEVER for production builds)",
0, False)
@ -819,7 +821,9 @@ if nix:
"-Winvalid-pch"] )
# env.Append( " -Wconversion" ) TODO: this doesn't really work yet
if linux or darwin:
env.Append( CCFLAGS=["-Werror", "-pipe"] )
env.Append( CCFLAGS=["-pipe"] )
if not has_option("disable-warnings-as-errors"):
env.Append( CCFLAGS=["-Werror"] )
env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )

View File

@ -5,7 +5,6 @@ import sys
import os, os.path
import utils
import time
import exceptions
from optparse import OptionParser
def shouldKill( c, root=None ):
@ -61,6 +60,22 @@ def killprocs( signal="", root=None ):
return killed
def tryToRemove(path):
for _ in range(60):
try:
os.remove(path)
return True
except OSError, e:
errno = getattr(e, 'winerror', None)
# check for the access denied and file in use WindowsErrors
if errno in (5, 32):
print("os.remove(%s) failed, retrying in one second." % path)
time.sleep(1)
else:
raise e
return False
def cleanup( root , nokill ):
if nokill:
print "nokill requested, not killing anybody"
@ -74,16 +89,9 @@ def cleanup( root , nokill ):
for ( dirpath , dirnames , filenames ) in os.walk( root , topdown=False ):
for x in filenames:
foo = dirpath + "/" + x
print( "removing: " + foo )
try:
os.remove(foo)
except exceptions.OSError, e:
# SERVER-10462 compensate for Windows file locking race
# We want to catch WindowsError but can't use that name on other platforms
print(repr(e))
print("os.remove(%s) failed, retrying once." % foo)
time.sleep(1)
os.remove(foo)
if os.path.exists(foo):
if not tryToRemove(foo):
raise Exception("Couldn't remove file '%s' after 60 seconds" % foo)
if __name__ == "__main__":
parser = OptionParser(usage="read the script")

View File

@ -29,17 +29,89 @@ For a detailed usage example, see src/SConscript.client or src/mongo/SConscript.
import optparse
import os
import sys
import shutil
import zipfile
from subprocess import (Popen, PIPE, STDOUT)
def main(argv):
opts = parse_options(argv[1:])
archive = open_archive_for_write(opts.output_filename, opts.archive_format)
if opts.archive_format in ('tar', 'tgz'):
make_tar_archive(opts)
elif opts.archive_format in ('zip'):
make_zip_archive(opts)
else:
raise ValueError('Unsupported archive format "%s"' % opts.archive_format)
def delete_directory(dir):
'''Recursively deletes a directory and its contents.
'''
try:
shutil.rmtree(dir)
except Exception:
pass
def make_tar_archive(opts):
'''Given the parsed options, generates the 'opt.output_filename'
tarball containing all the files in 'opt.input_filename' renamed
according to the mappings in 'opts.transformations'.
e.g. for an input file named "a/mongo/build/DISTSRC", and an
existing transformation {"a/mongo/build": "release"}, the input
file will be written to the tarball as "release/DISTSRC"
All files to be compressed are copied into new directories as
required by 'opts.transformations'. Once the tarball has been
created, all temporary directory structures created for the
purposes of compressing, are removed.
'''
tar_options = "cvf"
if opts.archive_format is 'tgz':
tar_options += "z"
# clean and create a temp directory to copy files to
enclosing_archive_directory = os.path.join("build", "archive")
delete_directory(enclosing_archive_directory)
os.makedirs(enclosing_archive_directory)
output_tarfile = os.path.join(os.getcwd(), opts.output_filename)
tar_command = ["tar", tar_options, output_tarfile]
for input_filename in opts.input_filenames:
preferred_filename = get_preferred_filename(input_filename, opts.transformations)
temp_file_location = os.path.join(enclosing_archive_directory, preferred_filename)
enclosing_file_directory = os.path.dirname(temp_file_location)
if not os.path.exists(enclosing_file_directory):
os.makedirs(enclosing_file_directory)
print "copying %s => %s" % (input_filename, temp_file_location)
shutil.copy2(input_filename, temp_file_location)
tar_command.append(preferred_filename)
print " ".join(tar_command)
# execute the full tar command
run_directory = os.path.join(os.getcwd(), enclosing_archive_directory)
proc = Popen(tar_command, stdout=PIPE, stderr=STDOUT, bufsize=0, cwd=run_directory)
proc.wait()
# delete temp directory
delete_directory(enclosing_archive_directory)
def make_zip_archive(opts):
'''Given the parsed options, generates the 'opt.output_filename'
zipfile containing all the files in 'opt.input_filename' renamed
according to the mappings in 'opts.transformations'.
All files in 'opt.output_filename' are renamed before being
written into the zipfile.
'''
archive = open_zip_archive_for_write(opts.output_filename)
try:
for input_filename in opts.input_filenames:
archive.add(input_filename, arcname=get_preferred_filename(input_filename,
opts.transformations))
opts.transformations))
finally:
archive.close()
def parse_options(args):
parser = optparse.OptionParser()
parser.add_option('-o', dest='output_filename', default=None,
@ -82,30 +154,21 @@ def parse_options(args):
return opts
def open_archive_for_write(filename, archive_format):
'''Open a tar or zip archive for write, with the given format, and return it.
The type of archive is determined by the "archive_format" parameter, which should be
"tar", "tgz" (for gzipped tar) or "zip".
def open_zip_archive_for_write(filename):
'''Open a zip archive for writing and return it.
'''
if archive_format in ('tar', 'tgz'):
import tarfile
mode = 'w'
if archive_format is 'tgz':
mode += '|gz'
return tarfile.open(filename, mode)
if archive_format is 'zip':
import zipfile
# Infuriatingly, Zipfile calls the "add" method "write", but they're otherwise identical,
# for our purposes. WrappedZipFile is a minimal adapter class.
class WrappedZipFile(zipfile.ZipFile):
def add(self, filename, arcname):
return self.write(filename, arcname)
return WrappedZipFile(filename, 'w', zipfile.ZIP_DEFLATED)
raise ValueError('Unsupported archive format "%s"' % archive_format)
# Infuriatingly, Zipfile calls the "add" method "write", but they're otherwise identical,
# for our purposes. WrappedZipFile is a minimal adapter class.
class WrappedZipFile(zipfile.ZipFile):
def add(self, filename, arcname):
return self.write(filename, arcname)
return WrappedZipFile(filename, 'w', zipfile.ZIP_DEFLATED)
def get_preferred_filename(input_filename, transformations):
'''Does a prefix subsitution on 'input_filename' for the
first matching transformation in 'transformations' and
returns the substituted string
'''
for match, replace in transformations:
if input_filename.startswith(match):
return replace + input_filename[len(match):]

View File

@ -17,6 +17,28 @@ import gzip
# Only really tested/works on Linux.
#
def version_tuple(version):
"""Returns a version tuple that can be used for numeric sorting
of version strings such as '2.6.0-rc1' and '2.4.0'"""
RC_OFFSET = -100
version_parts = re.split(r'\.|-', version[0])
if version_parts[-1].startswith("rc"):
rc_part = version_parts.pop()
rc_part = rc_part.split('rc')[1]
# RC versions are weighted down to allow future RCs and general
# releases to be sorted in ascending order (e.g., 2.6.0-rc1,
# 2.6.0-rc2, 2.6.0).
version_parts.append(int(rc_part) + RC_OFFSET)
else:
# Non-RC releases have an extra 0 appended so version tuples like
# (2, 6, 0, -100) and (2, 6, 0, 0) sort in ascending order.
version_parts.append(0)
return tuple(map(int, version_parts))
class MultiVersionDownloader :
def __init__(self, install_dir, link_dir, platform):
@ -25,7 +47,13 @@ class MultiVersionDownloader :
match = re.compile("(.*)\/(.*)").match(platform)
self.platform = match.group(1)
self.arch = match.group(2)
self.links = self.download_links()
self._links = None
@property
def links(self):
if self._links is None:
self._links = self.download_links()
return self._links
def download_links(self):
href = "http://dl.mongodb.org/dl/%s/%s" \
@ -70,7 +98,7 @@ class MultiVersionDownloader :
raise Exception("Cannot find a link for version %s, versions %s found." \
% (version, self.links))
urls.sort()
urls.sort(key=version_tuple)
full_version = urls[-1][0]
url = urls[-1][1]
extract_dir = url.split("/")[-1][:-4]

View File

@ -38,23 +38,19 @@ from itertools import izip
import glob
from optparse import OptionParser
import os
import parser
import pprint
import re
import shutil
import shlex
import socket
import stat
from subprocess import (Popen,
PIPE,
STDOUT,
call)
from subprocess import (PIPE, Popen, STDOUT)
import sys
import time
from pymongo import Connection
from pymongo.errors import OperationFailure
import cleanbb
import utils
try:
@ -87,6 +83,8 @@ continue_on_failure = None
file_of_commands_mode = False
start_mongod = True
temp_path = None
clean_every_n_tests = 1
clean_whole_dbroot = False
tests = []
winners = []
@ -126,6 +124,16 @@ def buildlogger(cmd, is_global=False):
return [utils.find_python(), 'buildscripts/buildlogger.py'] + cmd
return cmd
def clean_dbroot(dbroot="", nokill=False):
# Clean entire /data/db dir if --with-cleanbb, else clean specific database path.
if clean_whole_dbroot and not small_oplog:
dbroot = os.path.normpath(smoke_db_prefix + "/data/db")
if os.path.exists(dbroot):
print("clean_dbroot: %s" % dbroot)
cleanbb.cleanup(dbroot, nokill)
class mongod(object):
def __init__(self, **kwargs):
self.kwargs = kwargs
@ -189,13 +197,10 @@ class mongod(object):
srcport = mongod_port
self.port += 1
self.slave = True
if os.path.exists(dir_name):
if 'slave' in self.kwargs:
argv = [utils.find_python(), "buildscripts/cleanbb.py", '--nokill', dir_name]
else:
argv = [utils.find_python(), "buildscripts/cleanbb.py", dir_name]
call(argv)
clean_dbroot(dbroot=dir_name, nokill=self.slave)
utils.ensureDir(dir_name)
argv = [mongod_executable, "--port", str(self.port), "--dbpath", dir_name]
# These parameters are alwas set for tests
# SERVER-9137 Added httpinterface parameter to keep previous behavior
@ -347,7 +352,7 @@ def check_db_hashes(master, slave):
replicated_collections += master.dict.keys()
for coll in replicated_collections:
if coll not in slave.dict:
if coll not in slave.dict and coll not in lost_in_slave:
lost_in_slave.append(coll)
mhash = master.dict[coll]
shash = slave.dict[coll]
@ -383,7 +388,7 @@ def check_db_hashes(master, slave):
for db in slave.dict.keys():
if db not in master.dict:
if db not in master.dict and db not in lost_in_master:
lost_in_master.append(db)
@ -392,14 +397,14 @@ def ternary( b , l="true", r="false" ):
return l
return r
# Blech.
def skipTest(path):
basename = os.path.basename(path)
parentPath = os.path.dirname(path)
parentDir = os.path.basename(parentPath)
if small_oplog: # For tests running in parallel
if basename in ["cursor8.js", "indexh.js", "dropdb.js", "connections_opened.js", "opcounters.js", "dbadmin.js"]:
if basename in ["cursor8.js", "indexh.js", "dropdb.js", "dropdb_race.js",
"connections_opened.js", "opcounters.js", "dbadmin.js"]:
return True
if use_ssl:
# Skip tests using mongobridge since it does not support SSL
@ -426,7 +431,6 @@ def skipTest(path):
authTestsToSkip = [("jstests", "drop2.js"), # SERVER-8589,
("jstests", "killop.js"), # SERVER-10128
("sharding", "trace_missing_docs_test.js"), # SERVER-10640
("sharding", "sync3.js"), # SERVER-6388 for this and those below
("sharding", "sync6.js"),
("sharding", "parallel.js"),
@ -443,6 +447,16 @@ def skipTest(path):
return False
forceCommandsForDirs = ["aggregation", "auth", "core", "parallel", "replsets"]
# look for jstests and one of the above suites separated by either posix or windows slashes
forceCommandsRE = re.compile(r"jstests[/\\](%s)" % ('|'.join(forceCommandsForDirs)))
def setShellWriteModeForTest(path, argv):
swm = shell_write_mode
if swm == "legacy": # change when the default changes to "commands"
if use_write_commands or forceCommandsRE.search(path):
swm = "commands"
argv += ["--writeMode", swm]
def runTest(test, result):
# result is a map containing test result details, like result["url"]
@ -469,10 +483,9 @@ def runTest(test, result):
path = argv[1]
elif ext == ".js":
argv = [shell_executable, "--port", mongod_port, '--authenticationMechanism', authMechanism]
if use_write_commands:
argv += ["--writeMode", "commands"]
else:
argv += ["--writeMode", shell_write_mode]
setShellWriteModeForTest(path, argv)
if not usedb:
argv += ["--nodb"]
if small_oplog or small_oplog_rs:
@ -525,8 +538,7 @@ def runTest(test, result):
'TestData.authMechanism = ' + ternary( authMechanism,
'"' + str(authMechanism) + '"', 'null') + ";" + \
'TestData.useSSL = ' + ternary( use_ssl ) + ";" + \
'TestData.useX509 = ' + ternary( use_x509 ) + ";" + \
'TestData.useWriteCommands = ' + ternary( use_write_commands ) + ";"
'TestData.useX509 = ' + ternary( use_x509 ) + ";"
# this updates the default data directory for mongod processes started through shell (src/mongo/shell/servers.js)
evalString += 'MongoRunner.dataDir = "' + os.path.abspath(smoke_db_prefix + '/data/db') + '";'
evalString += 'MongoRunner.dataPath = MongoRunner.dataDir + "/";'
@ -665,8 +677,8 @@ def run_tests(tests):
if small_oplog or small_oplog_rs:
master.wait_for_repl()
tests_run = 0
for tests_run, test in enumerate(tests):
tests_run += 1 # enumerate from 1, python 2.5 compatible
test_result = { "start": time.time() }
(test_path, use_db) = test
@ -701,8 +713,9 @@ def run_tests(tests):
check_and_report_replication_dbhashes()
elif use_db: # reach inside test and see if "usedb" is true
if (tests_run+1) % 20 == 0:
# restart mongo every 20 times, for our 32-bit machines
if clean_every_n_tests and (tests_run % clean_every_n_tests) == 0:
# Restart mongod periodically to clean accumulated test data
# clean_dbroot() is invoked by mongod.start()
master.__exit__(None, None, None)
master = mongod(small_oplog_rs=small_oplog_rs,
small_oplog=small_oplog,
@ -755,7 +768,10 @@ at the end of testing:""" % (src, dst)
at the end of testing:"""
for coll in screwy_in_slave.keys():
stats = screwy_in_slave[coll]
print "collection: %s\t (master/slave) hashes: %s/%s counts: %i/%i" % (coll, stats['hashes']['master'], stats['hashes']['slave'], stats['counts']['master'], stats['counts']['slave'])
# Counts are "approx" because they are collected after the dbhash runs and may not
# reflect the states of the collections that were hashed. If the hashes differ, one
# possibility is that a test exited with writes still in-flight.
print "collection: %s\t (master/slave) hashes: %s/%s counts (approx): %i/%i" % (coll, stats['hashes']['master'], stats['hashes']['slave'], stats['counts']['master'], stats['counts']['slave'])
if "docs" in stats:
if (("master" in stats["docs"] and len(stats["docs"]["master"]) != 0) or
("slave" in stats["docs"] and len(stats["docs"]["slave"]) != 0)):
@ -806,12 +822,12 @@ def report():
# Keys are the suite names (passed on the command line to smoke.py)
# Values are pairs: (filenames, <start mongod before running tests>)
suiteGlobalConfig = {"js": ("[!_]*.js", True),
suiteGlobalConfig = {"js": ("core/*.js", True),
"quota": ("quota/*.js", True),
"jsPerf": ("perf/*.js", True),
"disk": ("disk/*.js", True),
"jsSlowNightly": ("slowNightly/*.js", True),
"jsSlowWeekly": ("slowWeekly/*.js", False),
"noPassthroughWithMongod": ("noPassthroughWithMongod/*.js", True),
"noPassthrough": ("noPassthrough/*.js", False),
"parallel": ("parallel/*.js", True),
"clone": ("clone/*.js", False),
"repl": ("repl/*.js", False),
@ -825,8 +841,10 @@ suiteGlobalConfig = {"js": ("[!_]*.js", True),
"failPoint": ("fail_point/*.js", False),
"ssl": ("ssl/*.js", True),
"sslSpecial": ("sslSpecial/*.js", True),
"jsCore": ("core/[!_]*.js", True),
"jsCore": ("core/*.js", True),
"gle": ("gle/*.js", True),
"slow1": ("slow1/*.js", True),
"slow2": ("slow2/*.js", True),
}
def get_module_suites():
@ -888,7 +906,21 @@ def expand_suites(suites,expandUseDB=True):
module_suites = get_module_suites()
for suite in suites:
if suite == 'all':
return expand_suites(['test', 'perf', 'js', 'jsPerf', 'jsSlowNightly', 'jsSlowWeekly', 'clone', 'parallel', 'repl', 'auth', 'sharding', 'tool'],expandUseDB=expandUseDB)
return expand_suites(['test',
'perf',
'jsCore',
'jsPerf',
'noPassthroughWithMongod',
'noPassthrough',
'clone',
'parallel',
'repl',
'auth',
'sharding',
'slow1',
'slow2',
'tool'],
expandUseDB=expandUseDB)
if suite == 'test':
if os.sys.platform == "win32":
program = 'test.exe'
@ -949,12 +981,17 @@ def add_exe(e):
return e
def set_globals(options, tests):
global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog, small_oplog_rs
global no_journal, set_parameters, set_parameters_mongos, no_preallocj, auth, authMechanism, keyFile, keyFileData, smoke_db_prefix, test_path, start_mongod
global mongod_executable, mongod_port, shell_executable, continue_on_failure
global small_oplog, small_oplog_rs
global no_journal, set_parameters, set_parameters_mongos, no_preallocj
global auth, authMechanism, keyFile, keyFileData, smoke_db_prefix, test_path, start_mongod
global use_ssl, use_x509
global file_of_commands_mode
global report_file, shell_write_mode, use_write_commands
global temp_path
global clean_every_n_tests
global clean_whole_dbroot
start_mongod = options.start_mongod
if hasattr(options, 'use_ssl'):
use_ssl = options.use_ssl
@ -987,6 +1024,9 @@ def set_globals(options, tests):
authMechanism = options.authMechanism
keyFile = options.keyFile
clean_every_n_tests = options.clean_every_n_tests
clean_whole_dbroot = options.with_cleanbb
if auth and not keyFile:
# if only --auth was given to smoke.py, load the
# default keyFile from jstests/libs/authTestsKey
@ -1091,8 +1131,8 @@ def add_to_failfile(tests, options):
def main():
global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog
global no_journal, set_parameters, set_parameters_mongos, no_preallocj, auth, keyFile, smoke_db_prefix, test_path
global use_write_commands
global no_journal, set_parameters, set_parameters_mongos, no_preallocj, auth
global keyFile, smoke_db_prefix, test_path, use_write_commands
parser = OptionParser(usage="usage: smoke.py [OPTIONS] ARGS*")
parser.add_option('--mode', dest='mode', default='suite',
@ -1146,9 +1186,12 @@ def main():
parser.add_option('--reset-old-fails', dest='reset_old_fails', default=False,
action="store_true",
help='Clear the failfile. Do this if all tests pass')
parser.add_option('--with-cleanbb', dest='with_cleanbb', default=False,
action="store_true",
help='Clear database files from previous smoke.py runs')
parser.add_option('--with-cleanbb', dest='with_cleanbb', action="store_true",
default=False,
help='Clear database files before first test')
parser.add_option('--clean-every', dest='clean_every_n_tests', type='int',
default=20,
help='Clear database files every N tests [default %default]')
parser.add_option('--dont-start-mongod', dest='start_mongod', default=True,
action='store_false',
help='Do not start mongod before commencing test running')
@ -1240,8 +1283,7 @@ def main():
return
if options.with_cleanbb:
dbroot = os.path.join(options.smoke_db_prefix, 'data', 'db')
call([utils.find_python(), "buildscripts/cleanbb.py", "--nokill", dbroot])
clean_dbroot(nokill=True)
test_report["start"] = time.time()
test_report["mongod_running_at_start"] = mongod().is_mongod_up(mongod_port)

65
debian/bsondump.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "BSONDUMP" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "BSONDUMP" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
bsondump \- MongoDB BSON utility
bsondump \- MongoDB BSON Utility
.
.nr rst2man-indent-level 0
.
@ -54,30 +54,45 @@ BSON files, not a tool for data ingestion or other application use.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBbsondump\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including
the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBbsondump\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBbsondump\fP utility.
Returns the \fBbsondump\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-objcheck
Validates each \fIBSON\fP object before outputting it in
\fIJSON\fP format. By default, \fBbsondump\fP enables
\fI\-\-objcheck\fP\&. For objects with a high degree of
sub\-document nesting, \fI\-\-objcheck\fP can have a small impact
on performance. You can set \fI\-\-noobjcheck\fP to disable
object checking.
Validates each \fIBSON\fP object before outputting it in \fIJSON\fP
format. By default, \fBbsondump\fP enables \fI\-\-objcheck\fP\&.
For objects with a high degree of sub\-document nesting,
\fI\-\-objcheck\fP can have a small impact on performance. You can set
\fI\-\-noobjcheck\fP to disable object checking.
.sp
Changed in version 2.4: MongoDB enables \fI\-\-objcheck\fP by default, to prevent any
client from inserting malformed or invalid BSON into a MongoDB
@ -90,31 +105,31 @@ database.
New in version 2.4.
.sp
Disables the default document validation that \fBbsondump\fP
performs on all BSON documents.
Disables the default document validation that MongoDB performs on all
incoming BSON documents.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-filter \(aq<JSON>\(aq
.B \-\-filter <JSON>
Limits the documents that \fBbsondump\fP exports to only those
documents that match the \fIJSON document\fP specified as
\fB\(aq<JSON>\(aq\fP\&. Be sure to include the document in single quotes to
avoid interaction with your system\(aqs shell environment.
\fB\(aq<JSON>\(aq\fP\&. Be sure to include the document in single quotes to avoid
interaction with your system\(aqs shell environment.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-type <=json|=debug>
Changes the operation of \fBbsondump\fP from outputting "\fIJSON\fP" (the
default) to a debugging format.
Changes the operation of \fBbsondump\fP from outputting
"\fIJSON\fP" (the default) to a debugging format.
.UNINDENT
.INDENT 0.0
.TP
.B <bsonfilename>
.B <bsonFilename>
The final argument to \fBbsondump\fP is a document containing
\fIBSON\fP\&. This data is typically generated by
\fBmongodump\fP or by MongoDB in a \fIrollback\fP operation.
\fBbsondump\fP or by MongoDB in a \fIrollback\fP operation.
.UNINDENT
.SH USAGE
.SH USE
.sp
By default, \fBbsondump\fP outputs data to standard output. To
create corresponding \fIJSON\fP files, you will need to use the
@ -145,6 +160,6 @@ bsondump \-\-type=debug collection.bson
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

403
debian/mongo.1 vendored
View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGO" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGO" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongo \- MongoDB Shell
.
@ -39,8 +39,8 @@ operations directly with the database. \fBmongo\fP also provides
a fully functional JavaScript environment for use with a MongoDB. This
document addresses the basic invocation of the \fBmongo\fP shell
and an overview of its usage.
.SH INTERFACE
.SS Options
.SH OPTIONS
.SS Core Options
.INDENT 0.0
.TP
.B mongo
@ -48,25 +48,23 @@ and an overview of its usage.
.INDENT 0.0
.TP
.B \-\-shell
Enables the shell interface after evaluating a \fIJavaScript\fP file.
If you invoke the \fBmongo\fP command and specify a JavaScript
file as an argument, or use \fI\%--eval\fP to specify
JavaScript on the command line, the \fI\%--shell\fP option
provides the user with a shell prompt after the file finishes
executing.
Enables the shell interface. If you invoke the \fBmongo\fP command
and specify a JavaScript file as an argument, or use \fI\%\-\-eval\fP to
specify JavaScript on the command line, the \fI\%\-\-shell\fP option
provides the user with a shell prompt after the file finishes executing.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-nodb
Prevents the shell from connecting to any database instances. Later,
to connect to a database within the shell, see
Prevents the shell from connecting to any database instances. Later, to
connect to a database within the shell, see
\fImongo\-shell\-new\-connections\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-norc
Prevents the shell from sourcing and evaluating
\fB~/.mongorc.js\fP on start up.
Prevents the shell from sourcing and evaluating \fB~/.mongorc.js\fP on
start up.
.UNINDENT
.INDENT 0.0
.TP
@ -77,177 +75,60 @@ Silences output from the shell during the connection process.
.TP
.B \-\-port <port>
Specifies the port where the \fBmongod\fP or \fBmongos\fP
instance is listening. Unless specified \fBmongo\fP connects
to \fBmongod\fP instances on port \fB27017\fP, which is the default
\fBmongod\fP port.
instance is listening. If \fI\-\-port\fP is not specified,
\fBmongo\fP attempts to connect to port \fB27017\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname>
specifies the host where the \fBmongod\fP or \fBmongos\fP is running to
connect to as \fB<hostname>\fP\&. By default \fBmongo\fP will attempt
to connect to a MongoDB process running on the localhost.
Specifies the name of the host machine where the \fBmongod\fP or
\fBmongos\fP is running. If this is not specified,
\fBmongo\fP attempts to connect to a MongoDB process running on
the localhost.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-eval <javascript>
Evaluates a JavaScript expression specified as an argument to this
option. \fBmongo\fP does not load its own environment when evaluating
code: as a result many options of the shell environment are not
available.
Evaluates a JavaScript expression that is specified as an argument.
\fBmongo\fP does not load its own environment when evaluating code.
As a result many options of the shell environment are not available.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance.
Use in conjunction with the
\fI\-\-password\fP option to supply a password.
If you specify a username and password but the default database
or the specified database do not require authentication,
\fBmongo\fP will exit with an exception.
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance.
Use in conjunction with the
\fI\-\-username\fP option to supply a username. If you
specify a \fI\-\-username\fP and do not pass an argument to the
\fI\-\-password\fP option, \fBmongo\fP will prompt for a
password interactively, if the \fBmongod\fP or
\fBmongos\fP requires authentication.
.sp
If you chose not to provide an argument so that \fBmongo\fP
will prompt for a password, \fI\-\-password\fP must be the last
option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-authenticationDatabase <dbname>
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongo\fP assumes that the database name specified
in the \fI\%db address\fP holds the user\(aqs
credentials, unless you specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-authenticationMechanism <name>
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongo\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
Enable connection to a \fBmongod\fP or
\fBmongos\fP that has SSL encryption.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyFile <filename>
New in version 2.4.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
for SSL. To use SSL you can either compile MongoDB with SSL support
or use MongoDB Enterprise\&. See http://docs.mongodb.org/manual/tutorial/configure\-ssl for
more information about SSL and MongoDB.
.UNINDENT
.UNINDENT
.sp
Specifies the \fB\&.pem\fP file that contains both the SSL
certificate and key. Specify the file name of the \fB\&.pem\fP
file using relative or absolute paths
.sp
Required when using the \fI\-\-ssl\fP option if the
\fBmongod\fP or \fBmongos\fP has \fBsslCAFile\fP
enabled \fIwithout\fP \fBsslWeakCertificateValidation\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.4.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
for SSL. To use SSL you can either compile MongoDB with SSL support
or use MongoDB Enterprise\&. See http://docs.mongodb.org/manual/tutorial/configure\-ssl for
more information about SSL and MongoDB.
.UNINDENT
.UNINDENT
.sp
Specifies the password to decrypt the root certificate chain
specified by \fI\-\-sslPEMKeyFile\fP\&.
.sp
Only required if the certificate\-key file is encrypted.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCAFile <filename>
New in version 2.4.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
for SSL. To use SSL you can either compile MongoDB with SSL support
or use MongoDB Enterprise\&. See http://docs.mongodb.org/manual/tutorial/configure\-ssl for
more information about SSL and MongoDB.
.UNINDENT
.UNINDENT
.sp
Specifies the \fB\&.pem\fP file that contains the certificate from
the Certificate Authority. Specify the file name of the \fB\&.pem\fP
file using relative or absolute paths
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help, \-h
Returns a basic help and usage text.
Returns information on \fBmongo\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the shell.
Returns the \fBmongo\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose
Increases the verbosity of the output of the shell during the
connection process.
Increases the verbosity of the output of the shell during the connection
process.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongo\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongo\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongo\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongo\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
@ -266,10 +147,10 @@ mongo admin
.UNINDENT
.sp
The above command will connect the \fBmongo\fP shell to the
\fIadmin database\fP on the local machine. You may specify a
remote database instance, with the resolvable hostname or IP
address. Separate the database name from the hostname using a
\fB/\fP character. See the following examples:
\fIadmin database\fP on the local machine. You may specify a remote
database instance, with the resolvable hostname or IP address. Separate
the database name from the hostname using a \fB/\fP character. See the
following examples:
.INDENT 7.0
.INDENT 3.5
.sp
@ -286,17 +167,17 @@ mongo 10.8.8.10/test
.INDENT 0.0
.TP
.B <file.js>
Specifies a JavaScript file to run and then exit.
Generally this should be the last option specified.
Specifies a JavaScript file to run and then exit. Generally this should
be the last option specified.
.INDENT 7.0
.INDENT 3.5
.SS Optional
.sp
To specify a JavaScript file to execute \fIand\fP allow
\fBmongo\fP to prompt you for a password using
\fI\-\-password\fP, pass the filename as the first parameter
with \fI\-\-username\fP and \fI\-\-password\fP s the last
options as in the following:
\fI\-\-password\fP, pass the filename as the first parameter with
\fI\-\-username\fP and \fI\-\-password\fP as the last options, as
in the following:
.INDENT 0.0
.INDENT 3.5
.sp
@ -310,19 +191,145 @@ mongo file.js \-\-username username \-\-password
.UNINDENT
.UNINDENT
.sp
Use the \fI\%--shell\fP option to return to a shell after the
file finishes running.
Use the \fI\%\-\-shell\fP option to return to a shell after the file
finishes running.
.UNINDENT
.SS Files
.sp
\fB~/.dbshell\fP
.SS Authentication Options
.INDENT 0.0
.INDENT 3.5
.TP
.B \-\-authenticationDatabase <dbname>
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongo\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-authenticationMechanism <name>
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongo\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.SS SSL Options
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.6.
.sp
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongo\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongo\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongo\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.SH FILES
.INDENT 0.0
.TP
.B \fB~/.dbshell\fP
\fBmongo\fP maintains a history of commands in the \fB\&.dbshell\fP
file.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 7.0
.INDENT 3.5
\fBmongo\fP does not recorded interaction related to
authentication in the history file, including
@ -331,7 +338,7 @@ authentication in the history file, including
.UNINDENT
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 7.0
.INDENT 3.5
Versions of Windows \fBmongo.exe\fP earlier than 2.2.0 will
save the \fI\&.dbshell\fP file in the \fBmongo.exe\fP working
@ -339,45 +346,49 @@ directory.
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fB~/.mongorc.js\fP
.INDENT 0.0
.INDENT 3.5
.TP
.B \fB~/.mongorc.js\fP
\fBmongo\fP will read the \fB\&.mongorc.js\fP file from the home
directory of the user invoking \fBmongo\fP\&. In the file, users
can define variables, customize the \fBmongo\fP shell prompt,
or update information that they would like updated every time they
launch a shell. If you use the shell to evaluate a JavaScript file
or expression either on the command line with \fI\%--eval\fP or
or expression either on the command line with \fI\%\-\-eval\fP or
by specifying \fI\%a .js file to mongo\fP,
\fBmongo\fP will read the \fB\&.mongorc.js\fP file \fIafter\fP the
JavaScript has finished processing.
.sp
Specify the \fI\%--norc\fP option to disable
Specify the \fI\%\-\-norc\fP option to disable
reading \fB\&.mongorc.js\fP\&.
.UNINDENT
.UNINDENT
.sp
\fB/tmp/mongo_edit\fI<time_t>\fP\&.js\fP
.INDENT 0.0
.INDENT 3.5
Created by \fBmongo\fP when editing a file. If the file
exists \fBmongo\fP will append an integer from \fB1\fP to \fB10\fP to the
.TP
.B \fB/etc/mongorc.js\fP
Global \fBmongorc.js\fP file which the \fBmongo\fP shell
evaluates upon start\-up. If a user also has a \fB\&.mongorc.js\fP
file located in the \fI\%HOME\fP directory, the \fBmongo\fP
shell evaluates the global \fB/etc/mongorc.js\fP file \fIbefore\fP
evaluating the user\(aqs \fB\&.mongorc.js\fP file.
.sp
\fB/etc/mongorc.js\fP must have read permission for the user
running the shell. The \fI\%\-\-norc\fP option for \fBmongo\fP
suppresses only the user\(aqs \fB\&.mongorc.js\fP file.
.sp
On Windows, the global \fBmongorc.js </etc/mongorc.js>\fP exists
in the \fB%ProgramData%\eMongoDB\fP directory.
.TP
.B \fB/tmp/mongo_edit\fI<time_t>\fP\&.js\fP
Created by \fBmongo\fP when editing a file. If the file exists,
\fBmongo\fP will append an integer from \fB1\fP to \fB10\fP to the
time value to attempt to create a unique file.
.TP
.B \fB%TEMP%mongo_edit\fI<time_t>\fP\&.js\fP
Created by \fBmongo.exe\fP on Windows when editing a file. If
the file exists, \fBmongo\fP will append an integer from \fB1\fP
to \fB10\fP to the time value to attempt to create a unique file.
.UNINDENT
.UNINDENT
.sp
\fB%TEMP%mongo_edit\fI<time_t>\fP\&.js\fP
.INDENT 0.0
.INDENT 3.5
Created by \fBmongo.exe\fP on Windows when editing a file.
If the file
exists \fBmongo\fP will append an integer from \fB1\fP to \fB10\fP to
the time value to attempt to create a unique file.
.UNINDENT
.UNINDENT
.SS Environment
.SH ENVIRONMENT
.INDENT 0.0
.TP
.B EDITOR
@ -762,6 +773,6 @@ the additional JavaScript required to generate this output.
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

1627
debian/mongod.1 vendored

File diff suppressed because it is too large Load Diff

View File

@ -10,118 +10,108 @@ Package: mongodb-enterprise-unstable
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-tools
Description: MongoDB cross-platform document-oriented database system (enterprise metapackage)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB open source document-oriented database system (enterprise metapackage)
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This metapackage will install the mongo shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts.
Package: mongodb-enterprise-unstable-shell
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0, libkrb5-3
Description: MongoDB shell client (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongo shell.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the mongo shell.
Package: mongodb-enterprise-unstable-server
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0, libkrb5-3, libsnmp15, snmp
Description: MongoDB database server (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongod server.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the MongoDB server software, default configuration files, and init.d scripts.
Package: mongodb-enterprise-unstable-mongos
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0, libkrb5-3
Description: MongoDB sharding router (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB sharded cluster query router (enterprise)
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongos program.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains mongos, the MongoDB sharded cluster query router.
Package: mongodb-enterprise-unstable-tools
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0, libkrb5-3
Description: MongoDB tools (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs standard utilities for
interacting with MongoDB.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains standard utilities for interacting with MongoDB.

View File

@ -10,118 +10,108 @@ Package: mongodb-enterprise
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: mongodb-enterprise-shell, mongodb-enterprise-server, mongodb-enterprise-mongos, mongodb-enterprise-tools
Description: MongoDB cross-platform document-oriented database system (enterprise metapackage)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB open source document-oriented database system (enterprise metapackage)
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This metapackage will install the mongo shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts.
Package: mongodb-enterprise-shell
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0
Description: MongoDB shell client (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongo shell.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the mongo shell.
Package: mongodb-enterprise-server
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0, libsnmp15
Description: MongoDB database server (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongod server.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the MongoDB server software, default configuration files, and init.d scripts.
Package: mongodb-enterprise-mongos
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0
Description: MongoDB sharding router (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB sharded cluster query router (enterprise)
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongos program.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains mongos, the MongoDB sharded cluster query router.
Package: mongodb-enterprise-tools
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-org-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), libsasl2-2, libssl1.0.0
Description: MongoDB tools (enterprise)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs standard utilities for
interacting with MongoDB.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains standard utilities for interacting with MongoDB.

View File

@ -10,118 +10,108 @@ Package: mongodb-org-unstable
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), mongodb-org-unstable-shell, mongodb-org-unstable-server, mongodb-org-unstable-mongos, mongodb-org-unstable-tools
Description: MongoDB cross-platform document-oriented database system (metapackage)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB open source document-oriented database system (metapackage)
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This metapackage will install the mongo shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts.
Package: mongodb-org-unstable-shell
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB shell client
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongo shell.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the mongo shell.
Package: mongodb-org-unstable-server
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB database server
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongod server.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the MongoDB server software, default configuration files, and init.d scripts.
Package: mongodb-org-unstable-mongos
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB sharding router
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB sharded cluster query router
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongos program.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains mongos, the MongoDB sharded cluster query router.
Package: mongodb-org-unstable-tools
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB tools
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs standard utilities for
interacting with MongoDB.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains standard utilities for interacting with MongoDB.

View File

@ -10,118 +10,108 @@ Package: mongodb-org
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), mongodb-org-shell, mongodb-org-server, mongodb-org-mongos, mongodb-org-tools
Description: MongoDB cross-platform document-oriented database system (metapackage)
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB open source document-oriented database system (metapackage)
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This metapackage will install the mongo shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts.
Package: mongodb-org-shell
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB shell client
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongo shell.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the mongo shell.
Package: mongodb-org-server
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB database server
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongod server.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains the MongoDB server software, default configuration files, and init.d scripts.
Package: mongodb-org-mongos
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB sharding router
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
Description: MongoDB sharded cluster query router
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs the mongos program.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains mongos, the MongoDB sharded cluster query router.
Package: mongodb-org-tools
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-server, mongodb-nightly, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen
Architecture: any
Depends: libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: MongoDB tools
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features :
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDBs native replication and automated failover enable enterprise-grade reliability and operational flexibility.
.
* Collection oriented storage - easy storage of object-
style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large
objects (e.g. videos)
* Automatic partitioning for cloud-level scalability
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.
.
High performance, scalability, and reasonable depth of
functionality are the goals for the project.
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.
.
This Debian package installs standard utilities for
interacting with MongoDB.
MongoDB features:
* JSON Data Model with Dynamic Schemas
* Auto-Sharding for Horizontal Scalability
* Built-In Replication for High Availability
* Rich Secondary Indexes, including geospatial
* TTL indexes
* Text Search
* Aggregation Framework & Native MapReduce
.
This package contains standard utilities for interacting with MongoDB.

571
debian/mongodump.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGODUMP" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGODUMP" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongodump \- MongoDB
mongodump \- MongoDB Data Dump Utility
.
.nr rst2man-indent-level 0
.
@ -30,18 +30,6 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.INDENT 0.0
.IP \(bu 2
\fI\%Synopsis\fP
.IP \(bu 2
\fI\%Options\fP
.IP \(bu 2
\fI\%Behavior\fP
.IP \(bu 2
\fI\%Required User Privileges\fP
.IP \(bu 2
\fI\%Usage\fP
.UNINDENT
.SH SYNOPSIS
.sp
\fBmongodump\fP is a utility for creating a binary export of the
@ -54,23 +42,6 @@ restore databases.
instances, in addition to reading directly from MongoDB data files
without an active \fBmongod\fP\&.
.sp
\fBIMPORTANT:\fP
.INDENT 0.0
.INDENT 3.5
\fBmongodump\fP does \fInot\fP create output for the
\fBlocal\fP database.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
The format of data created by \fBmongodump\fP tool from the
2.2 distribution or later is different and incompatible with
earlier versions of \fBmongod\fP\&.
.UNINDENT
.UNINDENT
.sp
\fBSEE ALSO:\fP
.INDENT 0.0
.INDENT 3.5
@ -79,6 +50,59 @@ http://docs.mongodb.org/manual/tutorial/backup\-sharded\-cluster\-with\-database
and http://docs.mongodb.org/manual/core/backups\&.
.UNINDENT
.UNINDENT
.SH BEHAVIOR
.sp
\fBmongodump\fP does \fInot\fP dump the content of the \fBlocal\fP database.
.sp
The data format used by \fBmongodump\fP from version 2.2 or
later is \fIincompatible\fP with earlier versions of \fBmongod\fP\&.
Do not use recent versions of \fBmongodump\fP to back up older
data stores.
.sp
When running \fBmongodump\fP against a \fBmongos\fP instance
where the \fIsharded cluster\fP consists of \fIreplica sets\fP, the \fIread preference\fP of the operation will prefer reads
from \fIsecondary\fP members of the set.
.sp
Changed in version 2.2: When used in combination with \fBfsync\fP or
\fBdb.fsyncLock()\fP, \fBmongod\fP may block some
reads, including those from \fBmongodump\fP, when
queued write operation waits behind the \fBfsync\fP
lock.
.SH REQUIRED ACCESS
.SS Backup Collections
.sp
To backup all the databases in a cluster via \fBmongodump\fP, you
should have the \fBbackup\fP role. The \fBbackup\fP role provides
all the needed privileges for backing up all database. The role confers no
additional access, in keeping with the policy of \fIleast privilege\fP\&.
.sp
To backup a given database, you must have \fBread\fP access on the database.
Several roles provide this access, including the \fBbackup\fP role.
.sp
To backup the \fBsystem.profile\fP collection in a database, you must have
\fBread\fP access on certain system collections in the database. Several roles
provide this access, including the \fBclusterAdmin\fP and
\fBdbAdmin\fP roles.
.SS Backup Users
.sp
Changed in version 2.6.
.sp
To backup users and \fIuser\-defined roles\fP for a
given database, you must have access to the \fBadmin\fP database. MongoDB
stores the user data and role definitions for all databases in the
\fBadmin\fP database.
.sp
Specifically, to backup a given database\(aqs users, you must have the
\fBfind\fP \fIaction\fP on the \fBadmin\fP
database\(aqs \fBadmin.system.users\fP collection. The \fBbackup\fP
and \fBuserAdminAnyDatabase\fP roles both provide this privilege.
.sp
To backup the user\-defined roles on a database, you must have the
\fBfind\fP action on the \fBadmin\fP database\(aqs
\fBadmin.system.roles\fP collection. Both the \fBbackup\fP and
\fBuserAdminAnyDatabase\fP roles provide this privilege.
.SH OPTIONS
.INDENT 0.0
.TP
@ -90,43 +114,52 @@ and http://docs.mongodb.org/manual/core/backups\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongodump\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including the
option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBmongodump\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBmongodump\fP utility and exits.
Returns the \fBmongodump\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>
Specifies a resolvable hostname for the \fBmongod\fP that you wish to
use to create the database dump. By default \fBmongodump\fP will
attempt to connect to a MongoDB process ruining on the localhost
port number \fB27017\fP\&.
.B \-\-host <hostname><:port>, \-h
Specifies a resolvable hostname for the \fBmongod\fP to which to
connect. By default \fBmongodump\fP attempts to connect to a MongoDB instance
running on the localhost on port number \fB27017\fP\&.
.sp
Optionally, specify a port number to connect a MongoDB instance
running on a port other than \fB27017\fP\&.
.sp
To connect to a replica set, use the \fI\-\-host\fP
argument with a setname, followed by a slash and a comma\-separated
list of host names and port numbers. The \fBmongodump\fP
utility will, given the seed of at least one connected set member,
connect to the primary member of that set. This option would resemble:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
mongodump \-\-host repl0/mongo0.example.net,mongo0.example.net:27018,mongo1.example.net,mongo2.example.net
<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
.ft P
.fi
.UNINDENT
@ -138,62 +171,131 @@ specifying the host and port number directly.
.INDENT 0.0
.TP
.B \-\-port <port>
Specifies the port number, if the MongoDB instance is not running
on the standard port. (i.e. \fB27017\fP) You may also specify a port
number using the \fI\-\-host\fP option.
Specifies the port number when the MongoDB instance is not running on the
standard port of \fB27017\fP\&. You may also specify the port number
using the \fB\-\-host\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongodump\fP to connect to
the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongodump\fP, disable IPv6 support
by default.
Enables IPv6 support, which allows \fBmongodump\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongodump\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
instances in mongodump\&.
New in version 2.6.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
SSL support in mongodump is not compiled into the default
distribution of MongoDB. See
http://docs.mongodb.org/manual/tutorial/configure\-ssl for more information on SSL
and MongoDB.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
Additionally, mongodump does not support connections to
\fBmongod\fP instances that require client certificate
validation.
.UNINDENT
.UNINDENT
.sp
Allows \fBmongodump\fP to connect to \fBmongod\fP
instance over an SSL connection.
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if
your database requires authentication. Use in conjunction with the
\fI\-\-password\fP option to supply a
password.
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fI\-\-username\fP
option to supply a username.
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP and do
not pass an argument to \fI\%--password\fP, \fBmongodump\fP
will prompt for a password interactively. If you do not specify a
password on the command line, \fI\%--password\fP must be the last
argument specified.
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongodump\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongodump\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongodump\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -201,17 +303,10 @@ argument specified.
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongodump\fP assumes that the database specified to the
\fI\%--db\fP argument holds the user\(aqs credentials, unless you
specify \fI\%--authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongodump\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -219,235 +314,151 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongodump\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongodump\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dbpath <path>
Specifies the directory of the MongoDB data files. If used, the
\fI\%--dbpath\fP option enables \fBmongodump\fP to attach
directly to local data files and copy the data without the
\fBmongod\fP\&. To run with \fI\%--dbpath\fP,
\fBmongodump\fP needs to restrict access to the data
directory: as a result, no \fBmongod\fP can access the same
path while the process runs.
\fI\-\-dbpath\fP option enables \fBmongodump\fP to attach directly to local data
files without a running \fBmongod\fP\&. When run with \fI\-\-dbpath\fP,
\fBmongodump\fP locks access to the data directory. No \fBmongod\fP can
access the same path while the process runs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-directoryperdb
Use the \fI\%--directoryperdb\fP in conjunction with the
corresponding option to \fBmongod\fP\&. This option allows
\fBmongodump\fP to read data files organized with each
database located in a distinct directory. This option is only
relevant when specifying the \fI\%--dbpath\fP option.
When used in conjunction with the corresponding option in
\fBmongod\fP, allows \fBmongodump\fP to access data from MongoDB
instances that use an on\-disk format where every database has a distinct
directory. This option is only relevant when specifying the
\fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal
Allows \fBmongodump\fP operations to use the durability
\fIjournal\fP to ensure that the export is in a
consistent state. This option is only relevant when specifying the
\fI\%--dbpath\fP option.
Allows \fBmongodump\fP operations to use the durability \fIjournal\fP to
ensure data files remain valid and recoverable. This option is only
relevant when specifying the \fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-db <db>, \-d <db>
Use the \fI\%--db\fP option to specify a database for
\fBmongodump\fP to backup. If you do not specify a DB,
\fBmongodump\fP copies all databases in this instance into the
dump files. Use this option to backup or copy a smaller subset of
your data.
.B \-\-db <database>, \-d
Specifies a database to backup. If you do not specify a database,
\fBmongodump\fP copies all databases in this instance into the dump
files.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-collection <collection>, \-c <collection>
Use the \fI\%--collection\fP option to specify a collection for
\fBmongodump\fP to backup. If you do not specify a collection,
this option copies all collections in the specified database or
instance to the dump files. Use this option to backup or copy a
smaller subset of your data.
.B \-\-collection <collection>, \-c
Specifies a collection to backup. If you do not specify a collection,
this option copies all collections in the specified database or instance
to the dump files.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-out <path>, \-o <path>
Specifies a directory where \fBmongodump\fP saves the output of
the database dump. By default, \fBmongodump\fP saves output
files in a directory named \fBdump\fP in the current working directory.
.B \-\-out <path>, \-o
Specifies the directory where \fBmongodump\fP saves the output of
the database dump. By default, \fBmongodump\fP saves output files
in a directory named \fBdump\fP in the current working directory.
.sp
To send the database dump to standard output, specify "\fB\-\fP"
instead of a path. Write to standard output if you want process the
output before saving it, such as to use \fBgzip\fP to compress the
dump. When writing standard output, \fBmongodump\fP does not
write the metadata that writes in a \fB<dbname>.metadata.json\fP file
when writing to files directly.
To send the database dump to standard output, specify "\fB\-\fP" instead of
a path. Write to standard output if you want process the output before
saving it, such as to use \fBgzip\fP to compress the dump. When writing
standard output, \fBmongodump\fP does not write the metadata that
writes in a \fB<dbname>.metadata.json\fP file when writing to files
directly.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-query <json>, \-q <json>
Provides a query to limit (optionally) the documents included in
the output of \fBmongodump\fP\&.
.B \-\-query <json>, \-q
Provides a \fIJSON document\fP as a query that optionally limits the
documents included in the output of \fBmongodump\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-oplog
Use this option to ensure that \fBmongodump\fP creates a dump
of the database that includes an \fIoplog\fP, to create a
point\-in\-time snapshot of the state of a \fBmongod\fP instance. To
restore to a specific point\-in\-time backup, use the output created
with this option in conjunction with \fImongorestore \-\-oplogReplay\fP\&.
Ensures that \fBmongodump\fP creates a dump of
the database that includes a partial \fIoplog\fP containing operations
from the duration of the \fBmongodump\fP operation. This oplog
produces an effective point\-in\-time snapshot of the state of a
\fBmongod\fP instance. To restore to a specific point\-in\-time
backup, use the output created with this option in conjunction with
\fImongorestore \-\-oplogReplay\fP\&.
.sp
Without \fI\%--oplog\fP, if there are write operations during the
dump operation, the dump will not reflect a single moment in
time. Changes made to the database during the update process can
affect the output of the backup.
Without \fI\%\-\-oplog\fP, if there are write operations during the dump
operation, the dump will not reflect a single moment in time. Changes
made to the database during the update process can affect the output of
the backup.
.sp
\fI\%--oplog\fP has no effect when running \fBmongodump\fP
against a \fBmongos\fP instance to dump the entire contents of
a sharded cluster. However, you can use \fI\%--oplog\fP to dump
\fI\%\-\-oplog\fP has no effect when running \fBmongodump\fP
against a \fBmongos\fP instance to dump the entire contents of a
sharded cluster. However, you can use \fI\%\-\-oplog\fP to dump
individual shards.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
\fI\%--oplog\fP only works against nodes that maintain an
\fIoplog\fP\&. This includes all members of a replica set, as
well as \fImaster\fP nodes in master/slave replication
deployments.
.UNINDENT
.UNINDENT
\fI\%\-\-oplog\fP only works against nodes that maintain an
\fIoplog\fP\&. This includes all members of a replica set, as well as
\fImaster\fP nodes in master/slave replication deployments.
.sp
\fI\%\-\-oplog\fP does not dump the oplog collection.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-repair
Use this option to run a repair option in addition to dumping the
database. The repair option attempts to repair a database that may
be in an inconsistent state as a result of an improper shutdown or
Runs a repair option in addition to dumping the
database. The repair option attempts to repair a database that may be in
an invalid state as a result of an improper shutdown or
\fBmongod\fP crash.
.sp
\fBNOTE:\fP
The \fI\%\-\-repair\fP option uses aggressive data\-recovery algorithms
that may produce a large amount of duplication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-forceTableScan
Forces \fBmongodump\fP to scan the data store directly: typically,
\fBmongodump\fP saves entries as they appear in the index of the
\fB_id\fP field. Use \fI\-\-forceTableScan\fP to skip the index and scan
the data directly. Typically there are two cases where this behavior is
preferable to the default:
.INDENT 7.0
.IP 1. 3
If you have key sizes over 800 bytes that would not be present in the
\fB_id\fP index.
.IP 2. 3
Your database uses a custom \fB_id\fP field.
.UNINDENT
.sp
When you run with \fI\-\-forceTableScan\fP, \fBmongodump\fP does
not use \fB$snapshot\fP\&. As a result, the dump produced by
\fBmongodump\fP can reflect the state of the database at many
different points in time.
.sp
\fBIMPORTANT:\fP
.INDENT 7.0
.INDENT 3.5
The \fI\%--repair\fP option uses aggressive
data\-recovery algorithms that may produce a large amount of
duplication.
Use \fI\-\-forceTableScan\fP with extreme caution and
consideration.
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-forceTableScan
Forces \fBmongodump\fP to scan the data store directly:
typically, \fBmongodump\fP saves entries as they appear in the
index of the \fB_id\fP field. Use \fI\%--forceTableScan\fP to skip
the index and scan the data directly. Typically there are two cases
where this behavior is preferable to the default:
.INDENT 7.0
.IP 1. 3
If you have key sizes over 800 bytes that would not be present
in the \fB_id\fP index.
.IP 2. 3
Your database uses a custom \fB_id\fP field.
.B \-\-dumpDbUsersAndRoles
Includes user and role definitions when performing \fBmongodump\fP
on a specific database. This option applies only when you specify a
database in the \fI\-\-db\fP option. MongoDB always includes user and
role definitions when \fBmongodump\fP applies to an entire instance
and not just a specific database.
.UNINDENT
.SH USE
.sp
When you run with \fI\%--forceTableScan\fP, \fBmongodump\fP
does not use \fB$snapshot\fP\&. As a result, the dump produced
by \fBmongodump\fP can reflect the state of the database at
many different points in time.
.sp
\fBIMPORTANT:\fP
.INDENT 7.0
.INDENT 3.5
Use \fI\%--forceTableScan\fP with extreme caution
and consideration.
.UNINDENT
.UNINDENT
.UNINDENT
.SH BEHAVIOR
.sp
When running \fBmongodump\fP against a \fBmongos\fP instance
where the \fIsharded cluster\fP consists of \fIreplica sets\fP, the \fIread preference\fP of the operation will prefer reads
from \fIsecondary\fP members of the set.
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
Changed in version 2.2: When used in combination with \fBfsync\fP or
\fBdb.fsyncLock()\fP, \fBmongod\fP may block some
reads, including those from \fBmongodump\fP, when
queued write operation waits behind the \fBfsync\fP
lock.
.UNINDENT
.UNINDENT
.SH REQUIRED USER PRIVILEGES
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
User privileges changed in MongoDB 2.4.
.UNINDENT
.UNINDENT
.sp
The user must have appropriate privileges to read data from database
holding collections in order to use \fBmongodump\fP\&. Consider the
following \fBrequired privileges\fP for
the following \fBmongodump\fP operations:
.TS
center;
|l|l|.
_
T{
Task
T} T{
Required Privileges
T}
_
T{
All collections in a database except \fBsystem.users\fP\&.
T} T{
\fBread\fP\&. [1]
T}
_
T{
All collections in a database, including \fBsystem.users\fP\&.
T} T{
\fBread\fP [1] and \fBuserAdmin\fP\&.
T}
_
T{
All databases. [3]
T} T{
\fBreadAnyDatabase\fP, \fBuserAdminAnyDatabase\fP,
and \fBclusterAdmin\fP\&. [2]
T}
_
.TE
.sp
See http://docs.mongodb.org/manual/reference/user\-privileges and
http://docs.mongodb.org/manual/reference/privilege\-documents for more information on user
roles.
.IP [1] 5
You may provision \fBreadWrite\fP
instead of \fBread\fP\&.
.IP [2] 5
\fBclusterAdmin\fP provides the ability to
run the \fBlistDatabases\fP command, to list all existing
databases.
.IP [3] 5
If any database runs with profiling enabled,
\fBmongodump\fP may need the
\fBdbAdminAnyDatabase\fP privilege to dump the
\fBsystem.profile\fP collection.
.SH USAGE
.sp
See the http://docs.mongodb.org/manual/tutorial/backup\-databases\-with\-binary\-database\-dumps
See the http://docs.mongodb.org/manual/tutorial/backup\-with\-mongodump
for a larger overview of \fBmongodump\fP usage. Also see the
\fBmongorestore\fP document for an overview of the
\fBmongorestore\fP, which provides the related inverse
@ -501,6 +512,6 @@ mongodump \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-pas
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

454
debian/mongoexport.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOEXPORT" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOEXPORT" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongoexport \- MongoDB
mongoexport \- MongoDB Export Utility
.
.nr rst2man-indent-level 0
.
@ -38,17 +38,13 @@ http://docs.mongodb.org/manual/core/import\-export document for a more in depth
usage overview, and the \fBmongoimport\fP document for more
information regarding the \fBmongoimport\fP utility, which
provides the inverse "importing" capability.
.SH CONSIDERATIONS
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Do not use \fBmongoimport\fP and \fBmongoexport\fP for
full\-scale backups because they may not reliably capture data type
information. Use \fBmongodump\fP and \fBmongorestore\fP as
described in http://docs.mongodb.org/manual/core/backups for this kind of
functionality.
.UNINDENT
.UNINDENT
full\-scale production backups because they may not reliably capture
data type information. Use \fBmongodump\fP and
\fBmongorestore\fP as described in http://docs.mongodb.org/manual/core/backups for this
kind of functionality.
.SH OPTIONS
.INDENT 0.0
.TP
@ -60,34 +56,46 @@ functionality.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongoexport\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including
the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBmongoexport\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBmongoexport\fP utility.
Returns the \fBmongoexport\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>
Specifies a resolvable hostname for the \fBmongod\fP from which you
want to export data. By default \fBmongoexport\fP attempts to
connect to a MongoDB process ruining on the localhost port number
\fB27017\fP\&.
.B \-\-host <hostname><:port>, \-h
Specifies a resolvable hostname for the \fBmongod\fP to which to
connect. By default \fBmongoexport\fP attempts to connect to a MongoDB instance
running on the localhost on port number \fB27017\fP\&.
.sp
Optionally, specify a port number to connect a MongoDB instance
running on a port other than \fB27017\fP\&.
.sp
To connect to a replica set, you can specify the replica set seed
name, and a seed list of set members, in the following format:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
@ -98,65 +106,138 @@ name, and a seed list of set members, in the following format:
.fi
.UNINDENT
.UNINDENT
.sp
You can always connect directly to a single MongoDB instance by
specifying the host and port number directly.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-port <port>
Specifies the port number, if the MongoDB instance is not running on
the standard port. (i.e. \fB27017\fP) You may also specify a port
number using the \fImongoexport \-\-host\fP command.
Specifies the port number when the MongoDB instance is not running on the
standard port of \fB27017\fP\&. You may also specify the port number
using the \fB\-\-host\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongoexport\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongoexport\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongoexport\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongoexport\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
instances in mongoexport\&.
New in version 2.6.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
SSL support in mongoexport is not compiled into the default
distribution of MongoDB. See
http://docs.mongodb.org/manual/tutorial/configure\-ssl for more information on SSL
and MongoDB.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
Additionally, mongoexport does not support connections to
\fBmongod\fP instances that require client certificate
validation.
.UNINDENT
.UNINDENT
.sp
Allows \fBmongoexport\fP to connect to \fBmongod\fP
instance over an SSL connection.
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if your
database requires authentication. Use in conjunction with the
\fImongoexport \-\-password\fP option to supply a password.
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fI\-\-username\fP
option to supply a username.
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP and
do not pass an argument to \fI\-\-password\fP,
\fBmongoexport\fP will prompt for a password interactively. If
you do not specify a password on the command line,
\fI\-\-password\fP must be the last argument specified.
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongoexport\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongoexport\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongoexport\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -164,17 +245,10 @@ you do not specify a password on the command line,
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongoexport\fP assumes that the database specified to the
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongoexport\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -182,59 +256,52 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongoexport\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongoexport\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dbpath <path>
Specifies the directory of the MongoDB data files. If used, the
\fB\-\-dbpath\fP option enables \fBmongoexport\fP to attach
directly to local data files and insert the data without the
\fBmongod\fP\&. To run with \fB\-\-dbpath\fP, \fBmongoexport\fP
needs to lock access to the data directory: as a result, no
\fBmongod\fP can access the same path while the process runs.
\fI\-\-dbpath\fP option enables \fBmongoexport\fP to attach directly to local data
files without a running \fBmongod\fP\&. When run with \fI\-\-dbpath\fP,
\fBmongoexport\fP locks access to the data directory. No \fBmongod\fP can
access the same path while the process runs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-directoryperdb
Use the \fI\-\-directoryperdb\fP in conjunction with the
corresponding option to \fBmongod\fP, which allows
\fBmongoexport\fP to export data from MongoDB instances that
have every database\(aqs files saved in discrete directories on the
disk. This option is only relevant when specifying the
\fI\-\-dbpath\fP option.
When used in conjunction with the corresponding option in
\fBmongod\fP, allows \fBmongoexport\fP to export data from
MongoDB instances that have every database\(aqs files saved in discrete
directories on the disk. This option is only relevant when specifying
the \fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal
Allows \fBmongoexport\fP operations to access the durability
\fIjournal\fP to ensure that the export is in a
consistent state. This option is only relevant when specifying the
\fI\-\-dbpath\fP option.
Allows \fBmongoexport\fP operations to use the durability \fIjournal\fP to
ensure data files remain valid and recoverable. This option is only
relevant when specifying the \fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-db <db>, \-d <db>
Use the \fI\-\-db\fP option to specify the name of the database
that contains the collection you want to export.
.B \-\-db <database>, \-d
Specifies the name of the database on which to run \fBmongoexport\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-collection <collection>, \-c <collection>
Use the \fI\-\-collection\fP option to specify the collection
that you want \fBmongoexport\fP to export.
.B \-\-collection <collection>, \-c
Specifies the collection to export.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-fields <field1[,field2]>, \-f <field1[,field2]>
Specify a field or fields to \fIinclude\fP in the export. Use a comma
.B \-\-fields <field1[,field2]>, \-f
Specifies a field or fields to \fIinclude\fP in the export. Use a comma
separated list of fields to specify multiple fields.
.sp
For \fI\-\-csv\fP output formats,
@ -249,29 +316,27 @@ its fields, not just the specified field within the document.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-fieldFile <file>
.B \-\-fieldFile <filename>
As an alternative to \fI\-\-fields\fP, the
\fI\-\-fieldFile\fP option allows you to
specify in a file the field or fields to \fIinclude\fP in the export and
is \fBonly valid\fP with the \fI\-\-csv\fP
option. The file must have only one field per line, and the line(s)
must end with the LF character (\fB0x0A\fP).
specify in a file the field or fields to \fIinclude\fP in the export and is
\fBonly valid\fP with the \fI\-\-csv\fP option. The
file must have only one field per line, and the line(s) must end with
the LF character (\fB0x0A\fP).
.sp
\fBmongoexport\fP includes only the specified field(s). The
specified field(s) can be a field within a sub\-document.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-query <JSON>, \-q <JSON>
.B \-\-query <JSON>, \-q
Provides a \fIJSON document\fP as a query that optionally limits
the documents returned in the export.
.INDENT 7.0
.INDENT 3.5
.SH EXAMPLE
the documents returned in the export. Specify JSON in \fBstrict
format\fP\&.
.sp
Given a collection named \fBrecords\fP in the database \fBtest\fP
with the following documents:
.INDENT 0.0
For example, given a collection named \fBrecords\fP in the database
\fBtest\fP with the following documents:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
@ -286,10 +351,10 @@ with the following documents:
.UNINDENT
.UNINDENT
.sp
The following \fBmongoexport\fP uses the \fI\-q\fP
option to export only the documents with the field \fBa\fP greater
than or equal to (\fB$gte\fP) to \fB3\fP:
.INDENT 0.0
The following \fBmongoexport\fP uses the \fI\%\-q\fP option to
export only the documents with the field \fBa\fP greater than or equal to
(\fB$gte\fP) to \fB3\fP:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
@ -301,7 +366,7 @@ mongoexport \-d test \-c records \-q "{ a: { \e$gte: 3 } } }" \-\-out exportdir/
.UNINDENT
.sp
The resulting file contains the following documents:
.INDENT 0.0
.INDENT 7.0
.INDENT 3.5
.sp
.nf
@ -312,22 +377,30 @@ The resulting file contains the following documents:
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
You can sort the results with the \fI\%\-\-sort\fP option to
\fBmongoexport\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-csv
Changes the export format to a comma separated values (CSV)
Changes the export format to a comma\-separated\-values (CSV)
format. By default \fBmongoexport\fP writes data using one
\fIJSON\fP document for every MongoDB document.
.sp
If you specify \fI\%--csv\fP, then you must also use either
If you specify \fI\%\-\-csv\fP, then you must also use either
the \fI\-\-fields\fP or the \fI\-\-fieldFile\fP option to
declare the fields to export from the collection.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-out <file>, \-o
Specifies a file to write the export to. If you do not specify a file
name, the \fBmongoexport\fP writes data to standard output
(e.g. \fBstdout\fP).
.UNINDENT
.INDENT 0.0
.TP
.B \-\-jsonArray
Modifies the output of \fBmongoexport\fP to write the
entire contents of the export as a single \fIJSON\fP array. By
@ -347,20 +420,13 @@ This is the default behavior.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-out <file>, \-o <file>
Specify a file to write the export to. If you do not specify a file
name, the \fBmongoexport\fP writes data to standard output
(e.g. \fBstdout\fP).
.UNINDENT
.INDENT 0.0
.TP
.B \-\-forceTableScan
New in version 2.2.
.sp
Forces \fBmongoexport\fP to scan the data store directly:
typically, \fBmongoexport\fP saves entries as they appear in the
index of the \fB_id\fP field. Use \fI\-\-forceTableScan\fP to skip
index of the \fB_id\fP field. Use \fI\%\-\-forceTableScan\fP to skip
the index and scan the data directly. Typically there are two cases
where this behavior is preferable to the default:
.INDENT 7.0
@ -371,7 +437,7 @@ in the \fB_id\fP index.
Your database uses a custom \fB_id\fP field.
.UNINDENT
.sp
When you run with \fI\-\-forceTableScan\fP, \fBmongoexport\fP
When you run with \fI\%\-\-forceTableScan\fP, \fBmongoexport\fP
does not use \fB$snapshot\fP\&. As a result, the export produced
by \fBmongoexport\fP can reflect the state of the database at
many different points in time.
@ -379,12 +445,52 @@ many different points in time.
\fBWARNING:\fP
.INDENT 7.0
.INDENT 3.5
Use \fI\-\-forceTableScan\fP with extreme caution
Use \fI\%\-\-forceTableScan\fP with extreme caution
and consideration.
.UNINDENT
.UNINDENT
.UNINDENT
.SH USAGE
.INDENT 0.0
.TP
.B \-\-skip <number>
Use \fI\%\-\-skip\fP to control where \fBmongoexport\fP begins
exporting documents. See \fBskip()\fP for information about
the underlying operation.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-limit <number>
Specifies a maximum number of documents to include in the
export. See \fBlimit()\fP for information about
the underlying operation.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sort <JSON>
Specifies an ordering for exported results. If an index does
\fBnot\fP exist that can support the sort operation, the results must
be \fIless than\fP 32 megabytes.
.sp
Use \fI\%\-\-sort\fP conjunction with \fI\%\-\-skip\fP and
\fI\%\-\-limit\fP to limit number of exported documents.
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
mongoexport \-d test \-c records \-\-sort \(aq{a: 1}\(aq \-\-limit 100 \-\-out export.0.json
mongoexport \-d test \-c records \-\-sort \(aq{a: 1}\(aq \-\-limit 100 \-\-skip 100 \-\-out export.1.json
mongoexport \-d test \-c records \-\-sort \(aq{a: 1}\(aq \-\-limit 100 \-\-skip 200 \-\-out export.2.json
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
See \fBsort()\fP for information about the underlying
operation.
.UNINDENT
.SH USE
.SS Export in CSV Format
.sp
In the following example, \fBmongoexport\fP exports the
collection \fBcontacts\fP from the \fBusers\fP database from the
@ -403,6 +509,7 @@ mongoexport \-\-db users \-\-collection contacts \-\-csv \-\-fieldFile fields.tx
.fi
.UNINDENT
.UNINDENT
.SS Export in JSON Format
.sp
The next example creates an export of the collection \fBcontacts\fP
from the MongoDB instance running on the localhost port number \fB27017\fP,
@ -418,6 +525,7 @@ mongoexport \-\-db sales \-\-collection contacts \-\-out contacts.json \-\-journ
.fi
.UNINDENT
.UNINDENT
.SS Export Collection Directly From Data Files
.sp
The following example exports the collection \fBcontacts\fP from the
\fBsales\fP database located in the MongoDB data files located at
@ -442,12 +550,12 @@ connected to the data files located in the \fB/srv/mongodb/\fP
directory.
.UNINDENT
.UNINDENT
.SS Export from Remote Host Running with Authentication
.sp
The final example exports the collection \fBcontacts\fP from the
The following example exports the collection \fBcontacts\fP from the
database \fBmarketing\fP . This data resides on the MongoDB instance
located on the host \fBmongodb1.example.net\fP running on port
\fB37017\fP, which requires the username \fBuser\fP and the password
\fBpass\fP\&.
located on the host \fBmongodb1.example.net\fP running on port \fB37017\fP,
which requires the username \fBuser\fP and the password \fBpass\fP\&.
.INDENT 0.0
.INDENT 3.5
.sp
@ -458,9 +566,69 @@ mongoexport \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-p
.fi
.UNINDENT
.UNINDENT
.SH TYPE FIDELITY
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
\fBmongoimport\fP and \fBmongoexport\fP do not reliably
preserve all rich \fIBSON\fP data types because \fIJSON\fP can
only represent a subset of the types supported by BSON. As a result,
data exported or imported with these tools may lose some measure of
fidelity. See http://docs.mongodb.org/manual/reference/mongodb\-extended\-json for more
information.
.UNINDENT
.UNINDENT
.sp
JSON can only represent a subset of the types supported by BSON. To
preserve type information, \fBmongoexport\fP uses the \fBstrict
mode representation\fP for certain
types.
.sp
For example, the following insert operation in the \fBmongo\fP
shell uses the \fBmongoShell mode representation\fP for the BSON types
\fBdata_date\fP and \fBdata_numberlong\fP:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
use test
db.traffic.insert( { _id: 1, volume: NumberLong(2980000), date: new Date() } )
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Use \fBmongoexport\fP to export the data:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
mongoexport \-\-db test \-\-collection traffic \-\-out traffic.json
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The exported data is in \fBstrict mode representation\fP to preserve type information:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{ "_id" : 1, "volume" : { "$numberLong" : "2980000" }, "date" : { "$date" : "2014\-03\-13T13:47:42.483\-0400" } }
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
See http://docs.mongodb.org/manual/reference/mongodb\-extended\-json for a complete list of
these types and the representations used.
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

274
debian/mongofiles.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOFILES" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOFILES" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongofiles \- MongoDB
mongofiles \- MongoDB GridFS Utility
.
.nr rst2man-indent-level 0
.
@ -82,90 +82,175 @@ For \fIreplica sets\fP,
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongofiles\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including
the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBmongofiles\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBmongofiles\fP utility.
Returns the \fBmongofiles\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>
Specifies a resolvable hostname for the \fBmongod\fP that
holds your GridFS system. By default \fBmongofiles\fP attempts
to connect to a MongoDB process ruining on the localhost port
number \fB27017\fP\&.
Specifies a resolvable hostname for the \fBmongod\fP that holds
your GridFS system. By default \fBmongofiles\fP attempts to connect
to a MongoDB process running on the localhost port number \fB27017\fP\&.
.sp
Optionally, specify a port number to connect a MongoDB instance
running on a port other than 27017.
Optionally, specify a port number to connect a MongoDB instance running
on a port other than 27017.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-port <port>
Specifies the port number, if the MongoDB instance is not running on
the standard port. (i.e. \fB27017\fP) You may also specify a port
number using the \fImongofiles \-\-host\fP command.
Specifies the port number when the MongoDB instance is not running on the
standard port of \fB27017\fP\&. You may also specify the port number
using the \fB\-\-host\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongofiles\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongofiles\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongofiles\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongofiles\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
instances in mongofiles\&.
New in version 2.6.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
SSL support in mongofiles is not compiled into the default
distribution of MongoDB. See
http://docs.mongodb.org/manual/tutorial/configure\-ssl for more information on SSL
and MongoDB.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
Additionally, mongofiles does not support connections to
\fBmongod\fP instances that require client certificate
validation.
.UNINDENT
.UNINDENT
.sp
Allows \fBmongofiles\fP to connect to \fBmongod\fP
instance over an SSL connection.
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if your
database requires authentication. Use in conjunction with the
\fImongofiles \-\-password\fP option to supply a password.
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fImongofiles \-\-username\fP option to
supply a username.
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP and
do not pass an argument to \fI\-\-password\fP,
\fBmongofiles\fP will prompt for a password interactively. If
you do not specify a password on the command line,
\fI\-\-password\fP must be the last argument specified.
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongofiles\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongofiles\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongofiles\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -173,17 +258,10 @@ you do not specify a password on the command line,
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongofiles\fP assumes that the database specified to the
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongofiles\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -191,82 +269,76 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongofiles\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongofiles\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dbpath <path>
Specifies the directory of the MongoDB data files. If used, the
\fI\-\-dbpath\fP option enables \fBmongofiles\fP to attach directly to
local data files interact with the GridFS data without the
\fBmongod\fP\&. To run with \fI\-\-dbpath\fP, \fBmongofiles\fP needs to lock
access to the data directory: as a result, no \fBmongod\fP can access
the same path while the process runs.
\fI\-\-dbpath\fP option enables \fBmongofiles\fP to attach directly to local data
files without a running \fBmongod\fP\&. When run with \fI\-\-dbpath\fP,
\fBmongofiles\fP locks access to the data directory. No \fBmongod\fP can
access the same path while the process runs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-directoryperdb
Use the \fI\-\-directoryperdb\fP in conjunction with the corresponding
option to \fBmongod\fP, which allows \fBmongofiles\fP when
running with the \fI\-\-dbpath\fP option and MongoDB uses an
on\-disk format where every database has a distinct
When used in conjunction with the corresponding option in
\fBmongod\fP, allows \fBmongofiles\fP to access data from MongoDB
instances that use an on\-disk format where every database has a distinct
directory. This option is only relevant when specifying the
\fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal
Allows \fBmongofiles\fP operations to use the durability
\fIjournal\fP when running with \fI\-\-dbpath\fP
to ensure that the database maintains a recoverable state. This
forces \fBmongofiles\fP to record all data on disk regularly.
Allows \fBmongofiles\fP operations to use the durability \fIjournal\fP to
ensure data files remain valid and recoverable. This option is only
relevant when specifying the \fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-db <db>, \-d <db>
Use the \fI\-\-db\fP option to specify the MongoDB database that stores
or will store the GridFS files.
.B \-\-db <database>, \-d
Specifies the name of the database on which to run \fBmongofiles\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-collection <collection>, \-c <collection>
.B \-\-collection <collection>, \-c
This option has no use in this context and a future release may
remove it. See \fI\%SERVER-4931\fP for more information.
remove it. See \fI\%SERVER\-4931\fP for more information.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-local <filename>, \-l <filename>
.B \-\-local <filename>, \-l
Specifies the local filesystem name of a file for get and put
operations.
.sp
In the \fBmongofiles put\fP and \fBmongofiles get\fP
commands the required \fB<filename>\fP modifier refers to the name
the object will have in GridFS. \fBmongofiles\fP assumes that
this reflects the file\(aqs name on the local file
system. This setting overrides this default.
In the \fBmongofiles put\fP and \fBmongofiles get\fP commands,
the required \fB<filename>\fP modifier refers to the name the object will
have in GridFS. \fBmongofiles\fP assumes that this reflects the
file\(aqs name on the local file system. This setting overrides this
default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-type <MIME>, t <MIME>
Provides the ability to specify a \fIMIME\fP type to describe the
file inserted into GridFS storage. \fBmongofiles\fP omits this
option in the default operation.
.B \-\-type <MIME>
Provides the ability to specify a \fIMIME\fP type to describe the file
inserted into GridFS storage. \fBmongofiles\fP omits this option in
the default operation.
.sp
Use only with \fBmongofiles put\fP operations.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-replace, \-r
Alters the behavior of \fBmongofiles put\fP to replace
existing GridFS objects with the specified local file, rather than
adding an additional object with the same name.
Alters the behavior of \fBmongofiles put\fP to replace existing
GridFS objects with the specified local file, rather than adding an
additional object with the same name.
.sp
In the default operation, files will not be overwritten by a
\fBmongofiles put\fP option.
@ -415,6 +487,6 @@ mongofiles \-d records get 32\-corinth.lp
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

383
debian/mongoimport.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOIMPORT" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOIMPORT" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongoimport \- MongoDB
mongoimport \- MongoDB Import Utility
.
.nr rst2man-indent-level 0
.
@ -38,18 +38,14 @@ potentially, another third\-party export tool. See the
http://docs.mongodb.org/manual/core/import\-export document for a more in depth
usage overview, and the \fBmongoexport\fP document for more
information regarding \fBmongoexport\fP, which
provides the inverse "importing" capability.
provides the inverse "exporting" capability.
.SH CONSIDERATIONS
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Do not use \fBmongoimport\fP and \fBmongoexport\fP for
full instance, production backups because they will not reliably capture data type
information. Use \fBmongodump\fP and \fBmongorestore\fP as
described in http://docs.mongodb.org/manual/core/backups for this kind of
functionality.
.UNINDENT
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
@ -61,43 +57,52 @@ functionality.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongoimport\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including
the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBmongoimport\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBmongoimport\fP program.
Returns the \fBmongoimport\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>, \-h
Specifies a resolvable hostname for the \fBmongod\fP to which
you want to restore the database. By default \fBmongoimport\fP
will attempt to connect to a MongoDB process ruining on the
localhost port numbered \fB27017\fP\&.
Specifies a resolvable hostname for the \fBmongod\fP to which to
connect. By default \fBmongoimport\fP attempts to connect to a MongoDB instance
running on the localhost on port number \fB27017\fP\&.
.sp
Optionally, specify a port number to connect a MongoDB instance
running on a port other than \fB27017\fP\&.
.sp
To connect to a replica set, use the \fI\-\-host\fP argument with a
setname, followed by a slash and a comma\-separated list of host and
port names. \fBmongoimport\fP will, given the seed of at least
one connected set member, connect to the \fIprimary\fP of that set. This
option would resemble:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
\-\-host repl0/mongo0.example.net,mongo0.example.net:27018,mongo1.example.net,mongo2.example.net
<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
.ft P
.fi
.UNINDENT
@ -109,61 +114,131 @@ specifying the host and port number directly.
.INDENT 0.0
.TP
.B \-\-port <port>
Specifies the port number, if the MongoDB instance is not running on
the standard port. (i.e. \fB27017\fP) You may also specify a port
number using the \fImongoimport \-\-host\fP command.
Specifies the port number when the MongoDB instance is not running on the
standard port of \fB27017\fP\&. You may also specify the port number
using the \fB\-\-host\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongoimport\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongoimport\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongoimport\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongoimport\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
instances in mongoimport\&.
New in version 2.6.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
SSL support in mongoimport is not compiled into the default
distribution of MongoDB. See
http://docs.mongodb.org/manual/tutorial/configure\-ssl for more information on SSL
and MongoDB.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
Additionally, mongoimport does not support connections to
\fBmongod\fP instances that require client certificate
validation.
.UNINDENT
.UNINDENT
.sp
Allows \fBmongoimport\fP to connect to \fBmongod\fP
instance over an SSL connection.
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if your
database requires authentication. Use in conjunction with the
\fImongoimport \-\-password\fP option to supply a password.
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fImongoimport \-\-username\fP option to
supply a username.
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP and
do not pass an argument to \fI\-\-password\fP,
\fBmongoimport\fP will prompt for a password interactively. If
you do not specify a password on the command line,
\fI\-\-password\fP must be the last option.
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongoimport\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongoimport\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongoimport\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -171,17 +246,10 @@ you do not specify a password on the command line,
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongoimport\fP assumes that the database specified to the
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongoimport\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -189,107 +257,102 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongoimport\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongoimport\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dbpath <path>
Specifies the directory of the MongoDB data files. If used, the
\fI\-\-dbpath\fP option enables
\fBmongoimport\fP to attach directly to local data files and
insert the data without the \fBmongod\fP\&. To run with
\fB\-\-dbpath\fP, \fBmongoimport\fP needs to lock access to the
data directory: as a result, no \fBmongod\fP can access the
same path while the process runs.
\fI\-\-dbpath\fP option enables \fBmongoimport\fP to attach directly to local data
files without a running \fBmongod\fP\&. When run with \fI\-\-dbpath\fP,
\fBmongoimport\fP locks access to the data directory. No \fBmongod\fP can
access the same path while the process runs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-directoryperdb
Use the \fI\-\-directoryperdb\fP in conjunction with the
corresponding option to \fBmongod\fP, which allows
\fBmongoimport\fP to import data into MongoDB instances that
have every database\(aqs files saved in discrete directories on the
disk. This option is only relevant when specifying the
When used in conjunction with the corresponding option in
\fBmongod\fP, allows \fBmongoimport\fP to access data from MongoDB
instances that use an on\-disk format where every database has a distinct
directory. This option is only relevant when specifying the
\fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal
Allows \fBmongoexport\fP write to the durability
\fIjournal\fP to ensure that the data files will remain in a
consistent state during the write process. This option is only
Allows \fBmongoimport\fP operations to use the durability \fIjournal\fP to
ensure data files remain valid and recoverable. This option is only
relevant when specifying the \fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-db <db>, \-d <db>
Use the \fI\-\-db\fP option to specify a database for
\fBmongoimport\fP to import data.
.B \-\-db <database>, \-d
Specifies the name of the database on which to run \fBmongoimport\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-collection <collection>, \-c <collection>
Use the \fI\-\-collection\fP option to specify a collection for
\fBmongoimport\fP to import.
.B \-\-collection <collection>, \-c
Specifies the collection to import.
.sp
New in version 2.6: If you do not specify \fI\-\-collection\fP,
\fBmongoimport\fP takes the collection name from the input
filename. MongoDB omits the extension of the file from the
collection name, if the input file has an extension.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-fields <field1<,field2>>, \-f <field1[,field2]>
Specify a comma separated list of field names when importing
\fIcsv\fP or \fItsv\fP files that do not have field names in
the first (i.e. header) line of the file.
.B \-\-fields <field1[,field2]>, \-f
Specify a comma separated list of field names when importing \fIcsv\fP
or \fItsv\fP files that do not have field names in the first (i.e.
header) line of the file.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-fieldFile <filename>
As an alternative to \fI\%--fields\fP the \fI\%--fieldFile\fP
option allows you to specify a file (e.g. \fB<file>\fP) to that
holds a list of field names if your \fIcsv\fP or \fItsv\fP
file does not include field names in the first (i.e. header) line
of the file. Place one field per line.
As an alternative to \fI\%\-\-fields\fP, the \fI\%\-\-fieldFile\fP
option allows you to specify a file that holds a list of field names if
your \fIcsv\fP or \fItsv\fP file does not include field names in the
first line of the file (i.e. header). Place one field per line.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ignoreBlanks
In \fIcsv\fP and \fItsv\fP exports, ignore empty fields. If not
Ignores empty fields in \fIcsv\fP and \fItsv\fP exports. If not
specified, \fBmongoimport\fP creates fields without values in
imported documents.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-type <json|csv|tsv>
Declare the type of export format to import. The default format is
\fIJSON\fP, but it\(aqs possible to import \fIcsv\fP and
\fItsv\fP files.
Specifies the file type to import. The default format is \fIJSON\fP,
but it\(aqs possible to import \fIcsv\fP and \fItsv\fP files.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-file <filename>
Specify the location of a file containing the data to
import. \fBmongoimport\fP will read data from standard input
(e.g. "stdin.") if you do not specify a file.
Specifies the location and name of a file containing the data to import.
If you do not specify a file, \fBmongoimport\fP reads data from
standard input (e.g. "stdin").
.UNINDENT
.INDENT 0.0
.TP
.B \-\-drop
Modifies the import process so that the target instance
drops every collection before importing the collection from the
input.
Modifies the import process so that the target instance drops
every collection before importing the collection from the input.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-headerline
If using "\fI\-\-type csv\fP" or
"\fI\-\-type tsv\fP," use the first line as
field names. Otherwise, \fBmongoimport\fP will import the first
line as a distinct document.
If using \fI\-\-type csv\fP or \fI\-\-type
tsv\fP, uses the first line as field names.
Otherwise, \fBmongoimport\fP will import the first line as a
distinct document.
.UNINDENT
.INDENT 0.0
.TP
@ -299,7 +362,7 @@ database if they match an imported object, while inserting all
other objects.
.sp
If you do not specify a field or fields using the
\fI\%--upsertFields\fP \fBmongoimport\fP will upsert on the
\fI\%\-\-upsertFields\fP \fBmongoimport\fP will upsert on the
basis of the \fB_id\fP field.
.UNINDENT
.INDENT 0.0
@ -326,17 +389,14 @@ first error rather than continuing the operation despite errors.
.INDENT 0.0
.TP
.B \-\-jsonArray
Changed in version 2.2: The limit on document size increased from 4MB to 16MB.
.sp
Accept import of data expressed with multiple MongoDB documents
Accepts the import of data expressed with multiple MongoDB documents
within a single \fIJSON\fP array.
.sp
Use in conjunction with \fImongoexport \-\-jsonArray\fP to
Used in conjunction with \fImongoexport \-\-jsonArray\fP to
import data written as a single \fIJSON\fP array. Limited to
imports of 16 MB or smaller.
.UNINDENT
.SH USAGE
.SH USE
.sp
In this example, \fBmongoimport\fP imports the \fIcsv\fP
formatted data in the \fB/opt/backups/contacts.csv\fP into the
@ -353,10 +413,25 @@ mongoimport \-\-db users \-\-collection contacts \-\-type csv \-\-file /opt/back
.UNINDENT
.UNINDENT
.sp
Since \fBmongoimport\fP uses the input file name (minus the
extension) as the collection name if \fB\-c\fP or \fB\-\-collection\fP is
unspecified, the following example is equivalent to the previous
example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
mongoimport \-\-db users \-\-type csv \-\-file /opt/backups/contacts.csv
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
In the following example, \fBmongoimport\fP imports the data in
the \fIJSON\fP formatted file \fBcontacts.json\fP into the collection
\fBcontacts\fP on the MongoDB instance running on the localhost port
number 27017. Journaling is explicitly enabled.
number 27017.
.INDENT 0.0
.INDENT 3.5
.sp
@ -370,7 +445,6 @@ mongoimport \-\-collection contacts \-\-file contacts.json
.sp
In the next example, \fBmongoimport\fP takes data passed to it on
standard input (i.e. with a \fB|\fP pipe.) and imports it into the
collection \fBcontacts\fP in the \fBsales\fP database is the
MongoDB datafiles located at \fB/srv/mongodb/\fP\&. if the import process
encounters an error, the \fBmongoimport\fP will halt because of
the \fI\-\-stopOnError\fP option.
@ -402,9 +476,48 @@ mongoimport \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-p
.fi
.UNINDENT
.UNINDENT
.SH TYPE FIDELITY
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
\fBmongoimport\fP and \fBmongoexport\fP do not reliably
preserve all rich \fIBSON\fP data types because \fIJSON\fP can
only represent a subset of the types supported by BSON. As a result,
data exported or imported with these tools may lose some measure of
fidelity. See http://docs.mongodb.org/manual/reference/mongodb\-extended\-json for more
information.
.UNINDENT
.UNINDENT
.sp
JSON can only represent a subset of the types supported by BSON. To
preserve type information, \fBmongoimport\fP accepts \fBstrict
mode representation\fP for certain
types.
.sp
For example, to preserve type information for BSON types
\fBdata_date\fP and \fBdata_numberlong\fP during
\fBmongoimport\fP, the data should be in strict mode
representation, as in the following:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{ "_id" : 1, "volume" : { "$numberLong" : "2980000" }, "date" : { "$date" : "2014\-03\-13T13:47:42.483\-0400" } }
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For the \fBdata_numberlong\fP type, \fBmongoimport\fP
converts into a float during the import.
.sp
See http://docs.mongodb.org/manual/reference/mongodb\-extended\-json for a complete list of
these types and the representations used.
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

309
debian/mongooplog.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOOPLOG" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOOPLOG" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongooplog \- MongoDB
mongooplog \- MongoDB Oplog Utility
.
.nr rst2man-indent-level 0
.
@ -88,39 +88,49 @@ http://docs.mongodb.org/manual/core/backups, http://docs.mongodb.org/manual/core
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongooplog\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including the
option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBmongooplog\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBmongooplog\fP utility.
Returns the \fBmongooplog\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>, \-h
Specifies a resolvable hostname for the \fBmongod\fP instance
to which \fBmongooplog\fP will apply \fIoplog\fP operations
retrieved from the serve specified by the \fI\-\-from\fP
option.
Specifies a resolvable hostname for the \fBmongod\fP instance to
which \fBmongooplog\fP will apply \fIoplog\fP operations
retrieved from the server specified by the \fI\-\-from\fP option.
.sp
\fBmongooplog\fP assumes that all target \fBmongod\fP
instances are accessible by way of port \fB27017\fP\&. You may,
optionally, declare an alternate port number as part of the
hostname argument.
By default \fBmongooplog\fP attempts to connect to a MongoDB instance running
on the localhost on port number \fB27017\fP\&.
.sp
You can always connect directly to a single \fBmongod\fP
instance by specifying the host and port number directly.
.sp
To connect to a replica set, you can specify the replica set seed
name, and a seed list of set members, in the following format:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
@ -131,68 +141,140 @@ name, and a seed list of set members, in the following format:
.fi
.UNINDENT
.UNINDENT
.sp
You can always connect directly to a single MongoDB instance by
specifying the host and port number directly.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-port
Specifies the port number of the \fBmongod\fP instance where
\fBmongooplog\fP will apply \fIoplog\fP entries. Only
specify this option if the MongoDB instance that you wish to
connect to is not running on the standard port. (i.e. \fB27017\fP)
You may also specify a port number using the \fI\-\-host\fP command.
\fBmongooplog\fP will apply \fIoplog\fP entries. Specify
this option only if the MongoDB instance to connect to is not
running on the standard port of \fB27017\fP\&. You may also specify a
port number using the \fI\-\-host\fP command.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongooplog\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongooplog\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongooplog\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongooplog\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
instances in mongooplog\&.
New in version 2.6.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
SSL support in mongooplog is not compiled into the default
distribution of MongoDB. See
http://docs.mongodb.org/manual/tutorial/configure\-ssl for more information on SSL
and MongoDB.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
Additionally, mongooplog does not support connections to
\fBmongod\fP instances that require client certificate
validation.
.UNINDENT
.UNINDENT
.sp
Allows \fBmongooplog\fP to connect to \fBmongod\fP
instance over an SSL connection.
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if
your database requires authentication. Use in conjunction with the
\fI\-\-password\fP option to supply a
password.
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fI\-\-username\fP
option to supply a username.
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP and
do not pass an argument to \fI\-\-password\fP,
\fBmongooplog\fP will prompt for a password interactively. If
you do not specify a password on the command line,
\fI\-\-password\fP must be the last option.
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongooplog\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongooplog\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongooplog\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -200,17 +282,10 @@ you do not specify a password on the command line,
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongooplog\fP assumes that the database specified to the
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongooplog\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -218,79 +293,84 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongooplog\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongooplog\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dbpath <path>
Specifies a directory, containing MongoDB data files, to which
\fBmongooplog\fP will apply operations from the \fIoplog\fP
of the database specified with the \fI\-\-from\fP
option. When used, the \fI\-\-dbpath\fP option enables
\fBmongo\fP to attach directly to local data files and write
data without a running \fBmongod\fP instance. To run with
\fI\-\-dbpath\fP, \fBmongooplog\fP needs to restrict access
to the data directory: as a result, no \fBmongod\fP can be
\fBmongooplog\fP will apply operations from the \fIoplog\fP of
the database specified with the \fI\-\-from\fP
option.
.sp
When used, the \fI\-\-dbpath\fP option enables \fBmongo\fP to
attach directly to local data files and write data without a running
\fBmongod\fP instance.
.sp
To run with \fI\-\-dbpath\fP, \fBmongooplog\fP needs to restrict
access to the data directory: as a result, no \fBmongod\fP can be
access the same path while the process runs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-directoryperdb
Use the \fI\-\-directoryperdb\fP in conjunction with the
corresponding option to \fBmongod\fP\&. This option allows
\fBmongooplog\fP to write to data files organized with each
database located in a distinct directory. This option is only
relevant when specifying the \fI\-\-dbpath\fP option.
When used in conjunction with the corresponding option in
\fBmongod\fP, allows \fBmongooplog\fP to access data from MongoDB
instances that use an on\-disk format where every database has a distinct
directory. This option is only relevant when specifying the
\fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal
Allows \fBmongooplog\fP operations to use the durability
\fIjournal\fP to ensure that the data files will
remain in a consistent state during the writing process. This
option is only relevant when specifying the \fI\-\-dbpath\fP
option.
Allows \fBmongooplog\fP operations to use the durability \fIjournal\fP to
ensure data files remain valid and recoverable. This option is only
relevant when specifying the \fI\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-seconds <number>, \-s <number>
Specify a number of seconds of operations for \fBmongooplog\fP
to pull from the \fIremote host\fP\&. Unless
.B \-\-db <database>, \-d
Specifies the name of the database on which to run \fBmongooplog\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-collection <collection>, \-c
Specifies the collection to export.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-seconds <number>, \-s
Specify a number of seconds of operations for \fBmongooplog\fP to
pull from the \fIremote host\fP\&. Unless
specified the default value is \fB86400\fP seconds, or 24 hours.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-from <host[:port]>
Specify the host for \fBmongooplog\fP to retrieve \fIoplog\fP
operations from. \fBmongooplog\fP \fIrequires\fP this
option.
operations from. \fBmongooplog\fP \fIrequires\fP this option.
.sp
Unless you specify the \fI\-\-host\fP option,
\fBmongooplog\fP will apply the operations collected with this
option to the oplog of the \fBmongod\fP instance running on
the localhost interface connected to port \fB27017\fP\&.
option to the oplog of the \fBmongod\fP instance running on the
localhost interface connected to port \fB27017\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-oplogns <namespace>
Specify a namespace in the \fI\-\-from\fP
host where the oplog resides. The default value is
\fBlocal.oplog.rs\fP, which is the where \fIreplica set\fP members
store their operation log. However, if you\(aqve copied \fIoplog\fP
entries into another database or collection, use this option to
copy oplog entries stored in another location.
.sp
\fINamespaces\fP take the form of
\fB[database].[collection]\fP\&.
Specify a namespace in the \fI\-\-from\fP host
where the oplog resides. The default value is \fBlocal.oplog.rs\fP, which
is the where \fIreplica set\fP members store their operation log.
However, if you\(aqve copied \fIoplog\fP entries into another database or
collection, use this option to copy oplog entries stored in another
location. Namespaces take the form of \fB[database].[collection]\fP\&.
.UNINDENT
.SS Usage
.SH USE
.sp
Consider the following prototype \fBmongooplog\fP command:
.INDENT 0.0
@ -354,11 +434,10 @@ Here, \fBmongooplog\fP imports \fIoplog\fP operations from the
\fBmongod\fP host connected to port \fB27017\fP\&. This migrates
operations to the MongoDB data files stored in the \fB/srv/mongodb\fP
directory. Additionally \fBmongooplog\fP will use the durability
\fIjournal\fP to ensure that the data files remain in a consistent
state.
\fIjournal\fP to ensure that the data files remain valid.
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

12
debian/mongoperf.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOPERF" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOPERF" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongoperf \- MongoDB
mongoperf \- MongoDB Performance Utility
.
.nr rst2man-indent-level 0
.
@ -69,10 +69,8 @@ Specify options to \fBmongoperf\fP using a JavaScript document.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Displays the options to \fBmongoperf\fP\&. Specify options to
\fBmongoperf\fP with a JSON document described in the
\fI\%Configuration Fields\fP section.
.B \-\-help, \-h
Returns information on \fBmongoperf\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
@ -280,6 +278,6 @@ iostat \-xm 2
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

418
debian/mongorestore.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGORESTORE" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGORESTORE" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongorestore \- MongoDB
mongorestore \- MongoDB Data Restoration Tool
.
.nr rst2man-indent-level 0
.
@ -40,6 +40,7 @@ data to an existing database.
\fBmongorestore\fP can write data to either \fImongod\fP or \fBmongos\fP
instances, in addition to writing directly to MongoDB data files
without an active \fBmongod\fP\&.
.SH BEHAVIOR
.sp
If you restore to an existing database, \fBmongorestore\fP will
only insert into the existing database, and does not perform updates
@ -64,14 +65,29 @@ during a restore operation, but \fBmongorestore\fP will not
receive errors.
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
The format of data created by \fBmongodump\fP tool from the
2.2 distribution or later is different and incompatible with
earlier versions of \fBmongod\fP\&.
.UNINDENT
.UNINDENT
The data format used by \fBmongodump\fP from version 2.2 or
later is \fIincompatible\fP with earlier versions of \fBmongod\fP\&.
Do not use recent versions of \fBmongodump\fP to back up older
data stores.
.SH REQUIRED ACCESS TO RESTORE USER DATA
.sp
Changed in version 2.6.
.sp
To restore users and \fIuser\-defined roles\fP on a
given database, you must have access to the \fBadmin\fP database. MongoDB
stores the user data and role definitions for all databases in the
\fBadmin\fP database.
.sp
Specifically, to restore users to a given database, you must have the
\fBinsert\fP \fIaction\fP on the \fBadmin\fP
database\(aqs \fBadmin.system.users\fP collection. The \fBrestore\fP
role provides this privilege.
.sp
To restore user\-defined roles to a database, you must have the
\fBinsert\fP action on the \fBadmin\fP database\(aqs
\fBadmin.system.roles\fP collection. The \fBrestore\fP role
provides this privilege.
.SH OPTIONS
.INDENT 0.0
.TP
@ -83,35 +99,46 @@ earlier versions of \fBmongod\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongorestore\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including
the option multiple times (e.g. \fB\-vvvvv\fP).
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBmongorestore\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBmongorestore\fP tool.
Returns the \fBmongorestore\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>
Specifies a resolvable hostname for the \fBmongod\fP to which
you want to restore the database. By default
\fBmongorestore\fP will attempt to connect to a MongoDB
process running on the localhost port number \fB27017\fP\&. For an
example of \fI\-\-host\fP, see \fIbackup\-restore\-dump\fP\&.
.B \-\-host <hostname><:port>, \-h
Specifies a resolvable hostname for the \fBmongod\fP to which to
connect. By default \fBmongorestore\fP attempts to connect to a MongoDB instance
running on the localhost on port number \fB27017\fP\&.
.sp
Optionally, specify a port number to connect a MongoDB instance
running on a port other than \fB27017\fP\&.
.sp
To connect to a replica set, you can specify the replica set seed
name, and a seed list of set members, in the following format:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
@ -122,69 +149,138 @@ name, and a seed list of set members, in the following format:
.fi
.UNINDENT
.UNINDENT
.sp
You can always connect directly to a single MongoDB instance by
specifying the host and port number directly.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-port <port>
Specifies the port number, if the MongoDB instance is not running
on the standard port (i.e. \fB27017\fP). You may also specify a port
number using the \fI\-\-host\fP command. For
an example of \fI\-\-port\fP, see \fIbackup\-restore\-dump\fP\&.
Specifies the port number when the MongoDB instance is not running on the
standard port of \fB27017\fP\&. You may also specify the port number
using the \fB\-\-host\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongorestore\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongorestore\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongorestore\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongorestore\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
instances in mongorestore\&.
New in version 2.6.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
SSL support in mongorestore is not compiled into the default
distribution of MongoDB. See
http://docs.mongodb.org/manual/tutorial/configure\-ssl for more information on SSL
and MongoDB.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
Additionally, mongorestore does not support connections to
\fBmongod\fP instances that require client certificate
validation.
.UNINDENT
.UNINDENT
.sp
Allows \fBmongorestore\fP to connect to \fBmongod\fP
instance over an SSL connection.
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if
your database requires authentication. Use in conjunction with the
\fI\-\-password\fP option to supply a
password. For an example of \fI\-\-username\fP, see
\fIbackup\-restore\-dump\fP\&.
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fI\-\-username\fP option to
supply a username. For an example of \fI\-\-password\fP, see
\fIbackup\-restore\-dump\fP\&.
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP and do not pass an argument
to \fI\-\-password\fP, \fBmongorestore\fP will prompt for a
password interactively. If you do not specify a password on the
command line, \fI\-\-password\fP must be the last argument
specified.
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongorestore\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongorestore\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongorestore\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -192,17 +288,10 @@ specified.
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongorestore\fP assumes that the database specified to the
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongorestore\fP assumes
that the database specified as the argument to the \fI\%\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -210,81 +299,70 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongorestore\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongorestore\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dbpath <path>
Specifies the directory of the MongoDB data files. If used, the
\fI\-\-dbpath\fP option enables \fBmongorestore\fP to attach
directly to local data files and insert the data without the
\fBmongod\fP\&. To run with \fI\-\-dbpath\fP,
\fBmongorestore\fP needs to lock access to the data directory:
as a result, no \fBmongod\fP can access the same path while the
process runs. For an example of \fI\-\-dbpath\fP, see
\fIbackup\-restore\-dbpath\fP\&.
\fI\%\-\-dbpath\fP option enables \fBmongorestore\fP to attach directly to local data
files without a running \fBmongod\fP\&. When run with \fI\%\-\-dbpath\fP,
\fBmongorestore\fP locks access to the data directory. No \fBmongod\fP can
access the same path while the process runs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-directoryperdb
Use the \fI\-\-directoryperdb\fP in conjunction with the
corresponding option to \fBmongod\fP, which allows
\fBmongorestore\fP to import data into MongoDB instances that
have every database\(aqs files saved in discrete directories on the
disk. This option is only relevant when specifying the
\fI\-\-dbpath\fP option.
When used in conjunction with the corresponding option in
\fBmongod\fP, allows \fBmongorestore\fP to access data from MongoDB
instances that use an on\-disk format where every database has a distinct
directory. This option is only relevant when specifying the
\fI\%\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal
Allows \fBmongorestore\fP write to the durability
\fIjournal\fP to ensure that the data files will remain in a
consistent state during the write process. This option is only
relevant when specifying the \fI\-\-dbpath\fP option. For an
example of \fI\-\-journal\fP, see \fIbackup\-restore\-dbpath\fP\&.
Allows \fBmongorestore\fP operations to use the durability \fIjournal\fP to
ensure data files remain valid and recoverable. This option is only
relevant when specifying the \fI\%\-\-dbpath\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-db <db>, \-d <db>
Use the \fI\-\-db\fP option to specify a database for
\fBmongorestore\fP to restore data \fIinto\fP\&. If the database
doesn\(aqt exist, \fBmongorestore\fP will create the specified
database. If you do not specify a \fB<db>\fP,
\fBmongorestore\fP creates new databases that correspond to
the databases where data originated and data may be
overwritten. Use this option to restore data into a MongoDB
instance that already has data.
.B \-\-db <database>, \-d
Specifies a database for \fBmongorestore\fP to restore data \fIinto\fP\&.
If the database does not exist, \fBmongorestore\fP creates the
database. If you do not specify a \fB<db>\fP, \fBmongorestore\fP
creates new databases that correspond to the databases where data
originated and data may be overwritten. Use this option to restore data
into a MongoDB instance that already has data.
.sp
\fI\-\-db\fP does \fInot\fP control which \fIBSON\fP files
\fI\%\-\-db\fP does \fInot\fP control which \fIBSON\fP files
\fBmongorestore\fP restores. You must use the
\fBmongorestore\fP \fI\%path option\fP to limit that restored data.
\fBmongorestore\fP \fI\%path option\fP to
limit that restored data.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-collection <collection>, \-c <collection>
Use the \fI\-\-collection\fP option to specify a collection for
\fBmongorestore\fP to restore. If you do not specify a
\fB<collection>\fP, \fBmongorestore\fP imports all collections
created. Existing data may be overwritten. Use this option to
restore data into a MongoDB instance that already has data, or to
restore only some data in the specified imported data set.
.B \-\-collection <collection>, \-c
Specifies a single collection for \fBmongorestore\fP to restore. If
you do not specify \fI\%\-\-collection\fP, \fBmongorestore\fP takes
the collection name from the input filename. If the input file has an
extension, MongoDB omits the extension of the file from the collection
name.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-objcheck
Forces the \fBmongorestore\fP to validate all requests from
clients upon receipt to ensure that clients never insert invalid
documents into the database. For objects with a high degree of
sub\-document nesting, \fI\-\-objcheck\fP can have a small impact
on performance. You can set \fI\%--noobjcheck\fP to disable
object checking at run\-time.
Forces \fBmongorestore\fP to validate all requests from clients
upon receipt to ensure that clients never insert invalid documents into
the database. For objects with a high degree of sub\-document nesting,
\fI\-\-objcheck\fP can have a small impact on performance. You can set
\fI\%\-\-noobjcheck\fP to disable object checking at run\-time.
.sp
Changed in version 2.4: MongoDB enables \fI\-\-objcheck\fP by default, to prevent any
client from inserting malformed or invalid BSON into a MongoDB
@ -302,27 +380,41 @@ incoming BSON documents.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-filter \(aq<JSON>\(aq
Limits the documents that \fBmongorestore\fP imports to only
those documents that match the JSON document specified as
\fB\(aq<JSON>\(aq\fP\&. Be sure to include the document in single quotes to
avoid interaction with your system\(aqs shell environment. For an
example of \fI\%--filter\fP, see \fIbackup\-restore\-filter\fP\&.
.B \-\-filter <JSON>
Limits the documents that \fBmongorestore\fP imports to only those
documents that match the JSON document specified as \fB\(aq<JSON>\(aq\fP\&. Be
sure to include the document in single quotes to avoid interaction with
your system\(aqs shell environment. For an example of \fI\%\-\-filter\fP,
see \fIbackup\-restore\-filter\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-drop
Modifies the restoration procedure to drop every collection from
the target database before restoring the collection from the dumped
backup.
Modifies the restoration procedure to drop every collection from the
target database before restoring the collection from the dumped backup.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-oplogReplay
Replays the \fIoplog\fP after restoring the dump to ensure that the current
state of the database reflects the point\-in\-time backup captured with
the "\fImongodump \-\-oplog\fP" command. For an example of
\fI\%--oplogReplay\fP, see \fIbackup\-restore\-oplogreplay\fP\&.
Replays the \fIoplog\fP after restoring the dump to ensure that the
current state of the database reflects the point\-in\-time backup captured
with the "\fImongodump \-\-oplog\fP" command. For an example of
\fI\%\-\-oplogReplay\fP, see \fIbackup\-restore\-oplogreplay\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-oplogLimit <timestamp>
New in version 2.2.
.sp
Prevents \fBmongorestore\fP from applying \fIoplog\fP entries
newer than the \fB<timestamp>\fP\&. Specify \fB<timestamp>\fP values in the
form of \fB<time_t>:<ordinal>\fP, where \fB<time_t>\fP is the seconds since
the UNIX epoch, and \fB<ordinal>\fP represents a counter of operations in
the oplog that occurred in the specified second.
.sp
You must use \fI\%\-\-oplogLimit\fP in conjunction with the
\fI\%\-\-oplogReplay\fP option.
.UNINDENT
.INDENT 0.0
.TP
@ -332,14 +424,12 @@ version during the restoration process.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-w <number of replicas per write>
.B \-\-noIndexRestore
New in version 2.2.
.sp
Specifies the \fIwrite concern\fP for each write operation that
\fBmongorestore\fP writes to the target database. By default,
\fBmongorestore\fP does not wait for a response for
\fIwrite acknowledgment\fP\&.
Prevents \fBmongorestore\fP from restoring and building indexes as
specified in the corresponding \fBmongodump\fP output.
.UNINDENT
.INDENT 0.0
.TP
@ -347,34 +437,20 @@ Specifies the \fIwrite concern\fP for each write operation that
New in version 2.2.
.sp
Prevents \fBmongorestore\fP from setting the collection
options, such as those specified by the \fBcollMod\fP
\fIdatabase command\fP, on restored collections.
Prevents \fBmongorestore\fP from setting the collection options,
such as those specified by the \fBcollMod\fP \fIdatabase
command\fP, on restored collections.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-noIndexRestore
.B \-\-w <number of replicas per write>
New in version 2.2.
.sp
Prevents \fBmongorestore\fP from restoring and building
indexes as specified in the corresponding \fBmongodump\fP
output.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-oplogLimit <timestamp>
New in version 2.2.
.sp
Prevents \fBmongorestore\fP from applying \fIoplog\fP entries newer
than the \fB<timestamp>\fP\&. Specify \fB<timestamp>\fP values in the
form of \fB<time_t>:<ordinal>\fP, where \fB<time_t>\fP is the seconds
since the UNIX epoch, and \fB<ordinal>\fP represents a counter of
operations in the oplog that occurred in the specified second.
.sp
You must use \fI\%--oplogLimit\fP in conjunction with the
\fI\%--oplogReplay\fP option.
Specifies the \fIwrite concern\fP for each write operation that
\fBmongorestore\fP writes to the target database. By default,
\fBmongorestore\fP does not wait for a response for \fIwrite
acknowledgment\fP\&.
.UNINDENT
.INDENT 0.0
.TP
@ -383,9 +459,9 @@ The final argument of the \fBmongorestore\fP command is a
directory path. This argument specifies the location of the
database dump from which to restore.
.UNINDENT
.SH USAGE
.SH USE
.sp
See http://docs.mongodb.org/manual/tutorial/backup\-databases\-with\-binary\-database\-dumps
See http://docs.mongodb.org/manual/tutorial/backup\-with\-mongodump
for a larger overview of \fBmongorestore\fP
usage. Also see the \fBmongodump\fP document for an overview of the
\fBmongodump\fP, which provides the related inverse
@ -444,6 +520,6 @@ mongorestore \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

912
debian/mongos.1 vendored

File diff suppressed because it is too large Load Diff

46
debian/mongosniff.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOSNIFF" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOSNIFF" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongosniff \- MongoDB
mongosniff \- MongoDB Protocol Introspection Utility
.
.nr rst2man-indent-level 0
.
@ -77,21 +77,20 @@ wire protocol.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongosniff\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-forward <host><:port>
Declares a host to forward all parsed requests that the
\fBmongosniff\fP intercepts to another \fBmongod\fP
instance and issue those operations on that database instance.
\fBmongosniff\fP intercepts to another \fBmongod\fP instance
and issue those operations on that database instance.
.sp
Specify the target host name and port in the \fB<host><:port>\fP
format.
Specify the target host name and port in the \fB<host><:port>\fP format.
.sp
To connect to a replica set, you can specify the replica set seed
name, and a seed list of set members, in the following format:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
@ -105,33 +104,32 @@ name, and a seed list of set members, in the following format:
.UNINDENT
.INDENT 0.0
.TP
.B \-\-source <NET [interface]>, <FILE [filename]>, <DIAGLOG [filename]>
Specifies source material to inspect. Use \fB\-\-source NET
[interface]\fP to inspect traffic from a network interface
(e.g. \fBeth0\fP or \fBlo\fP\&.) Use \fB\-\-source FILE [filename]\fP to
read captured packets in \fIpcap\fP format.
.B \-\-source <NET [interface]>
Specifies source material to inspect. Use \fB\-\-source NET [interface]\fP
to inspect traffic from a network interface (e.g. \fBeth0\fP or \fBlo\fP\&.)
Use \fB\-\-source FILE [filename]\fP to read captured packets in
\fIpcap\fP format.
.sp
You may use the \fB\-\-source DIAGLOG [filename]\fP option to read
the output files produced by the \fI\-\-diaglog\fP
You may use the \fB\-\-source DIAGLOG [filename]\fP option to read the
output files produced by the \fI\-\-diaglog\fP
option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-objcheck
Modifies the behavior to \fIonly\fP display invalid BSON objects and
nothing else. Use this option for troubleshooting driver
development. This option has some performance impact on the
performance of \fBmongosniff\fP\&.
Displays invalid BSON objects only and nothing else. Use this option for
troubleshooting driver development. This option has some performance
impact on the performance of \fBmongosniff\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B <port>
Specifies alternate ports to sniff for traffic. By default,
\fBmongosniff\fP watches for MongoDB traffic on port 27017. Append
\fBmongosniff\fP watches for MongoDB traffic on port \fB27017\fP\&. Append
multiple port numbers to the end of \fBmongosniff\fP to monitor
traffic on multiple ports.
.UNINDENT
.SH USAGE
.SH USE
.sp
Use the following command to connect to a \fBmongod\fP or
\fBmongos\fP running on port 27017 \fIand\fP 27018 on the localhost
@ -214,6 +212,6 @@ must run \fBscons clean\fP before you can build \fBmongosniff\fP\&.
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

251
debian/mongostat.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOSTAT" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOSTAT" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongostat \- MongoDB
mongostat \- MongoDB Use Statistics
.
.nr rst2man-indent-level 0
.
@ -77,33 +77,30 @@ instance.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongostat\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including
the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Returns the version of the \fBmongostat\fP utility.
Returns the \fBmongostat\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>
Specifies a resolvable hostname for the \fBmongod\fP from which you
want to export data. By default \fBmongostat\fP attempts to connect
to a MongoDB instance running on the localhost port number \fB27017\fP\&.
.B \-\-host <hostname><:port>, \-h
Specifies a resolvable hostname for the \fBmongod\fP to which to
connect. By default \fBmongostat\fP attempts to connect to a MongoDB instance
running on the localhost on port number \fB27017\fP\&.
.sp
Optionally, specify a port number to connect a MongoDB instance
running on a port other than \fB27017\fP\&.
.sp
To connect to a replica set, you can specify the replica set seed
name, and a seed list of set members, in the following format:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
@ -114,76 +111,138 @@ name, and a seed list of set members, in the following format:
.fi
.UNINDENT
.UNINDENT
.sp
You can always connect directly to a single MongoDB instance by
specifying the host and port number directly.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-port <port>
Specifies the port number, if the MongoDB instance is not running on
the standard port. (i.e. \fB27017\fP) You may also specify a port
number using the \fImongostat \-\-host\fP command.
Specifies the port number when the MongoDB instance is not running on the
standard port of \fB27017\fP\&. You may also specify the port number
using the \fB\-\-host\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongostat\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongostat\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongostat\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongostat\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ssl
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
instances in mongostat\&.
New in version 2.6.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
SSL support in mongostat is not compiled into the default
distribution of MongoDB. See
http://docs.mongodb.org/manual/tutorial/configure\-ssl for more information on SSL
and MongoDB.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
Additionally, mongostat does not support connections to
\fBmongod\fP instances that require client certificate
validation.
.UNINDENT
.UNINDENT
.sp
Allows \fBmongostat\fP to connect to \fBmongod\fP
instance over an SSL connection.
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if your
database requires authentication. Use in conjunction with the
\fImongostat \-\-password\fP option to supply a password.
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
\fBIMPORTANT:\fP
.INDENT 7.0
.INDENT 3.5
This user must have sufficient credentials to run
the \fBserverStatus\fP command, which is the
\fBclusterAdmin\fP role. See
http://docs.mongodb.org/manual/reference/user\-privileges and
http://docs.mongodb.org/manual/reference/privilege\-documents for more information.
.UNINDENT
.UNINDENT
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fImongostat \-\-username\fP option to
supply a username.
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP, and do do not pass an
argument to \fI\-\-password\fP, \fBmongostat\fP will prompt
for a password interactively. If you do not specify a password on
the command line, \fI\-\-password\fP must be the last argument
specified.
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongostat\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\-\-sslPEMKeyPassword\fP, \fBmongostat\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongostat\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -191,17 +250,10 @@ specified.
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongostat\fP assumes that the database specified to the
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongostat\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -209,13 +261,11 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongostat\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongostat\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
@ -225,14 +275,13 @@ Disables the output of column or field names.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rowcount <number>, \-n <number>
.B \-\-rowcount <number>, \-n
Controls the number of rows to output. Use in conjunction with
the \fBsleeptime\fP argument to control the duration of a
\fBmongostat\fP operation.
.sp
Unless \fI\%--rowcount\fP is specified, \fBmongostat\fP
will return an infinite number
of rows (e.g. value of \fB0\fP\&.)
Unless \fI\%\-\-rowcount\fP is specified, \fBmongostat\fP
will return an infinite number of rows (e.g. value of \fB0\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
@ -243,16 +292,20 @@ rather than a raw database connection.
.INDENT 0.0
.TP
.B \-\-discover
With this option \fBmongostat\fP discovers and reports on
statistics from all members of a \fIreplica set\fP or
\fIsharded cluster\fP\&. When connected to any member of a replica
set, \fI\%--discover\fP all non\-\fIhidden members\fP of the replica set. When connected to a \fBmongos\fP,
\fBmongostat\fP will return data from all \fIshards\fP in the cluster. If a replica set provides a shard in the
sharded cluster, \fBmongostat\fP will report on non\-hidden
members of that replica set.
Discovers and reports on statistics from all members of a \fIreplica
set\fP or \fIsharded cluster\fP\&. When connected to any member of a
replica set, \fI\%\-\-discover\fP all non\-\fIhidden members\fP of the replica set. When connected to a \fBmongos\fP,
\fBmongostat\fP will return data from all \fIshards\fP in
the cluster. If a replica set provides a shard in the sharded cluster,
\fBmongostat\fP will report on non\-hidden members of that replica
set.
.sp
The \fImongostat \-\-host\fP option is not required but
potentially useful in this case.
.sp
Changed in version 2.6: When running with \fI\%\-\-discover\fP, \fBmongostat\fP now
respects :option:\-\-rowcount\(ga.
.UNINDENT
.INDENT 0.0
.TP
@ -328,13 +381,19 @@ data size at the time of the last \fBmongostat\fP call.
.INDENT 0.0
.TP
.B size
The amount of (virtual) memory in megabytes used by the process at
The amount of virtual memory in megabytes used by the process at
the time of the last \fBmongostat\fP call.
.UNINDENT
.INDENT 0.0
.TP
.B non\-mapped
The total amount of virtual memory excluding all mapped memory at
the time of the last \fBmongostat\fP call.
.UNINDENT
.INDENT 0.0
.TP
.B res
The amount of (resident) memory in megabytes used by the process at
The amount of resident memory in megabytes used by the process at
the time of the last \fBmongostat\fP call.
.UNINDENT
.INDENT 0.0
@ -547,6 +606,6 @@ mongostat \-\-discover
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

240
debian/mongotop.1 vendored
View File

@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MONGOTOP" "1" "October 03, 2013" "2.4" "mongodb-manual"
.TH "MONGOTOP" "1" "March 18, 2014" "2.6" "mongodb-manual"
.SH NAME
mongotop \- MongoDB
mongotop \- MongoDB Activity Monitor
.
.nr rst2man-indent-level 0
.
@ -71,34 +71,46 @@ see \fBmongostat\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help
Returns a basic help and usage text.
.B \-\-help, \-h
Returns information on \fBmongotop\fP options and usage.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verbose, \-v
Increases the amount of internal reporting returned on the command
line. Increase the verbosity with the \fB\-v\fP form by including the
option multiple times, (e.g. \fB\-vvvvv\fP\&.)
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the \fB\-v\fP form by
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quiet
Runs \fBmongotop\fP in a quiet mode that attempts to limit the amount of
output. This option suppresses:
.INDENT 7.0
.IP \(bu 2
output from \fIdatabase commands\fP
.IP \(bu 2
replication activity
.IP \(bu 2
connection accepted events
.IP \(bu 2
connection closed events
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Print the version of the \fBmongotop\fP utility and exit.
Returns the \fBmongotop\fP release number.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host <hostname><:port>
Specifies a resolvable hostname for the \fBmongod\fP from which you
want to export data. By default \fBmongotop\fP attempts to
connect to a MongoDB process running on the localhost port number
\fB27017\fP\&.
.B \-\-host <hostname><:port>, \-h
Specifies a resolvable hostname for the \fBmongod\fP to which to
connect. By default \fBmongotop\fP attempts to connect to a MongoDB instance
running on the localhost on port number \fB27017\fP\&.
.sp
Optionally, specify a port number to connect a MongoDB instance
running on a port other than \fB27017\fP\&.
.sp
To connect to a replica set, you can specify the replica set seed
name, and a seed list of set members, in the following format:
To connect to a replica set, specify the replica set seed name and the
seed list of set members. Use the following format:
.INDENT 7.0
.INDENT 3.5
.sp
@ -109,42 +121,138 @@ name, and a seed list of set members, in the following format:
.fi
.UNINDENT
.UNINDENT
.sp
You can always connect directly to a single MongoDB instance by
specifying the host and port number directly.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-port <port>
Specifies the port number, if the MongoDB instance is not running on
the standard port. (i.e. \fB27017\fP) You may also specify a port
number using the \fImongotop \-\-host\fP command.
Specifies the port number when the MongoDB instance is not running on the
standard port of \fB27017\fP\&. You may also specify the port number
using the \fB\-\-host\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ipv6
Enables IPv6 support that allows \fBmongotop\fP to connect
to the MongoDB instance using an IPv6 network. All MongoDB programs
and processes, including \fBmongotop\fP, disable IPv6
support by default.
Enables IPv6 support, which allows \fBmongotop\fP to connect to the MongoDB
instance using an IPv6 network. All MongoDB programs and processes,
including \fBmongotop\fP, disable IPv6 support by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u <username>
Specifies a username to authenticate to the MongoDB instance, if
your database requires authentication. Use in conjunction with the
\fImongotop\fP option to supply a
password.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p <password>
Specifies a password to authenticate to the MongoDB instance. Use
in conjunction with the \fI\-\-username\fP
option to supply a username.
.B \-\-ssl
New in version 2.6.
.sp
If you specify a \fI\-\-username\fP and do
not pass an argument to \fI\-\-password\fP, \fBmongotop\fP
will prompt for a password interactively. If you do not specify a
password on the command line, \fI\-\-password\fP must be the last
argument specified.
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
SSL support enabled.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCAFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
\fB\&.pem\fP file using relative or absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
and key. Specify the file name of the \fB\&.pem\fP file using relative
or absolute paths.
.sp
This option is required when using the \fI\%\-\-ssl\fP option to connect
to a \fBmongod\fP or \fBmongos\fP that has
\fBsslCAFile\fP enabled \fIwithout\fP
\fBsslWeakCertificateValidation\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslPEMKeyPassword <value>
New in version 2.6.
.sp
Specifies the password to de\-crypt the certificate\-key file (i.e.
\fI\%\-\-sslPEMKeyFile\fP). Use \fI\%\-\-sslPEMKeyPassword\fP only if
the certificate\-key file is encrypted. In all cases, \fBmongotop\fP will
redact the password from all logging and reporting output.
.sp
If the private key in the PEM file is encrypted and you do not specify
\fI\%\-\-sslPEMKeyPassword\fP, \fBmongotop\fP will prompt for a passphrase.
See \fIssl\-certificate\-password\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslCRLFile <filename>
New in version 2.6.
.sp
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
List. Specify the file name of the \fB\&.pem\fP file using relative or
absolute paths.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslAllowInvalidCertificates
New in version 2.6.
.sp
Bypasses the validation checks for server certificates and allows
the use of invalid certificates. When using the
\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a
warning the use of the invalid certificate.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sslFIPSMode
New in version 2.6.
.sp
Directs \fBmongotop\fP to use the FIPS mode of the installed OpenSSL
library. Your system must
have a FIPS compliant OpenSSL library to use \fI\%\-\-sslFIPSMode\fP\&.
.sp
The default distribution of MongoDB does not contain support for SSL.
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-username <username>, \-u
Specifies a username with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-password <password>, \-p
Specifies a password with which to authenticate to a MongoDB database
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
\fB\-\-authenticationDatabase\fP options.
.UNINDENT
.INDENT 0.0
.TP
@ -152,17 +260,10 @@ argument specified.
New in version 2.4.
.sp
Specifies the database that holds the user\(aqs (e.g
\fI\-\-username\fP) credentials.
.sp
By default, \fBmongotop\fP assumes that the database specified to the
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
specify \fI\-\-authenticationDatabase\fP\&.
.sp
See \fBuserSource\fP,
http://docs.mongodb.org/manual/reference/privilege\-documents and
http://docs.mongodb.org/manual/reference/user\-privileges for more information about
delegated authentication in MongoDB.
Specifies the database that holds the user\(aqs credentials.
If you do not specify an authentication database, \fBmongotop\fP assumes
that the database specified as the argument to the \fI\-\-db\fP option
holds the user\(aqs credentials.
.UNINDENT
.INDENT 0.0
.TP
@ -170,31 +271,26 @@ delegated authentication in MongoDB.
New in version 2.4.
.sp
Specifies the authentication mechanism. By default, the
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
challenge/response authentication mechanism. In MongoDB Enterprise,
\fBmongotop\fP also includes support for \fBGSSAPI\fP to handle
Kerberos authentication.
.sp
See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
Specifies the authentication mechanism. By default, the authentication
mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response
authentication mechanism. In MongoDB Enterprise, \fBmongotop\fP also includes
support for \fBGSSAPI\fP to handle Kerberos authentication. See
http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication
for more information about Kerberos authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-locks
New in version 2.2.
.sp
Toggles the mode of \fBmongotop\fP to report on use of
per\-database \fIlocks\fP\&. These data are useful for
measuring concurrent operations and lock percentage.
Toggles the mode of \fBmongotop\fP to report on use of per\-database
\fIlocks\fP\&. These data are useful for measuring concurrent
operations and lock percentage.
.UNINDENT
.INDENT 0.0
.TP
.B <sleeptime>
The final argument is the length of time, in seconds, that
\fBmongotop\fP waits in between calls. By default
\fBmongotop\fP returns data every second.
\fBmongotop\fP waits in between calls. By default \fBmongotop\fP returns
data every second.
.UNINDENT
.SH FIELDS
.sp
@ -202,7 +298,7 @@ The final argument is the length of time, in seconds, that
(ms.)
.sp
\fBmongotop\fP only reports active namespaces or databases,
depending on the \fI\%--locks\fP option. If you don\(aqt see a database
depending on the \fI\%\-\-locks\fP option. If you don\(aqt see a database
or collection, it has received no recent activity. You can issue a
simple operation in the \fBmongo\fP shell to generate activity to
affect the output of \fBmongotop\fP\&.
@ -212,7 +308,7 @@ affect the output of \fBmongotop\fP\&.
Contains the database namespace, which combines the database name
and collection.
.sp
Changed in version 2.2: If you use the \fI\%--locks\fP, the \fBns\fP field does not
Changed in version 2.2: If you use the \fI\%\-\-locks\fP, the \fBns\fP field does not
appear in the \fBmongotop\fP output.
.UNINDENT
@ -226,7 +322,7 @@ Contains the name of the database. The database named \fB\&.\fP refers
to the global lock, rather than a specific database.
.sp
This field does not appear unless you have invoked
\fBmongotop\fP with the \fI\%--locks\fP option.
\fBmongotop\fP with the \fI\%\-\-locks\fP option.
.UNINDENT
.INDENT 0.0
.TP
@ -333,6 +429,6 @@ connected to: 127.0.0.1
.SH AUTHOR
MongoDB Documentation Project
.SH COPYRIGHT
2011-2013, MongoDB, Inc.
2011-2014, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.

View File

@ -3,7 +3,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = MongoDB
PROJECT_NUMBER = 2.6.0-rc2-pre-
PROJECT_NUMBER = 2.6.3
OUTPUT_DIRECTORY = docs/doxygen
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English

View File

@ -1,4 +0,0 @@
// For testing the test runner.
assert.eq(1, 2, "fail1")
print("you should not see this")

View File

@ -1,4 +0,0 @@
// Start mongod and run jstests/_runner.js
db = startMongod( "--port", "27018", "--dbpath", MongoRunner.dataDir + "/jstests" ).getDB( "test" );
load( "jstests/_runner.js" );

View File

@ -1,28 +0,0 @@
//
// simple runner to run toplevel tests in jstests
//
var files = listFiles("jstests");
var runnerStart = new Date()
files.forEach(
function(x) {
if ( /[\/\\]_/.test(x.name) ||
! /\.js$/.test(x.name ) ){
print(" >>>>>>>>>>>>>>> skipping " + x.name);
return;
}
print(" *******************************************");
print(" Test : " + x.name + " ...");
print(" " + Date.timeFunc( function() { load(x.name); }, 1) + "ms");
}
);
var runnerEnd = new Date()
print( "total runner time: " + ( ( runnerEnd.getTime() - runnerStart.getTime() ) / 1000 ) + "secs" )

View File

@ -1,44 +0,0 @@
//
// simple runner to run toplevel tests in jstests
//
var files = listFiles("jstests");
var dummyDb = db.getSisterDB( "dummyDBdummydummy" );
dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
prev = dummyDb.serverStatus();
print( "START : " + tojson( prev ) );
files.forEach(
function(x) {
if ( /_runner/.test(x.name) ||
/_lodeRunner/.test(x.name) ||
! /\.js$/.test(x.name ) ){
print(" >>>>>>>>>>>>>>> skipping " + x.name);
return;
}
print(" *******************************************");
print(" Test : " + x.name + " ...");
print(" " + Date.timeFunc( function() { load(x.name); }, 1) + "ms");
assert( dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" ).ok == 1 , "closeAllDatabases failed" );
var now = dummyDb.serverStatus();
var leaked = now.mem.virtual - prev.mem.virtual;
if ( leaked > 0 ){
print( " LEAK : " + prev.mem.virtual + " -->> " + now.mem.virtual );
printjson( now );
if ( leaked > 20 )
throw -1;
}
prev = now;
}
);
dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
print( "END : " + tojson( dummyDb.serverStatus() ) );

View File

@ -1,42 +0,0 @@
//
// simple runner to run toplevel tests in jstests
//
var files = listFiles("jstests");
var dummyDb = db.getSisterDB( "dummyDBdummydummy" );
dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
prev = dummyDb.runCommand( "meminfo" );
print( "START : " + tojson( prev ) );
files.forEach(
function(x) {
if ( /_runner/.test(x.name) ||
/_lodeRunner/.test(x.name) ||
/jni/.test(x.name) ||
/eval/.test(x.name) ||
/where/.test(x.name) ||
! /\.js$/.test(x.name ) ){
print(" >>>>>>>>>>>>>>> skipping " + x.name);
return;
}
print(" *******************************************");
print(" Test : " + x.name + " ...");
print(" " + Date.timeFunc( function() { load(x.name); }, 1) + "ms");
assert( dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" ).ok == 1 , "closeAllDatabases failed" );
var now = dummyDb.runCommand( "meminfo" );
if ( now.virtual > prev.virtual )
print( " LEAK : " + prev.virtual + " -->> " + now.virtual );
prev = now;
}
);
dummyDb.getSisterDB( "admin" ).runCommand( "closeAllDatabases" );
print( "END : " + tojson( dummyDb.runCommand( "meminfo" ) ) );

View File

@ -1,35 +0,0 @@
//
// simple runner to run toplevel tests in jstests
//
var files = listFiles("jstests/sharding");
var num = 0;
files.forEach(
function(x) {
if ( /_runner/.test(x.name) ||
/_lodeRunner/.test(x.name) ||
! /\.js$/.test(x.name ) ){
print(" >>>>>>>>>>>>>>> skipping " + x.name);
return;
}
if ( num++ > 0 ){
sleep( 1000 ); // let things fully come down
}
print(" *******************************************");
print(" Test : " + x.name + " ...");
try {
print(" " + Date.timeFunc( function() { load(x.name); }, 1) + "ms");
}
catch ( e ){
print( " ERROR on " + x.name + "!! " + e );
throw e;
}
}
);

View File

@ -1,41 +0,0 @@
/* a general testing framework (helpers) for us in the jstests/
to use, from your test file:
testname="mytestname";
load("jstests/_tst.js");
*/
if( typeof tst == "undefined" ) {
tst = {}
tst.log = function (optional_msg) {
print("\n\nstep " + ++this._step + " " + (optional_msg || ""));
}
tst.success = function () {
print(testname + " SUCCESS");
}
/* diff files a and b, returning the difference (empty str if no difference) */
tst.diff = function(a, b) {
function reSlash(s) {
var x = s;
if (_isWindows()) {
while (1) {
var y = x.replace('/', '\\');
if (y == x)
break;
x = y;
}
}
return x;
}
a = reSlash(a);
b = reSlash(b);
print("diff " + a + " " + b);
return run("diff", a, b);
}
}
print(testname + " BEGIN");
tst._step = 0;

View File

@ -0,0 +1,25 @@
// Make sure that aggregation and query agree on how NO_BLOCKING_SORT should fail
// if only blocking sort solutions are available.
var t = db.jstests_server13715;
t.drop();
t.save({_id: 0, name: "red", value: 2});
t.save({_id: 1, name: "blue", value: 1});
var cursor = t.aggregate([
{$match: {$or: [{name: "red"}, {name: "blue"}]}},
{$sort: {value: 1}}
]);
assert.eq(1, cursor.next()["_id"]);
assert.eq(0, cursor.next()["_id"]);
// Repeat the test with an index.
t.ensureIndex({name: 1});
cursor = t.aggregate([
{$match: {$or: [{name: "red"}, {name: "blue"}]}},
{$sort: {value: 1}}
]);
assert.eq(1, cursor.next()["_id"]);
assert.eq(0, cursor.next()["_id"]);

View File

@ -6,8 +6,6 @@ t.drop();
t.insert( { _id : 0 , x : 0 , undef: undefined } );
db.getLastError();
// Make sure having an undefined doesn't break pipelines not using the field
res = t.aggregate( { $project : { x : 1 } } ).toArray();
assert.eq(res[0].x, 0);

View File

@ -15,7 +15,6 @@ N = 100;
for( i = 0; i < N; ++i ) {
d.data.insert( { _id:i } )
}
d.getLastError();
// Split the data into 3 chunks.
s.adminCommand( { split:"test.data", middle:{ _id:33 } } );

View File

@ -12,7 +12,6 @@ d = s.getDB( "test" );
for( i = 0; i < 100; ++i ) {
d.data.insert( { _id:i, i:i%10 } )
}
d.getLastError();
// Split the data into 3 chunks.
s.adminCommand( { split:"test.data", middle:{ _id:33 } } );

View File

@ -66,10 +66,12 @@ function test(db, sharded, indexType) {
// insert points
var numPts = 10*1000;
var bulk = db[coll].initializeUnorderedBulkOp();
for (var i=0; i < numPts; i++) {
db[coll].insert({rand:Math.random(), loc: pointMaker.mkPt()});
bulk.insert({ rand: Math.random(), loc: pointMaker.mkPt() });
}
db.getLastError();
assert.writeOK(bulk.execute());
assert.eq(db[coll].count(), numPts);
db[coll].ensureIndex({loc: indexType});

View File

@ -13,8 +13,7 @@ if (doSharded) {
testDB.adminCommand({ shardCollection: 'test.user', key: { x: 1 }});
}
testDB.user.insert({ x: 10 });
testDB.runCommand({ getLastError: 1, w: NODES });
testDB.user.insert({ x: 10 }, { writeConcern: { w: NODES }});
testDB.setSlaveOk(true);
var secNode = st.rs0.getSecondary();

View File

@ -7,10 +7,10 @@ replTest.awaitReplication();
var mast = nodes[0].getDB('test');
var slav = nodes[1].getDB('test');
mast.agg.insert({});
mast.agg.insert({});
mast.agg.insert({});
mast.getLastError(2);
var options = { writeConcern: { w: 2 }};
mast.agg.insert({}, options);
mast.agg.insert({}, options);
mast.agg.insert({}, options);
var res = slav.agg.aggregate({$group: {_id: null, count: {$sum: 1}}});
assert.eq(res.toArray(), [{_id:null, count: 3}]);

View File

@ -74,14 +74,13 @@ var strings = [
];
var nItems = 200000;
var bulk = db.ts1.initializeUnorderedBulkOp();
for(i = 1; i <= nItems; ++i) {
db.ts1.save(
bulk.insert(
{counter: ++count, number: strings[i % 20], random: Math.random(),
filler: "0123456789012345678901234567890123456789"});
}
// wait for all writebacks to be applied
assert.eq(db.getLastError(), null);
assert.writeOK(bulk.execute());
// Turn on exception tracing in mongod to figure out exactly where the SCEs are coming from
// TEMPORARY - REMOVE ONCE SERVER-9622 IS RESOLVED
@ -154,7 +153,7 @@ for(i = 0; i < 6; ++i) {
c = a4[i].counter;
printjson({c:c})
assert((c == 55) || (c == 1111) || (c == 2222) ||
(c == 33333) || (c = 99999) || (c == 55555),
(c == 33333) || (c == 99999) || (c == 55555),
'agg sharded test simple match failed');
}
@ -181,10 +180,12 @@ testSkipLimit([{$limit:10}, {$skip:5}, {$skip: 3}], 10 - 3 - 5);
// test sort + limit (using random to pull from both shards)
function testSortLimit(limit, direction) {
shardedAggTest.stopBalancer(); // TODO: remove after fixing SERVER-9622
var from_cursor = db.ts1.find({},{random:1, _id:0})
.sort({random: direction})
.limit(limit)
.toArray();
shardedAggTest.startBalancer(); // TODO: remove after fixing SERVER-9622
var from_agg = aggregateOrdered(db.ts1, [{$project: {random:1, _id:0}}
,{$sort: {random: direction}}
,{$limit: limit}
@ -201,9 +202,11 @@ testSortLimit(100, -1);
// test $out by copying source collection verbatim to output
var outCollection = db.ts1_out;
var res = aggregateOrdered(db.ts1, [{$out: outCollection.getName()}]);
shardedAggTest.stopBalancer(); // TODO: remove after fixing SERVER-9622
assert.eq(db.ts1.find().itcount(), outCollection.find().itcount());
assert.eq(db.ts1.find().sort({_id:1}).toArray(),
outCollection.find().sort({_id:1}).toArray());
shardedAggTest.startBalancer(); // TODO: remove after fixing SERVER-9622
// Make sure we error out if $out collection is sharded
assertErrorCode(outCollection, [{$out: db.ts1.getName()}], 17017);

View File

@ -1,47 +0,0 @@
t = db.jstests_all;
t.drop();
doTest = function() {
t.save( { a:[ 1,2,3 ] } );
t.save( { a:[ 1,2,4 ] } );
t.save( { a:[ 1,8,5 ] } );
t.save( { a:[ 1,8,6 ] } );
t.save( { a:[ 1,9,7 ] } );
t.save( { a : [] } );
t.save( {} );
assert.eq( 5, t.find( { a: { $all: [ 1 ] } } ).count() );
assert.eq( 2, t.find( { a: { $all: [ 1, 2 ] } } ).count() );
assert.eq( 2, t.find( { a: { $all: [ 1, 8 ] } } ).count() );
assert.eq( 1, t.find( { a: { $all: [ 1, 3 ] } } ).count() );
assert.eq( 2, t.find( { a: { $all: [ 2 ] } } ).count() );
assert.eq( 1, t.find( { a: { $all: [ 2, 3 ] } } ).count() );
assert.eq( 2, t.find( { a: { $all: [ 2, 1 ] } } ).count() );
t.save( { a: [ 2, 2 ] } );
assert.eq( 3, t.find( { a: { $all: [ 2, 2 ] } } ).count() );
t.save( { a: [ [ 2 ] ] } );
assert.eq( 3, t.find( { a: { $all: [ 2 ] } } ).count() );
t.save( { a: [ { b: [ 10, 11 ] }, 11 ] } );
assert.eq( 1, t.find( { 'a.b': { $all: [ 10 ] } } ).count() );
assert.eq( 1, t.find( { a: { $all: [ 11 ] } } ).count() );
t.save( { a: { b: [ 20, 30 ] } } );
assert.eq( 1, t.find( { 'a.b': { $all: [ 20 ] } } ).count() );
assert.eq( 1, t.find( { 'a.b': { $all: [ 20, 30 ] } } ).count() );
assert.eq( 5 , t.find( { a : { $all : [1] } } ).count() , "E1" );
assert.eq( 0 , t.find( { a : { $all : [19] } } ).count() , "E2" );
assert.eq( 0 , t.find( { a : { $all : [] } } ).count() , "E3" );
}
doTest();
t.drop();
t.ensureIndex( {a:1} );
doTest();

View File

@ -1,86 +0,0 @@
t = db.all2;
t.drop();
t.save( { a : [ { x : 1 } , { x : 2 } ] } )
t.save( { a : [ { x : 2 } , { x : 3 } ] } )
t.save( { a : [ { x : 3 } , { x : 4 } ] } )
state = "no index";
function check( n , q , e ){
assert.eq( n , t.find( q ).count() , tojson( q ) + " " + e + " count " + state );
assert.eq( n , t.find( q ).itcount() , tojson( q ) + " " + e + " itcount" + state );
}
check( 1 , { "a.x" : { $in : [ 1 ] } } , "A" );
check( 2 , { "a.x" : { $in : [ 2 ] } } , "B" );
check( 2 , { "a.x" : { $in : [ 1 , 2 ] } } , "C" );
check( 3 , { "a.x" : { $in : [ 2 , 3 ] } } , "D" );
check( 3 , { "a.x" : { $in : [ 1 , 3 ] } } , "E" );
check( 1 , { "a.x" : { $all : [ 1 , 2 ] } } , "F" );
check( 1 , { "a.x" : { $all : [ 2 , 3 ] } } , "G" );
check( 0 , { "a.x" : { $all : [ 1 , 3 ] } } , "H" );
t.ensureIndex( { "a.x" : 1 } );
state = "index";
check( 1 , { "a.x" : { $in : [ 1 ] } } , "A" );
check( 2 , { "a.x" : { $in : [ 2 ] } } , "B" );
check( 2 , { "a.x" : { $in : [ 1 , 2 ] } } , "C" );
check( 3 , { "a.x" : { $in : [ 2 , 3 ] } } , "D" );
check( 3 , { "a.x" : { $in : [ 1 , 3 ] } } , "E" );
check( 1 , { "a.x" : { $all : [ 1 , 2 ] } } , "F" );
check( 1 , { "a.x" : { $all : [ 2 , 3 ] } } , "G" );
check( 0 , { "a.x" : { $all : [ 1 , 3 ] } } , "H" );
// --- more
t.drop();
t.save( { a : [ 1 , 2 ] } )
t.save( { a : [ 2 , 3 ] } )
t.save( { a : [ 3 , 4 ] } )
state = "more no index";
check( 1 , { "a" : { $in : [ 1 ] } } , "A" );
check( 2 , { "a" : { $in : [ 2 ] } } , "B" );
check( 2 , { "a" : { $in : [ 1 , 2 ] } } , "C" );
check( 3 , { "a" : { $in : [ 2 , 3 ] } } , "D" );
check( 3 , { "a" : { $in : [ 1 , 3 ] } } , "E" );
check( 1 , { "a" : { $all : [ 1 , 2 ] } } , "F" );
check( 1 , { "a" : { $all : [ 2 , 3 ] } } , "G" );
check( 0 , { "a" : { $all : [ 1 , 3 ] } } , "H" );
t.ensureIndex( { "a" : 1 } );
state = "more index";
check( 1 , { "a" : { $in : [ 1 ] } } , "A" );
check( 2 , { "a" : { $in : [ 2 ] } } , "B" );
check( 2 , { "a" : { $in : [ 1 , 2 ] } } , "C" );
check( 3 , { "a" : { $in : [ 2 , 3 ] } } , "D" );
check( 3 , { "a" : { $in : [ 1 , 3 ] } } , "E" );
check( 1 , { "a" : { $all : [ 1 , 2 ] } } , "F" );
check( 1 , { "a" : { $all : [ 2 , 3 ] } } , "G" );
check( 0 , { "a" : { $all : [ 1 , 3 ] } } , "H" );
// more 2
state = "more 2"
t.drop();
t.save( { name : [ "harry","jack","tom" ] } )
check( 0 , { name : { $all : ["harry","john"] } } , "A" );
t.ensureIndex( { name : 1 } );
check( 0 , { name : { $all : ["harry","john"] } } , "B" );

View File

@ -1,28 +0,0 @@
// Check that $all matching null is consistent with $in - SERVER-3820
t = db.jstests_all3;
t.drop();
t.save({});
assert.eq( 1, t.count( {foo:{$in:[null]}} ) );
assert.eq( 1, t.count( {foo:{$all:[null]}} ) );
assert.eq( 0, t.count( {foo:{$not:{$all:[null]}}} ) );
assert.eq( 0, t.count( {foo:{$not:{$in:[null]}}} ) );
t.remove({});
t.save({foo:1});
assert.eq( 0, t.count( {foo:{$in:[null]}} ) );
assert.eq( 0, t.count( {foo:{$all:[null]}} ) );
assert.eq( 1, t.count( {foo:{$not:{$in:[null]}}} ) );
assert.eq( 1, t.count( {foo:{$not:{$all:[null]}}} ) );
t.remove({});
t.save( {foo:[0,1]} );
assert.eq( 1, t.count( {foo:{$in:[[0,1]]}} ) );
assert.eq( 1, t.count( {foo:{$all:[[0,1]]}} ) );
t.remove({});
t.save( {foo:[]} );
assert.eq( 1, t.count( {foo:{$in:[[]]}} ) );
assert.eq( 1, t.count( {foo:{$all:[[]]}} ) );

View File

@ -1,30 +0,0 @@
// Test $all/$elemMatch with missing field - SERVER-4492
t = db.jstests_all4;
t.drop();
function checkQuery( query, val ) {
assert.eq( val, t.count(query) );
assert( !db.getLastError() );
assert.eq( val, t.find(query).itcount() );
assert( !db.getLastError() );
}
checkQuery( {a:{$all:[]}}, 0 );
checkQuery( {a:{$all:[1]}}, 0 );
checkQuery( {a:{$all:[{$elemMatch:{b:1}}]}}, 0 );
t.save({});
checkQuery( {a:{$all:[]}}, 0 );
checkQuery( {a:{$all:[1]}}, 0 );
checkQuery( {a:{$all:[{$elemMatch:{b:1}}]}}, 0 );
t.save({a:1});
checkQuery( {a:{$all:[]}}, 0 );
checkQuery( {a:{$all:[1]}}, 1 );
checkQuery( {a:{$all:[{$elemMatch:{b:1}}]}}, 0 );
t.save({a:[{b:1}]});
checkQuery( {a:{$all:[]}}, 0 );
checkQuery( {a:{$all:[1]}}, 1 );
checkQuery( {a:{$all:[{$elemMatch:{b:1}}]}}, 1 );

View File

@ -1,28 +0,0 @@
// Test $all/$elemMatch/null matching - SERVER-4517
t = db.jstests_all5;
t.drop();
function checkMatch( doc ) {
t.drop();
t.save( doc );
assert.eq( 1, t.count( {a:{$elemMatch:{b:null}}} ) );
assert.eq( 1, t.count( {a:{$all:[{$elemMatch:{b:null}}]}} ) );
}
function checkNoMatch( doc ) {
t.drop();
t.save( doc );
assert.eq( 0, t.count( {a:{$all:[{$elemMatch:{b:null}}]}} ) );
}
checkNoMatch( {} );
checkNoMatch( {a:1} );
checkNoMatch( {a:[]} );
checkNoMatch( {a:[1]} );
checkMatch( {a:[{}]} );
checkMatch( {a:[{c:1}]} );
checkMatch( {a:[{b:null}]} );
checkNoMatch( {a:[{b:1}]}, 0 );

View File

@ -1,85 +0,0 @@
// Some tests for $and SERVER-1089
t = db.jstests_and;
t.drop();
t.save( {a:[1,2]} );
t.save( {a:'foo'} );
function check() {
// $and must be an array
assert.throws( function() { t.find( {$and:4} ).toArray() } );
// $and array must not be empty
assert.throws( function() { t.find( {$and:[]} ).toArray() } );
// $and elements must be objects
assert.throws( function() { t.find( {$and:[4]} ).toArray() } );
// Check equality matching
assert.eq( 1, t.count( {$and:[{a:1}]} ) );
assert.eq( 1, t.count( {$and:[{a:1},{a:2}]} ) );
assert.eq( 0, t.count( {$and:[{a:1},{a:3}]} ) );
assert.eq( 0, t.count( {$and:[{a:1},{a:2},{a:3}]} ) );
assert.eq( 1, t.count( {$and:[{a:'foo'}]} ) );
assert.eq( 0, t.count( {$and:[{a:'foo'},{a:'g'}]} ) );
// Check $and with other fields
assert.eq( 1, t.count( {a:2,$and:[{a:1}]} ) );
assert.eq( 0, t.count( {a:0,$and:[{a:1}]} ) );
assert.eq( 0, t.count( {a:2,$and:[{a:0}]} ) );
assert.eq( 1, t.count( {a:1,$and:[{a:1}]} ) );
// Check recursive $and
assert.eq( 1, t.count( {a:2,$and:[{$and:[{a:1}]}]} ) );
assert.eq( 0, t.count( {a:0,$and:[{$and:[{a:1}]}]} ) );
assert.eq( 0, t.count( {a:2,$and:[{$and:[{a:0}]}]} ) );
assert.eq( 1, t.count( {a:1,$and:[{$and:[{a:1}]}]} ) );
assert.eq( 1, t.count( {$and:[{a:2},{$and:[{a:1}]}]} ) );
assert.eq( 0, t.count( {$and:[{a:0},{$and:[{a:1}]}]} ) );
assert.eq( 0, t.count( {$and:[{a:2},{$and:[{a:0}]}]} ) );
assert.eq( 1, t.count( {$and:[{a:1},{$and:[{a:1}]}]} ) );
// Some of these cases were more important with an alternative $and syntax
// that was rejected, but they're still valid checks.
// Check simple regex
assert.eq( 1, t.count( {$and:[{a:/foo/}]} ) );
// Check multiple regexes
assert.eq( 1, t.count( {$and:[{a:/foo/},{a:/^f/},{a:/o/}]} ) );
assert.eq( 0, t.count( {$and:[{a:/foo/},{a:/^g/}]} ) );
assert.eq( 1, t.count( {$and:[{a:/^f/},{a:'foo'}]} ) );
// Check regex flags
assert.eq( 0, t.count( {$and:[{a:/^F/},{a:'foo'}]} ) );
assert.eq( 1, t.count( {$and:[{a:/^F/i},{a:'foo'}]} ) );
// Check operator
assert.eq( 1, t.count( {$and:[{a:{$gt:0}}]} ) );
// Check where
assert.eq( 1, t.count( {a:'foo',$where:'this.a=="foo"'} ) );
assert.eq( 1, t.count( {$and:[{a:'foo'}],$where:'this.a=="foo"'} ) );
assert.eq( 1, t.count( {$and:[{a:'foo'}],$where:'this.a=="foo"'} ) );
// Nested where ok
assert.eq( 1, t.count({$and:[{$where:'this.a=="foo"'}]}) );
assert.eq( 1, t.count({$and:[{a:'foo'},{$where:'this.a=="foo"'}]}) );
assert.eq( 1, t.count({$and:[{$where:'this.a=="foo"'}],$where:'this.a=="foo"'}) );
}
check();
t.ensureIndex( {a:1} );
check();
var e = t.find( {$and:[{a:1}]} ).explain();
assert.eq( 'BtreeCursor a_1', e.cursor );
assert.eq( [[1,1]], e.indexBounds.a );
function checkBounds( query ) {
var e = t.find( query ).explain(true);
printjson(e);
assert.eq( 1, e.n );
}
checkBounds( {a:1,$and:[{a:2}]} );
checkBounds( {$and:[{a:1},{a:2}]} );

View File

@ -1,27 +0,0 @@
// Test dollar sign operator with $and SERVER-1089
t = db.jstests_and2;
t.drop();
t.save( {a:[1,2]} );
t.update( {a:1}, {$set:{'a.$':5}} );
assert.eq( [5,2], t.findOne().a );
t.drop();
t.save( {a:[1,2]} );
t.update( {$and:[{a:1}]}, {$set:{'a.$':5}} );
assert.eq( [5,2], t.findOne().a );
// Make sure dollar sign operator with $and is consistent with no $and case
t.drop();
t.save( {a:[1,2],b:[3,4]} );
t.update( {a:1,b:4}, {$set:{'a.$':5}} );
// Probably not what we want here, just trying to make sure $and is consistent
assert.eq( {a:[1,5],b:[3,4]}, t.find( {}, {_id:0} ).toArray()[ 0 ] );
// Make sure dollar sign operator with $and is consistent with no $and case
t.drop();
t.save( {a:[1,2],b:[3,4]} );
t.update( {a:1,$and:[{b:4}]}, {$set:{'a.$':5}} );
// Probably not what we want here, just trying to make sure $and is consistent
assert.eq( {a:[1,5],b:[3,4]}, t.find( {}, {_id:0} ).toArray()[ 0 ] );

View File

@ -1,67 +0,0 @@
// Check key match with sub matchers - part of SERVER-3192
t = db.jstests_and3;
t.drop();
t.save( {a:1} );
t.save( {a:'foo'} );
t.ensureIndex( {a:1} );
function checkScanMatch( query, nscannedObjects, n ) {
var e = t.find( query ).hint( {a:1} ).explain();
assert.eq( nscannedObjects, e.nscannedObjects );
assert.eq( n, e.n );
}
checkScanMatch( {a:/o/}, 1, 1 );
checkScanMatch( {a:/a/}, 0, 0 );
checkScanMatch( {a:{$not:/o/}}, 2, 1 );
checkScanMatch( {a:{$not:/a/}}, 2, 2 );
checkScanMatch( {$and:[{a:/o/}]}, 1, 1 );
checkScanMatch( {$and:[{a:/a/}]}, 0, 0 );
checkScanMatch( {$and:[{a:{$not:/o/}}]}, 2, 1 );
checkScanMatch( {$and:[{a:{$not:/a/}}]}, 2, 2 );
checkScanMatch( {$and:[{a:/o/},{a:{$not:/o/}}]}, 1, 0 );
checkScanMatch( {$and:[{a:/o/},{a:{$not:/a/}}]}, 1, 1 );
checkScanMatch( {$or:[{a:/o/}]}, 1, 1 );
checkScanMatch( {$or:[{a:/a/}]}, 0, 0 );
checkScanMatch( {$nor:[{a:/o/}]}, 2, 1 );
checkScanMatch( {$nor:[{a:/a/}]}, 2, 2 );
checkScanMatch( {$and:[{$and:[{a:/o/}]}]}, 1, 1 );
checkScanMatch( {$and:[{$and:[{a:/a/}]}]}, 0, 0 );
checkScanMatch( {$and:[{$and:[{a:{$not:/o/}}]}]}, 2, 1 );
checkScanMatch( {$and:[{$and:[{a:{$not:/a/}}]}]}, 2, 2 );
checkScanMatch( {$and:[{$or:[{a:/o/}]}]}, 1, 1 );
checkScanMatch( {$and:[{$or:[{a:/a/}]}]}, 0, 0 );
checkScanMatch( {$or:[{a:{$not:/o/}}]}, 2, 1 );
checkScanMatch( {$and:[{$or:[{a:{$not:/o/}}]}]}, 2, 1 );
checkScanMatch( {$and:[{$or:[{a:{$not:/a/}}]}]}, 2, 2 );
checkScanMatch( {$and:[{$nor:[{a:/o/}]}]}, 2, 1 );
checkScanMatch( {$and:[{$nor:[{a:/a/}]}]}, 2, 2 );
checkScanMatch( {$where:'this.a==1'}, 2, 1 );
checkScanMatch( {$and:[{$where:'this.a==1'}]}, 2, 1 );
checkScanMatch( {a:1,$where:'this.a==1'}, 1, 1 );
checkScanMatch( {a:1,$and:[{$where:'this.a==1'}]}, 1, 1 );
checkScanMatch( {$and:[{a:1},{$where:'this.a==1'}]}, 1, 1 );
checkScanMatch( {$and:[{a:1,$where:'this.a==1'}]}, 1, 1 );
checkScanMatch( {a:1,$and:[{a:1},{a:1,$where:'this.a==1'}]}, 1, 1 );
function checkImpossibleMatch( query ) {
var e = t.find( query ).explain();
assert.eq( 0, e.n );
// The explain output should include the indexBounds field.
// The presence of the indexBounds field indicates that the
// query can make use of an index.
assert('indexBounds' in e, 'index bounds are missing');
}
// With a single key index, all bounds are utilized.
assert.eq( [[1,1]], t.find( {$and:[{a:1}]} ).explain().indexBounds.a );
assert.eq( [[1,1]], t.find( {a:1,$and:[{a:1}]} ).explain().indexBounds.a );
checkImpossibleMatch( {a:1,$and:[{a:2}]} );
checkImpossibleMatch( {$and:[{a:1},{a:2}]} );

View File

@ -1,99 +0,0 @@
// SERVER-1089 Test and/or nesting
t = db.jstests_andor;
t.drop();
// not ok
function ok( q ) {
assert.eq( 1, t.find( q ).itcount() );
}
t.save( {a:1} );
test = function() {
ok( {a:1} );
ok( {$and:[{a:1}]} );
ok( {$or:[{a:1}]} );
ok( {$and:[{$and:[{a:1}]}]} );
ok( {$or:[{$or:[{a:1}]}]} );
ok( {$and:[{$or:[{a:1}]}]} );
ok( {$or:[{$and:[{a:1}]}]} );
ok( {$and:[{$and:[{$or:[{a:1}]}]}]} );
ok( {$and:[{$or:[{$and:[{a:1}]}]}]} );
ok( {$or:[{$and:[{$and:[{a:1}]}]}]} );
ok( {$or:[{$and:[{$or:[{a:1}]}]}]} );
// now test $nor
ok( {$and:[{a:1}]} );
ok( {$nor:[{a:2}]} );
ok( {$and:[{$and:[{a:1}]}]} );
ok( {$nor:[{$nor:[{a:1}]}]} );
ok( {$and:[{$nor:[{a:2}]}]} );
ok( {$nor:[{$and:[{a:2}]}]} );
ok( {$and:[{$and:[{$nor:[{a:2}]}]}]} );
ok( {$and:[{$nor:[{$and:[{a:2}]}]}]} );
ok( {$nor:[{$and:[{$and:[{a:2}]}]}]} );
ok( {$nor:[{$and:[{$nor:[{a:1}]}]}]} );
}
test();
t.ensureIndex( {a:1} );
test();
// Test an inequality base match.
test = function() {
ok( {a:{$ne:2}} );
ok( {$and:[{a:{$ne:2}}]} );
ok( {$or:[{a:{$ne:2}}]} );
ok( {$and:[{$and:[{a:{$ne:2}}]}]} );
ok( {$or:[{$or:[{a:{$ne:2}}]}]} );
ok( {$and:[{$or:[{a:{$ne:2}}]}]} );
ok( {$or:[{$and:[{a:{$ne:2}}]}]} );
ok( {$and:[{$and:[{$or:[{a:{$ne:2}}]}]}]} );
ok( {$and:[{$or:[{$and:[{a:{$ne:2}}]}]}]} );
ok( {$or:[{$and:[{$and:[{a:{$ne:2}}]}]}]} );
ok( {$or:[{$and:[{$or:[{a:{$ne:2}}]}]}]} );
// now test $nor
ok( {$and:[{a:{$ne:2}}]} );
ok( {$nor:[{a:{$ne:1}}]} );
ok( {$and:[{$and:[{a:{$ne:2}}]}]} );
ok( {$nor:[{$nor:[{a:{$ne:2}}]}]} );
ok( {$and:[{$nor:[{a:{$ne:1}}]}]} );
ok( {$nor:[{$and:[{a:{$ne:1}}]}]} );
ok( {$and:[{$and:[{$nor:[{a:{$ne:1}}]}]}]} );
ok( {$and:[{$nor:[{$and:[{a:{$ne:1}}]}]}]} );
ok( {$nor:[{$and:[{$and:[{a:{$ne:1}}]}]}]} );
ok( {$nor:[{$and:[{$nor:[{a:{$ne:2}}]}]}]} );
}
t.drop();
t.save( {a:1} );
test();
t.ensureIndex( {a:1} );
test();

View File

@ -1,77 +0,0 @@
/**
* Tests for the db object enhancement
*/
assert( "test" == db, "wrong database currently not test" );
dd = function( x ){
//print( x );
}
dd( "a" );
dd( "b" );
/*
* be sure the public collection API is complete
*/
assert(db.createCollection , "createCollection" );
assert(db.getProfilingLevel , "getProfilingLevel" );
assert(db.setProfilingLevel , "setProfilingLevel" );
assert(db.dbEval , "dbEval" );
assert(db.group , "group" );
dd( "c" );
/*
* test createCollection
*/
db.getCollection( "test" ).drop();
db.getCollection( "system.namespaces" ).find().forEach( function(x) { assert(x.name != "test.test"); });
dd( "d" );
db.createCollection("test");
var found = false;
db.getCollection( "system.namespaces" ).find().forEach( function(x) { if (x.name == "test.test") found = true; });
assert(found, "found test.test in system.namespaces");
dd( "e" );
/*
* profile level
*/
db.setProfilingLevel(0);
assert(db.getProfilingLevel() == 0, "prof level 0");
db.setProfilingLevel(1);
assert(db.getProfilingLevel() == 1, "p1");
db.setProfilingLevel(2);
assert(db.getProfilingLevel() == 2, "p2");
db.setProfilingLevel(0);
assert(db.getProfilingLevel() == 0, "prof level 0");
dd( "f" );
asserted = false;
try {
db.setProfilingLevel(10);
assert(false);
}
catch (e) {
asserted = true;
assert(e.dbSetProfilingException);
}
assert( asserted, "should have asserted" );
dd( "g" );
assert.eq( "foo" , db.getSisterDB( "foo" ).getName() )
assert.eq( "foo" , db.getSiblingDB( "foo" ).getName() )

View File

@ -1,115 +0,0 @@
/**
* Tests for the db collection
*/
/*
* test drop
*/
db.getCollection( "test_db" ).drop();
assert(db.getCollection( "test_db" ).find().length() == 0,1);
db.getCollection( "test_db" ).save({a:1});
assert(db.getCollection( "test_db" ).find().length() == 1,2);
db.getCollection( "test_db" ).drop();
assert(db.getCollection( "test_db" ).find().length() == 0,3);
/*
* test count
*/
assert(db.getCollection( "test_db" ).count() == 0,4);
db.getCollection( "test_db" ).save({a:1});
assert(db.getCollection( "test_db" ).count() == 1,5);
for (i = 0; i < 100; i++) {
db.getCollection( "test_db" ).save({a:1});
}
assert(db.getCollection( "test_db" ).count() == 101,6);
db.getCollection( "test_db" ).drop();
assert(db.getCollection( "test_db" ).count() == 0,7);
/*
* test clean (not sure... just be sure it doen't blow up, I guess
*/
db.getCollection( "test_db" ).clean();
/*
* test validate
*/
db.getCollection( "test_db" ).drop();
assert(db.getCollection( "test_db" ).count() == 0,8);
for (i = 0; i < 100; i++) {
db.getCollection( "test_db" ).save({a:1});
}
var v = db.getCollection( "test_db" ).validate();
if( v.ns != "test.test_db" ) {
print("Error: wrong ns name");
print(tojson(v));
}
assert (v.ns == "test.test_db",9);
assert (v.ok == 1,10);
assert.eq(100,v.nrecords,11)
/*
* test deleteIndex, deleteIndexes
*/
db.getCollection( "test_db" ).drop();
assert(db.getCollection( "test_db" ).count() == 0,12);
db.getCollection( "test_db" ).dropIndexes();
assert(db.getCollection( "test_db" ).getIndexes().length == 0,13);
db.getCollection( "test_db" ).save({a:10});
assert(db.getCollection( "test_db" ).getIndexes().length == 1,14);
db.getCollection( "test_db" ).ensureIndex({a:1});
db.getCollection( "test_db" ).save({a:10});
print( tojson( db.getCollection( "test_db" ).getIndexes() ) );
assert.eq(db.getCollection( "test_db" ).getIndexes().length , 2,15);
db.getCollection( "test_db" ).dropIndex({a:1});
assert(db.getCollection( "test_db" ).getIndexes().length == 1,16);
db.getCollection( "test_db" ).save({a:10});
db.getCollection( "test_db" ).ensureIndex({a:1});
db.getCollection( "test_db" ).save({a:10});
assert(db.getCollection( "test_db" ).getIndexes().length == 2,17);
db.getCollection( "test_db" ).dropIndex("a_1");
assert.eq( db.getCollection( "test_db" ).getIndexes().length , 1,18);
db.getCollection( "test_db" ).save({a:10, b:11});
db.getCollection( "test_db" ).ensureIndex({a:1});
db.getCollection( "test_db" ).ensureIndex({b:1});
db.getCollection( "test_db" ).save({a:10, b:12});
assert(db.getCollection( "test_db" ).getIndexes().length == 3,19);
db.getCollection( "test_db" ).dropIndex({b:1});
assert(db.getCollection( "test_db" ).getIndexes().length == 2,20);
db.getCollection( "test_db" ).dropIndex({a:1});
assert(db.getCollection( "test_db" ).getIndexes().length == 1,21);
db.getCollection( "test_db" ).save({a:10, b:11});
db.getCollection( "test_db" ).ensureIndex({a:1});
db.getCollection( "test_db" ).ensureIndex({b:1});
db.getCollection( "test_db" ).save({a:10, b:12});
assert(db.getCollection( "test_db" ).getIndexes().length == 3,22);
db.getCollection( "test_db" ).dropIndexes();
assert(db.getCollection( "test_db" ).getIndexes().length == 1,23);
db.getCollection( "test_db" ).find();
db.getCollection( "test_db" ).drop();
assert(db.getCollection( "test_db" ).getIndexes().length == 0,24);

View File

@ -1,66 +0,0 @@
t = db.apply_ops1;
t.drop();
assert.eq( 0 , t.find().count() , "A0" );
a = db.adminCommand( { applyOps : [ { "op" : "i" , "ns" : t.getFullName() , "o" : { _id : 5 , x : 17 } } ] } )
assert.eq( 1 , t.find().count() , "A1a" );
assert.eq( true, a.results[0], "A1b" );
o = { _id : 5 , x : 17 }
assert.eq( o , t.findOne() , "A2" );
res = db.runCommand( { applyOps : [
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 5 } , "o" : { $inc : { x : 1 } } } ,
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 5 } , "o" : { $inc : { x : 1 } } }
] } )
o.x++;
o.x++;
assert.eq( 1 , t.find().count() , "A3" );
assert.eq( o , t.findOne() , "A4" );
assert.eq( true, res.results[0], "A1b" );
assert.eq( true, res.results[1], "A1b" );
res = db.runCommand( { applyOps :
[
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 5 } , "o" : { $inc : { x : 1 } } } ,
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 5 } , "o" : { $inc : { x : 1 } } }
]
,
preCondition : [ { ns : t.getFullName() , q : { _id : 5 } , res : { x : 19 } } ]
} );
o.x++;
o.x++;
assert.eq( 1 , t.find().count() , "B1" );
assert.eq( o , t.findOne() , "B2" );
assert.eq( true, res.results[0], "B2a" );
assert.eq( true, res.results[1], "B2b" );
res = db.runCommand( { applyOps :
[
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 5 } , "o" : { $inc : { x : 1 } } } ,
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 5 } , "o" : { $inc : { x : 1 } } }
]
,
preCondition : [ { ns : t.getFullName() , q : { _id : 5 } , res : { x : 19 } } ]
} );
assert.eq( 1 , t.find().count() , "B3" );
assert.eq( o , t.findOne() , "B4" );
res = db.runCommand( { applyOps :
[
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 5 } , "o" : { $inc : { x : 1 } } } ,
{ "op" : "u" , "ns" : t.getFullName() , "o2" : { _id : 6 } , "o" : { $inc : { x : 1 } } }
]
} );
assert.eq( true, res.results[0], "B5" );
assert.eq( true, res.results[1], "B6" );

View File

@ -1,71 +0,0 @@
//Test applyops upsert flag SERVER-7452
var t = db.apply_ops2;
t.drop();
assert.eq(0, t.find().count(), "test collection not empty");
t.insert({_id:1, x:"init"});
//alwaysUpsert = true
print("Testing applyOps with alwaysUpsert = true");
var res = db.runCommand({ applyOps: [
{
op: "u",
ns: t.getFullName(),
o2 : { _id: 1 },
o: { $set: { x: "upsert=true existing" }}
},
{
op: "u",
ns: t.getFullName(),
o2: { _id: 2 },
o: { $set : { x: "upsert=true non-existing" }}
}], alwaysUpsert: true });
assert.eq(true, res.results[0], "upsert = true, existing doc update failed");
assert.eq(true, res.results[1], "upsert = true, nonexisting doc not upserted");
assert.eq(2, t.find().count(), "2 docs expected after upsert");
//alwaysUpsert = false
print("Testing applyOps with alwaysUpsert = false");
res = db.runCommand({ applyOps: [
{
op: "u",
ns: t.getFullName(),
o2: { _id: 1 },
o: { $set : { x: "upsert=false existing" }}
},
{
op: "u",
ns: t.getFullName(),
o2: { _id: 3 },
o: { $set: { x: "upsert=false non-existing" }}
}], alwaysUpsert: false });
assert.eq(true, res.results[0], "upsert = false, existing doc update failed");
assert.eq(false, res.results[1], "upsert = false, nonexisting doc upserted");
assert.eq(2, t.find().count(), "2 docs expected after upsert failure");
//alwaysUpsert not specified, should default to true
print("Testing applyOps with default alwaysUpsert");
res = db.runCommand({ applyOps: [
{
op: "u",
ns: t.getFullName(),
o2: { _id: 1 },
o: { $set: { x: "upsert=default existing" }}
},
{
op: "u",
ns: t.getFullName(),
o2: { _id: 4 },
o: { $set: { x: "upsert=defaults non-existing" }}
}]});
assert.eq(true, res.results[0], "default upsert, existing doc update failed");
assert.eq(true, res.results[1], "default upsert, nonexisting doc not upserted");
assert.eq(3, t.find().count(), "2 docs expected after upsert failure");

View File

@ -1,14 +0,0 @@
t = db.array1
t.drop()
x = { a : [ 1 , 2 ] };
t.save( { a : [ [1,2] ] } );
assert.eq( 1 , t.find( x ).count() , "A" );
t.save( x );
delete x._id;
assert.eq( 2 , t.find( x ).count() , "B" );
t.ensureIndex( { a : 1 } );
assert.eq( 2 , t.find( x ).count() , "C" ); // TODO SERVER-146

View File

@ -1,8 +0,0 @@
assert.eq( 5 , Array.sum( [ 1 , 4 ] ), "A" )
assert.eq( 2.5 , Array.avg( [ 1 , 4 ] ), "B" )
arr = [ 2 , 4 , 4 , 4 , 5 , 5 , 7 , 9 ]
assert.eq( 5 , Array.avg( arr ) , "C" )
assert.eq( 2 , Array.stdDev( arr ) , "D" )

View File

@ -1,30 +0,0 @@
t = db.array4;
t.drop();
t.insert({"a": ["1", "2", "3"]});
t.insert({"a" : ["2", "1"]});
var x = {'a.0' : /1/};
assert.eq(t.count(x), 1);
assert.eq(t.findOne(x).a[0], 1);
assert.eq(t.findOne(x).a[1], 2);
t.drop();
t.insert({"a" : {"0" : "1"}});
t.insert({"a" : ["2", "1"]});
assert.eq(t.count(x), 1);
assert.eq(t.findOne(x).a[0], 1);
t.drop();
t.insert({"a" : ["0", "1", "2", "3", "4", "5", "6", "1", "1", "1", "2", "3", "2", "1"]});
t.insert({"a" : ["2", "1"]});
x = {"a.12" : /2/};
assert.eq(t.count(x), 1);
assert.eq(t.findOne(x).a[0], 0);

View File

@ -1,31 +0,0 @@
t = db.array_match1
t.drop();
t.insert( { _id : 1 , a : [ 5 , 5 ] } )
t.insert( { _id : 2 , a : [ 6 , 6 ] } )
t.insert( { _id : 3 , a : [ 5 , 5 ] } )
function test( f , m ){
var q = {};
q[f] = [5,5];
assert.eq( 2 , t.find( q ).itcount() , m + "1" )
q[f] = [6,6];
assert.eq( 1 , t.find( q ).itcount() , m + "2" )
}
test( "a" , "A" );
t.ensureIndex( { a : 1 } )
test( "a" , "B" );
t.drop();
t.insert( { _id : 1 , a : { b : [ 5 , 5 ] } } )
t.insert( { _id : 2 , a : { b : [ 6 , 6 ] } } )
t.insert( { _id : 3 , a : { b : [ 5 , 5 ] } } )
test( "a.b" , "C" );
t.ensureIndex( { a : 1 } )
test( "a.b" , "D" );

View File

@ -1,20 +0,0 @@
t = db.jstests_array_match2;
t.drop();
t.save( {a:[{1:4},5]} );
// When the array index is the last field, both of these match types work.
assert.eq( 1, t.count( {'a.1':4} ) );
assert.eq( 1, t.count( {'a.1':5} ) );
t.remove({});
// When the array index is not the last field, only one of the match types works.
t.save( {a:[{1:{foo:4}},{foo:5}]} );
assert.eq( 1, t.count( {'a.1.foo':4} ) );
assert.eq( 1, t.count( {'a.1.foo':5} ) );
// Same issue with the $exists operator
t.remove({});
t.save( {a:[{1:{foo:4}},{}]} );
assert.eq( 1, t.count( {'a.1':{$exists:true}} ) );
assert.eq( 1, t.count( {'a.1.foo':{$exists:true}} ) );

View File

@ -1,13 +0,0 @@
// SERVER-2902 Test indexing of numerically referenced array elements.
t = db.jstests_array_match3;
t.drop();
// Test matching numericallly referenced array element.
t.save( {a:{'0':5}} );
t.save( {a:[5]} );
assert.eq( 2, t.count( {'a.0':5} ) );
// Test with index.
t.ensureIndex( {'a.0':1} );
assert.eq( 2, t.count( {'a.0':5} ) );

View File

@ -1,30 +0,0 @@
var t = db.array_match4;
t.drop();
t.save({a: [1, 2]});
var query_gte = {a: {$gte: [1, 2]}};
//
// without index
//
assert.eq(1, t.find({a: [1, 2]}).count(), '$eq (without index)');
assert.eq(1, t.find(query_gte).itcount(), '$gte (without index)');
//
// with index
//
t.ensureIndex({a: 1});
assert.eq(1, t.find({a: [1, 2]}).count(), '$eq (with index)');
// display explain output (for index bounds)
var explain = t.find(query_gte).explain();
print('explain for ' + tojson(query_gte, '', true) + ' = ' + tojson(explain));
// number of documents returned by indexes query should be consistent
// with non-indexed case.
// XXX: The following assertion documents current behavior.
// XXX: 2.4 and 2.6 both return 0 documents.
assert.eq(0, t.find(query_gte).itcount(), '$gte (with index)');

View File

@ -1,40 +0,0 @@
t = db.arrayfind1;
t.drop();
t.save( { a : [ { x : 1 } ] } )
t.save( { a : [ { x : 1 , y : 2 , z : 1 } ] } )
t.save( { a : [ { x : 1 , y : 1 , z : 3 } ] } )
function test( exptected , q , name ){
assert.eq( exptected , t.find( q ).itcount() , name + " " + tojson( q ) + " itcount" );
assert.eq( exptected , t.find( q ).count() , name + " " + tojson( q ) + " count" );
}
test( 3 , {} , "A1" );
test( 1 , { "a.y" : 2 } , "A2" );
test( 1 , { "a" : { x : 1 } } , "A3" );
test( 3 , { "a" : { $elemMatch : { x : 1 } } } , "A4" ); // SERVER-377
t.save( { a : [ { x : 2 } ] } )
t.save( { a : [ { x : 3 } ] } )
t.save( { a : [ { x : 4 } ] } )
assert.eq( 1 , t.find( { a : { $elemMatch : { x : 2 } } } ).count() , "B1" );
assert.eq( 2 , t.find( { a : { $elemMatch : { x : { $gt : 2 } } } } ).count() , "B2" );
t.ensureIndex( { "a.x" : 1 } );
assert( t.find( { "a" : { $elemMatch : { x : 1 } } } ).explain().cursor.indexOf( "BtreeC" ) == 0 , "C1" );
assert.eq( 1 , t.find( { a : { $elemMatch : { x : 2 } } } ).count() , "D1" );
t.find( { "a.x" : 1 } ).count();
t.find( { "a.x" : { $gt : 1 } } ).count();
res = t.find( { "a" : { $elemMatch : { x : { $gt : 2 } } } } ).explain()
assert( res.cursor.indexOf( "BtreeC" ) == 0 , "D2" );
assert.eq( 2 , t.find( { a : { $elemMatch : { x : { $gt : 2 } } } } ).count() , "D3" );
assert.eq( 2 , t.find( { a : { $ne:2, $elemMatch : { x : { $gt : 2 } } } } ).count() , "E1" );
assert( t.find( { a : { $ne:2, $elemMatch : { x : { $gt : 2 } } } } ).explain().cursor.indexOf( "BtreeC" ) == 0 , "E2" );

View File

@ -1,29 +0,0 @@
t = db.arrayfind2;
t.drop();
function go( prefix ){
assert.eq( 3 , t.count() , prefix + " A1" );
assert.eq( 3 , t.find( { a : { $elemMatch : { x : { $gt : 4 } } } } ).count() , prefix + " A2" );
assert.eq( 1 , t.find( { a : { $elemMatch : { x : { $lt : 2 } } } } ).count() , prefix + " A3" );
assert.eq( 1 , t.find( { a : { $all : [ { $elemMatch : { x : { $lt : 4 } } } ,
{ $elemMatch : { x : { $gt : 5 } } } ] } } ).count() , prefix + " A4" );
assert.throws( function() { return t.findOne( { a : { $all : [ 1, { $elemMatch : { x : 3 } } ] } } ) } );
assert.throws( function() { return t.findOne( { a : { $all : [ /a/, { $elemMatch : { x : 3 } } ] } } ) } );
}
t.save( { a : [ { x : 1 } , { x : 5 } ] } )
t.save( { a : [ { x : 3 } , { x : 5 } ] } )
t.save( { a : [ { x : 3 } , { x : 6 } ] } )
go( "no index" );
t.ensureIndex( { a : 1 } );
go( "index(a)" );
t.ensureIndex( { "a.x": 1 } );
assert.eq( {"a.x":[[3,3]]}, t.find( { a : { $all : [ { $elemMatch : { x : 3 } } ] } } ).explain().indexBounds );
// only first $elemMatch used to find bounds
assert.eq( {"a.x":[[3,3]]}, t.find( { a : { $all : [ { $elemMatch : { x : 3 } }, { $elemMatch : { y : 5 } } ] } } ).explain().indexBounds );

View File

@ -1,16 +0,0 @@
t = db.arrayfind3;
t.drop()
t.save({a:[1,2]})
t.save({a:[1, 2, 6]})
t.save({a:[1, 4, 6]})
assert.eq( 2 , t.find( {a:{$gte:3, $lte: 5}} ).itcount() , "A1" )
assert.eq( 1 , t.find( {a:{$elemMatch:{$gte:3, $lte: 5}}} ).itcount() , "A2" )
t.ensureIndex( { a : 1 } )
assert.eq( 2 , t.find( {a:{$gte:3, $lte: 5}} ).itcount() , "B1" );
assert.eq( 1 , t.find( {a:{$elemMatch:{$gte:3, $lte: 5}}} ).itcount() , "B2" )

View File

@ -1,22 +0,0 @@
// Test query empty array SERVER-2258
t = db.jstests_arrayfind4;
t.drop();
t.save( {a:[]} );
t.ensureIndex( {a:1} );
assert.eq( 1, t.find( {a:[]} ).hint( {$natural:1} ).itcount() );
assert.eq( 1, t.find( {a:[]} ).hint( {a:1} ).itcount() );
assert.eq( 1, t.find( {a:{$in:[[]]}} ).hint( {$natural:1} ).itcount() );
assert.eq( 1, t.find( {a:{$in:[[]]}} ).hint( {a:1} ).itcount() );
t.remove({});
t.save( {a:[[]]} );
assert.eq( 1, t.find( {a:[]} ).hint( {$natural:1} ).itcount() );
assert.eq( 1, t.find( {a:[]} ).hint( {a:1} ).itcount() );
assert.eq( 1, t.find( {a:{$in:[[]]}} ).hint( {$natural:1} ).itcount() );
assert.eq( 1, t.find( {a:{$in:[[]]}} ).hint( {a:1} ).itcount() );

View File

@ -1,23 +0,0 @@
// Test indexed elemmatch of missing field.
t = db.jstests_arrayfind5;
t.drop();
function check( nullElemMatch ) {
assert.eq( 1, t.find( {'a.b':1} ).itcount() );
assert.eq( 1, t.find( {a:{$elemMatch:{b:1}}} ).itcount() );
assert.eq( nullElemMatch ? 1 : 0 , t.find( {'a.b':null} ).itcount() );
assert.eq( nullElemMatch ? 1 : 0, t.find( {a:{$elemMatch:{b:null}}} ).itcount() ); // see SERVER-3377
}
t.save( {a:[{},{b:1}]} );
check( true );
t.ensureIndex( {'a.b':1} );
check( true );
t.drop();
t.save( {a:[5,{b:1}]} );
check( false );
t.ensureIndex( {'a.b':1} );
check( false );

View File

@ -1,26 +0,0 @@
// Check index bound determination for $not:$elemMatch queries. SERVER-5740
t = db.jstests_arrayfind6;
t.drop();
t.save( { a:[ { b:1, c:2 } ] } );
function checkElemMatchMatches() {
assert.eq( 1, t.count( { a:{ $elemMatch:{ b:1, c:2 } } } ) );
assert.eq( 0, t.count( { a:{ $not:{ $elemMatch:{ b:1, c:2 } } } } ) );
assert.eq( 1, t.count( { a:{ $not:{ $elemMatch:{ b:1, c:3 } } } } ) );
assert.eq( 1, t.count( { a:{ $not:{ $elemMatch:{ b:{ $ne:1 }, c:3 } } } } ) );
// Index bounds must be determined for $not:$elemMatch, not $not:$ne. In this case if index
// bounds are determined for $not:$ne, the a.b index will be constrained to the interval [2,2]
// and the saved document will not be matched as it should.
assert.eq( 1, t.count( { a:{ $not:{ $elemMatch:{ b:{ $ne:2 }, c:3 } } } } ) );
}
checkElemMatchMatches();
t.ensureIndex( { 'a.b':1 } );
checkElemMatchMatches();
// We currently never use an index for negations of
// ELEM_MATCH_OBJECT expressions.
var explain = t.find( { a:{ $not:{ $elemMatch:{ b:{ $ne:2 }, c:3 } } } } ).explain();
assert.eq( "BasicCursor", explain.cursor );

View File

@ -1,52 +0,0 @@
// Nested $elemMatch clauses. SERVER-5741
t = db.jstests_arrayfind7;
t.drop();
t.save( { a:[ { b:[ { c:1, d:2 } ] } ] } );
function checkElemMatchMatches() {
assert.eq( 1, t.count( { a:{ $elemMatch:{ b:{ $elemMatch:{ c:1, d:2 } } } } } ) );
}
// The document is matched using nested $elemMatch expressions, with and without an index.
checkElemMatchMatches();
t.ensureIndex( { 'a.b.c':1 } );
checkElemMatchMatches();
function checkElemMatch( index, document, query ) {
// The document is matched without an index, and with single and multi key indexes.
t.drop();
t.save( document );
assert.eq( 1, t.count( query ) );
t.ensureIndex( index );
assert.eq( 1, t.count( query ) );
t.save( { a:{ b:{ c:[ 10, 11 ] } } } ); // Make the index multikey.
assert.eq( 1, t.count( query ) );
}
// Two constraints within a nested $elemMatch expression.
checkElemMatch( { 'a.b.c':1 },
{ a:[ { b:[ { c:1 } ] } ] },
{ a:{ $elemMatch:{ b:{ $elemMatch:{ c:{ $gte:1, $lte:1 } } } } } });
// Two constraints within a nested $elemMatch expression, one of which contains the other.
checkElemMatch( { 'a.b.c':1 },
{ a:[ { b:[ { c:2 } ] } ] },
{ a:{ $elemMatch:{ b:{ $elemMatch:{ c:{ $gte:1, $in:[2] } } } } } });
// Two nested $elemMatch expressions.
checkElemMatch( { 'a.d.e':1, 'a.b.c':1 },
{ a:[ { b:[ { c:1 } ], d:[ { e:1 } ] } ] },
{ a:{ $elemMatch:{ d:{ $elemMatch:{ e:{ $lte:1 } } },
b:{ $elemMatch:{ c:{ $gte:1 } } } } } });
// A non $elemMatch expression and a nested $elemMatch expression.
checkElemMatch( { 'a.x':1, 'a.b.c':1 },
{ a:[ { b:[ { c:1 } ], x:1 } ] },
{ 'a.x':1, a:{ $elemMatch:{ b:{ $elemMatch:{ c:{ $gte:1 } } } } } });
// $elemMatch is applied directly to a top level field.
checkElemMatch( { 'a.b.c':1 },
{ a:[ { b:[ { c:[ 1 ] } ] } ] },
{ a:{ $elemMatch:{ 'b.c':{ $elemMatch:{ $gte:1, $lte:1 } } } } });

View File

@ -1,175 +0,0 @@
// Matching behavior for $elemMatch applied to a top level element.
// SERVER-1264
// SERVER-4180
t = db.jstests_arrayfind8;
t.drop();
function debug( x ) {
if ( debuggingEnabled = false ) {
printjson( x );
}
}
/** Set index state for the test. */
function setIndexKey( key ) {
indexKey = key;
indexSpec = {};
indexSpec[ key ] = 1;
}
setIndexKey( 'a' );
function indexBounds( query ) {
debug( query );
debug( t.find( query ).hint( indexSpec ).explain() );
return t.find( query ).hint( indexSpec ).explain().indexBounds[ indexKey ];
}
/** Check that the query results match the documents in the 'expected' array. */
function assertResults( expected, query, context ) {
debug( query );
assert.eq( expected.length, t.count( query ), 'unexpected count in ' + context );
results = t.find( query ).toArray();
for( i in results ) {
found = false;
for( j in expected ) {
if ( friendlyEqual( expected[ j ], results[ i ].a ) ) {
found = true;
}
}
assert( found, 'unexpected result ' + results[ i ] + ' in ' + context );
}
}
/**
* Check matching for different query types.
* @param bothMatch - document matched by both standardQuery and elemMatchQuery
* @param elemMatch - document matched by elemMatchQuery but not standardQuery
* @param notElemMatch - document matched by standardQuery but not elemMatchQuery
*/
function checkMatch( bothMatch, elemMatch, nonElemMatch, standardQuery, elemMatchQuery, context ) {
function mayPush( arr, elt ) {
if ( elt ) {
arr.push( elt );
}
}
expectedStandardQueryResults = [];
mayPush( expectedStandardQueryResults, bothMatch );
mayPush( expectedStandardQueryResults, nonElemMatch );
assertResults( expectedStandardQueryResults, standardQuery, context + ' standard query' );
expectedElemMatchQueryResults = [];
mayPush( expectedElemMatchQueryResults, bothMatch );
mayPush( expectedElemMatchQueryResults, elemMatch );
assertResults( expectedElemMatchQueryResults, elemMatchQuery, context + ' elemMatch query' );
}
/**
* Check matching and for different query types.
* @param subQuery - part of a query, to be provided as is for a standard query and within a
* $elemMatch clause for a $elemMatch query
* @param bothMatch - document matched by both standardQuery and elemMatchQuery
* @param elemMatch - document matched by elemMatchQuery but not standardQuery
* @param notElemMatch - document matched by standardQuery but not elemMatchQuery
* @param additionalConstraints - additional query parameters not generated from @param subQuery
*/
function checkQuery( subQuery, bothMatch, elemMatch, nonElemMatch,
additionalConstraints ) {
t.drop();
additionalConstraints = additionalConstraints || {};
// Construct standard and elemMatch queries from subQuery.
firstSubQueryKey = Object.keySet( subQuery )[ 0 ];
if ( firstSubQueryKey[ 0 ] == '$' ) {
standardQuery = { $and:[ { a:subQuery }, additionalConstraints ] };
}
else {
// If the subQuery contains a field rather than operators, append to the 'a' field.
modifiedSubQuery = {};
modifiedSubQuery[ 'a.' + firstSubQueryKey ] = subQuery[ firstSubQueryKey ];
standardQuery = { $and:[ modifiedSubQuery, additionalConstraints ] };
}
elemMatchQuery = { $and:[ { a:{ $elemMatch:subQuery } }, additionalConstraints ] };
debug( elemMatchQuery );
function maySave( aValue ) {
if ( aValue ) {
debug( { a:aValue } );
t.save( { a:aValue } );
}
}
// Save all documents and check matching without indexes.
maySave( bothMatch );
maySave( elemMatch );
maySave( nonElemMatch );
checkMatch( bothMatch, elemMatch, nonElemMatch, standardQuery, elemMatchQuery, 'unindexed' );
// Check matching and index bounds for a single key index.
t.drop();
maySave( bothMatch );
maySave( elemMatch );
// The nonElemMatch document is not tested here, as it will often make the index multikey.
t.ensureIndex( indexSpec );
checkMatch( bothMatch, elemMatch, null, standardQuery, elemMatchQuery, 'single key index' );
// Check matching and index bounds for a multikey index.
// Now the nonElemMatch document is tested.
maySave( nonElemMatch );
// Force the index to be multikey.
t.save( { a:[ -1, -2 ] } );
t.save( { a:{ b:[ -1, -2 ] } } );
checkMatch( bothMatch, elemMatch, nonElemMatch, standardQuery, elemMatchQuery,
'multikey index' );
}
maxNumber = Infinity;
// Basic test.
checkQuery( { $gt:4 }, [ 5 ] );
// Multiple constraints within a $elemMatch clause.
checkQuery( { $gt:4, $lt:6 }, [ 5 ], null, [ 3, 7 ] );
checkQuery( { $gt:4, $not:{ $gte:6 } }, [ 5 ] );
checkQuery( { $gt:4, $not:{ $ne:6 } }, [ 6 ] );
checkQuery( { $gte:5, $lte:5 }, [ 5 ], null, [ 4, 6 ] );
checkQuery( { $in:[ 4, 6 ], $gt:5 }, [ 6 ], null, [ 4, 7 ] );
checkQuery( { $regex:'^a' }, [ 'a' ] );
// Some constraints within a $elemMatch clause and other constraints outside of it.
checkQuery( { $gt:4 }, [ 5 ], null, null, { a:{ $lt:6 } } );
checkQuery( { $gte:5 }, [ 5 ], null, null, { a:{ $lte:5 } } );
checkQuery( { $in:[ 4, 6 ] }, [ 6 ], null, null, { a:{ $gt:5 } } );
// Constraints in different $elemMatch clauses.
checkQuery( { $gt:4 }, [ 5 ], null, null, { a:{ $elemMatch:{ $lt:6 } } } );
checkQuery( { $gt:4 }, [ 3, 7 ], null, null, { a:{ $elemMatch:{ $lt:6 } } } );
checkQuery( { $gte:5 }, [ 5 ], null, null, { a:{ $elemMatch:{ $lte:5 } } } );
checkQuery( { $in:[ 4, 6 ] }, [ 6 ], null, null, { a:{ $elemMatch:{ $gt:5 } } } );
// TODO SERVER-1264
if ( 0 ) {
checkQuery( { $elemMatch:{ $in:[ 5 ] } }, null, [[ 5 ]], [ 5 ], null );
}
setIndexKey( 'a.b' );
checkQuery( { $elemMatch:{ b:{ $gte:1, $lte:1 } } }, null, [[ { b:1 } ]],
[ { b:1 } ], null );
checkQuery( { $elemMatch:{ b:{ $gte:1, $lte:1 } } }, null, [[ { b:[ 0, 2 ] } ]],
[ { b:[ 0, 2 ] } ], null );
// Constraints for a top level (SERVER-1264 style) $elemMatch nested within a non top level
// $elemMatch.
checkQuery( { b:{ $elemMatch:{ $gte:1, $lte:1 } } }, [ { b:[ 1 ] } ] );
checkQuery( { b:{ $elemMatch:{ $gte:1, $lte:4 } } }, [ { b:[ 1 ] } ] );
checkQuery( { b:{ $elemMatch:{ $gte:1, $lte:4 } } }, [ { b:[ 2 ] } ], null,
null, { 'a.b':{ $in:[ 2, 5 ] } } );
checkQuery( { b:{ $elemMatch:{ $in:[ 1, 2 ] }, $in:[ 2, 3 ] } },
[ { b:[ 2 ] } ], null, [ { b:[ 1 ] }, { b:[ 3 ] } ], null );

View File

@ -1,34 +0,0 @@
// Assorted $elemMatch behavior checks.
t = db.jstests_arrayfind9;
t.drop();
// Top level field $elemMatch:$not matching
t.save( { a:[ 1 ] } );
assert.eq( 1, t.count( { a:{ $elemMatch:{ $not:{ $ne:1 } } } } ) );
// Top level field object $elemMatch matching.
t.drop();
t.save( { a:[ {} ] } );
assert.eq( 1, t.count( { a:{ $elemMatch:{ $gte:{} } } } ) );
// Top level field array $elemMatch matching.
t.drop();
t.save( { a:[ [] ] } );
assert.eq( 1, t.count( { a:{ $elemMatch:{ $in:[ [] ] } } } ) );
// Matching by array index.
t.drop();
t.save( { a:[ [ 'x' ] ] } );
assert.eq( 1, t.count( { a:{ $elemMatch:{ '0':'x' } } } ) );
// Matching multiple values of a nested array.
t.drop();
t.save( { a:[ { b:[ 0, 2 ] } ] } );
t.ensureIndex( { a:1 } );
t.ensureIndex( { 'a.b':1 } );
plans = [ { $natural:1 }, { a:1 }, { 'a.b':1 } ];
for( i in plans ) {
p = plans[ i ];
assert.eq( 1, t.find( { a:{ $elemMatch:{ b:{ $gte:1, $lte:1 } } } } ).hint( p ).itcount() );
}

View File

@ -1,21 +0,0 @@
// Assorted $elemMatch matching behavior checks.
t = db.jstests_arrayfinda;
t.drop();
// $elemMatch only matches elements within arrays (a descriptive, not a normative test).
t.save( { a:[ { b:1 } ] } );
t.save( { a:{ b:1 } } );
function assertExpectedMatch( cursor ) {
assert.eq( [ { b:1 } ], cursor.next().a );
assert( !cursor.hasNext() );
}
assertExpectedMatch( t.find( { a:{ $elemMatch:{ b:{ $gte:1 } } } } ) );
assertExpectedMatch( t.find( { a:{ $elemMatch:{ b:1 } } } ) );
// $elemMatch is not used to perform key matching. SERVER-6001
t.ensureIndex( { a:1 } );
assertExpectedMatch( t.find( { a:{ $elemMatch:{ b:{ $gte:1 } } } } ).hint( { a:1 } ) );
assertExpectedMatch( t.find( { a:{ $elemMatch:{ b:1 } } } ).hint( { a:1 } ) );

View File

@ -64,9 +64,8 @@ assert.eq( 1000, tRO.count() , "B1" );
assert.eq( 1000, tRO.find().toArray().length , "B2" ); // make sure we have a getMore in play
assert.commandWorked( dbRO.runCommand( {ismaster:1} ) , "B3" );
assert( !dbRO.getLastError() , "B4" );
tRO.save( {} ); // fail
assert( dbRO.getLastError() , "B5: " + tojson( dbRO.getLastErrorObj() ) );
assert.writeError(tRO.save({}));
assert.eq( 1000, tRO.count() , "B6" );
assert.eq( 1000, tRO.group( p ).length , "C1" );

View File

@ -0,0 +1,42 @@
var baseName = "jstests_auth_auth_options";
load('jstests/libs/command_line/test_parsed_options.js');
jsTest.log("Testing \"auth\" command line option");
var expectedResult = {
"parsed" : {
"security" : {
"authorization" : "enabled"
}
}
};
testGetCmdLineOptsMongod({ auth : "" }, expectedResult);
jsTest.log("Testing \"noauth\" command line option");
expectedResult = {
"parsed" : {
"security" : {
"authorization" : "disabled"
}
}
};
testGetCmdLineOptsMongod({ noauth : "" }, expectedResult);
jsTest.log("Testing \"security.authorization\" config file option");
expectedResult = {
"parsed" : {
"config" : "jstests/libs/config_files/enable_auth.json",
"security" : {
"authorization" : "enabled"
}
}
};
testGetCmdLineOptsMongod({ config : "jstests/libs/config_files/enable_auth.json" }, expectedResult);
jsTest.log("Testing with no explicit object check setting");
expectedResult = {
"parsed" : { }
};
testGetCmdLineOptsMongod({}, expectedResult);
print(baseName + " succeeded.");

View File

@ -99,9 +99,8 @@ var CLUSTER_PERM = { killOp: 1, currentOp: 1, fsync_unlock: 1, killCursor: 1, pr
*
* @param shouldPass {Boolean} true means that the operation should succeed.
* @param opFunc {function()} a function object which contains the operation to perform.
* @param db {DB?} an optional parameter that will be used to call getLastError if present.
*/
var checkErr = function(shouldPass, opFunc, db) {
var checkErr = function(shouldPass, opFunc) {
var success = true;
var exception = null;
@ -112,17 +111,10 @@ var checkErr = function(shouldPass, opFunc, db) {
success = false;
}
var gle = null;
if (db != null) {
gle = db.getLastError();
success = success && (gle == null);
}
assert(success == shouldPass, 'expected shouldPass: ' + shouldPass +
', got: ' + success +
', op: ' + tojson(opFunc) +
', exception: ' + tojson(exception) +
', gle: ' + tojson(gle));
', exception: ' + tojson(exception));
};
/**
@ -138,16 +130,19 @@ var checkErr = function(shouldPass, opFunc, db) {
*/
var testOps = function(db, allowedActions) {
checkErr(allowedActions.hasOwnProperty('insert'), function() {
db.user.insert({ y: 1 });
}, db);
var res = db.user.insert({ y: 1 });
if (res.hasWriteError()) throw Error("insert failed: " + tojson(res.getRawResponse()));
});
checkErr(allowedActions.hasOwnProperty('update'), function() {
db.user.update({ y: 1 }, { z: 3 });
}, db);
var res = db.user.update({ y: 1 }, { z: 3 });
if (res.hasWriteError()) throw Error("update failed: " + tojson(res.getRawResponse()));
});
checkErr(allowedActions.hasOwnProperty('remove'), function() {
db.user.remove({ y: 1 });
}, db);
var res = db.user.remove({ y: 1 });
if (res.hasWriteError()) throw Error("remove failed: " + tojson(res.getRawResponse()));
});
checkErr(allowedActions.hasOwnProperty('query'), function() {
db.user.findOne({ y: 1 });
@ -174,16 +169,22 @@ var testOps = function(db, allowedActions) {
});
checkErr(allowedActions.hasOwnProperty('index_w'), function() {
db.user.ensureIndex({ x: 1 });
}, db);
var res = db.user.ensureIndex({ x: 1 });
if (res.code == 13) { // Unauthorized
throw 'unauthorized currentOp';
}
});
checkErr(allowedActions.hasOwnProperty('profile_r'), function() {
db.system.profile.findOne();
});
checkErr(allowedActions.hasOwnProperty('profile_w'), function() {
db.system.profile.insert({ x: 1 });
}, db);
var res = db.system.profile.insert({ x: 1 });
if (res.hasWriteError()) {
throw Error("profile insert failed: " + tojson(res.getRawResponse()));
}
});
checkErr(allowedActions.hasOwnProperty('user_r'), function() {
var result = db.runCommand({usersInfo: 1});
@ -194,8 +195,8 @@ var testOps = function(db, allowedActions) {
checkErr(allowedActions.hasOwnProperty('user_w'), function() {
db.createUser({user:'a', pwd: 'a', roles: jsTest.basicUserRoles});
db.dropUser('a');
}, db);
assert(db.dropUser('a'));
});
// Test for kill cursor
(function() {

View File

@ -3,32 +3,6 @@
// authentication.
//
// Regression test for SERVER-8144.
// Raises an exception if "status" is not a GetLastError object indicating success.
function assertGLEOK(status) {
assert(status.ok && status.err === null,
"Expected OK status object; found " + tojson(status));
}
// Raises an exception if "status" is not a GetLastError object indicating failure.
function assertGLENotOK(status) {
assert(status.ok && status.err !== null,
"Expected not-OK status object; found " + tojson(status));
}
// Asserts that inserting "obj" into "collection" succeeds.
function assertInsertSucceeds(collection, obj) {
collection.insert(obj);
assertGLEOK(collection.getDB().getLastErrorObj());
}
// Asserts that inserting "obj" into "collection" fails.
function assertInsertFails(collection, obj) {
collection.insert(obj);
assertGLENotOK(collection.getDB().getLastErrorObj());
}
var conn = MongoRunner.runMongod({ auth: "", smallfiles: "" });
var admin = conn.getDB("admin");
var test = conn.getDB("test");
@ -40,15 +14,15 @@ test.createUser({user: 'writer', pwd: 'a', roles: [ "readWrite" ]});
admin.logout();
// Nothing logged in, can neither read nor write.
assertInsertFails(test.docs, { value: 0 });
assert.writeError(test.docs.insert({ value: 0 }));
assert.throws(function() { test.foo.findOne() });
// Writer logged in, can read and write.
test.auth('writer', 'a');
assertInsertSucceeds(test.docs, { value: 1 });
assert.writeOK(test.docs.insert({ value: 1 }));
test.foo.findOne();
// Reader logged in, replacing writer, can only read.
test.auth('reader', 'a');
assertInsertFails(test.docs, { value: 2 });
assert.writeError(test.docs.insert({ value: 2 }));
test.foo.findOne();

View File

@ -2,11 +2,6 @@
// dropDups.
var conn = MongoRunner.runMongod({auth : ""});
function assertGLENotOK(status) {
assert(status.ok && status.err !== null,
"Expected not-OK status object; found " + tojson(status));
}
var adminDB = conn.getDB("admin");
var testDB = conn.getDB("test");
adminDB.createUser({user:'admin', pwd:'x', roles:['userAdminAnyDatabase']});
@ -17,11 +12,14 @@ assert.eq(3, adminDB.system.users.count());
adminDB.logout();
adminDB.auth('mallory', 'x');
adminDB.system.users.createIndex({haxx:1}, {unique:true, dropDups:true});
assertGLENotOK(adminDB.getLastErrorObj());
adminDB.exploit.system.indexes.insert({ns: "admin.system.users", key: { haxx: 1.0 }, name: "haxx_1",
unique: true, dropDups: true});
assertGLENotOK(testDB.getLastErrorObj());
var res = adminDB.system.users.createIndex({ haxx: 1 }, { unique: true, dropDups: true });
assert(!res.ok);
assert.eq(13, res.code); // unauthorized
assert.writeError(adminDB.exploit.system.indexes.insert({ ns: "admin.system.users",
key: { haxx: 1.0 },
name: "haxx_1",
unique: true,
dropDups: true }));
// Make sure that no indexes were built.
assert.eq(null,
adminDB.system.namespaces.findOne(
@ -32,4 +30,4 @@ adminDB.logout();
adminDB.auth('admin','x');
// Make sure that no users were actually dropped
assert.eq(3, adminDB.system.users.count());
assert.eq(3, adminDB.system.users.count());

View File

@ -12,7 +12,6 @@ var test = conn.getDB("test");
// insert a single document and add two test users
test.foo.insert({a:1});
test.getLastError();
assert.eq(1, test.foo.findOne().a);
test.createUser({user:'a', pwd: 'a', roles: jsTest.basicUserRoles});
test.createUser({user:'b', pwd: 'b', roles: jsTest.basicUserRoles});

View File

@ -493,6 +493,7 @@ var authCommandsLib = {
dbOwner: 1,
clusterMonitor: 1,
clusterAdmin: 1,
backup: 1,
root: 1,
__system: 1
},
@ -508,6 +509,7 @@ var authCommandsLib = {
dbAdminAnyDatabase: 1,
clusterMonitor: 1,
clusterAdmin: 1,
backup: 1,
root: 1,
__system: 1
},

View File

@ -21,16 +21,12 @@ var assertCannotRunCommands = function(mongo) {
var test = mongo.getDB("test");
assert.throws( function() { test.system.users.findOne(); });
test.foo.save({_id:0});
assert(test.getLastError());
assert.writeError(test.foo.save({ _id: 0 }));
assert.throws( function() { test.foo.findOne({_id:0}); });
test.foo.update({_id:0}, {$set:{x:20}});
assert(test.getLastError());
test.foo.remove({_id:0});
assert(test.getLastError());
assert.writeError(test.foo.update({ _id: 0 }, { $set: { x: 20 }}));
assert.writeError(test.foo.remove({ _id: 0 }));
assert.throws(function() {
test.foo.mapReduce(
@ -47,15 +43,10 @@ var assertCanRunCommands = function(mongo) {
// will throw on failure
test.system.users.findOne();
test.foo.save({_id: 0});
assert(test.getLastError() == null);
test.foo.update({_id: 0}, {$set:{x:20}});
assert(test.getLastError() == null);
test.foo.remove({_id: 0});
assert(test.getLastError() == null);
assert.writeOK(test.foo.save({ _id: 0 }));
assert.writeOK(test.foo.update({ _id: 0 }, { $set: { x: 20 }}));
assert.writeOK(test.foo.remove({ _id: 0 }));
test.foo.mapReduce(
function() { emit(1, 1); },
function(id, count) { return Array.sum(count); },

View File

@ -4,6 +4,11 @@
*/
var authzErrorCode = 13;
var hasAuthzError = function (result) {
assert(result.hasWriteError());
assert.eq(authzErrorCode, result.getWriteError().code);
};
var st = new ShardingTest({ shards: 2,
config: 3,
mongos: [{},
@ -28,15 +33,17 @@ st.s0.getDB('admin').createRole({role: 'myRole',
roles: [],
privileges: [{resource: {cluster: true},
actions: ['invalidateUserCache']}]});
st.s0.getDB('test').createUser({user: 'spencer',
pwd: 'pwd',
roles: ['read',
{role: 'myRole', db: 'admin'},
{role: 'userAdminAnyDatabase', db: 'admin'}]});
st.s0.getDB('admin').logout();
var db1 = st.s0.getDB('test');
db1.createUser({user: 'spencer', pwd: 'pwd', roles: ['read', {role: 'myRole', db: 'admin'}]});
db1.auth('spencer', 'pwd');
var db2 = st.s1.getDB('test');
db2.auth('spencer', 'pwd');
var db3 = st.s2.getDB('test');
db3.auth('spencer', 'pwd');
@ -53,31 +60,26 @@ db3.auth('spencer', 'pwd');
(function testGrantingPrivileges() {
jsTestLog("Testing propagation of granting privileges");
db1.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db1, authzErrorCode);
db2.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db2, authzErrorCode);
db3.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db3, authzErrorCode);
hasAuthzError(db1.foo.update({}, { $inc: { a: 1 }}));
hasAuthzError(db2.foo.update({}, { $inc: { a: 1 }}));
hasAuthzError(db3.foo.update({}, { $inc: { a: 1 }}));
assert.eq(1, db1.foo.findOne().a);
assert.eq(1, db2.foo.findOne().a);
assert.eq(1, db3.foo.findOne().a);
db1.getSiblingDB('admin').grantPrivilegesToRole("myRole",
[{resource: {db: 'test', collection: ''},
actions: ['update']}]);
// s0/db1 should update its cache instantly
db1.foo.update({}, {$inc: {a:1}});
assert.gleSuccess(db1);
assert.writeOK(db1.foo.update({}, { $inc: { a: 1 }}));
assert.eq(2, db1.foo.findOne().a);
// s1/db2 should update its cache in 30 seconds.
assert.soon(function() {
db2.foo.update({}, {$inc: {a:1}});
if (db2.getLastError()) {
var res = db2.foo.update({}, { $inc: { a: 1 }});
if (res.hasWriteError()) {
return false;
}
return db2.foo.findOne().a == 3;
@ -87,8 +89,7 @@ db3.auth('spencer', 'pwd');
// We manually invalidate the cache on s2/db3.
db3.adminCommand("invalidateUserCache");
db3.foo.update({}, {$inc: {a:1}});
assert.gleSuccess(db3);
assert.writeOK(db3.foo.update({}, { $inc: { a: 1 }}));
assert.eq(4, db3.foo.findOne().a);
})();
@ -101,53 +102,69 @@ db3.auth('spencer', 'pwd');
actions: ['update']}]);
// s0/db1 should update its cache instantly
db1.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db1, authzErrorCode);
hasAuthzError(db1.foo.update({}, { $inc: { a: 1 }}));
// s1/db2 should update its cache in 30 seconds.
assert.soon(function() {
db2.foo.update({}, {$inc: {a:1}});
return db2.getLastErrorObj().code == authzErrorCode;
var res = db2.foo.update({}, { $inc: { a: 1 }});
return res.hasWriteError() && res.getWriteError().code == authzErrorCode;
},
"Mongos did not update its user cache after 30 seconds",
31 * 1000); // Give an extra 1 second to avoid races
// We manually invalidate the cache on s1/db3.
db3.adminCommand("invalidateUserCache");
db3.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db3, authzErrorCode);
hasAuthzError(db3.foo.update({}, { $inc: { a: 1 }}));
})();
(function testModifyingUser() {
jsTestLog("Testing propagation modifications to a user, rather than to a role");
db1.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db1, authzErrorCode);
db2.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db2, authzErrorCode);
db3.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db3, authzErrorCode);
hasAuthzError(db1.foo.update({}, { $inc: { a: 1 }}));
hasAuthzError(db2.foo.update({}, { $inc: { a: 1 }}));
hasAuthzError(db3.foo.update({}, { $inc: { a: 1}}));
db1.getSiblingDB('test').grantRolesToUser("spencer", ['readWrite']);
// s0/db1 should update its cache instantly
db1.foo.update({}, {$inc: {a:1}});
assert.gleSuccess(db1);
assert.writeOK(db1.foo.update({}, { $inc: { a: 1 }}));
// s1/db2 should update its cache in 30 seconds.
assert.soon(function() {
db2.foo.update({}, {$inc: {a:1}});
return !db2.getLastError();
return !db2.foo.update({}, { $inc: { a: 1 }}).hasWriteError();
},
"Mongos did not update its user cache after 30 seconds",
31 * 1000); // Give an extra 1 second to avoid races
// We manually invalidate the cache on s1/db3.
db3.adminCommand("invalidateUserCache");
db3.foo.update({}, {$inc: {a:1}});
assert.gleSuccess(db3);
assert.writeOK(db3.foo.update({}, { $inc: { a: 1 }}));
})();
(function testConcurrentUserModification() {
jsTestLog("Testing having 2 mongoses modify the same user at the same time"); // SERVER-13850
assert.writeOK(db1.foo.update({}, { $inc: { a: 1 }}));
assert.writeOK(db3.foo.update({}, { $inc: { a: 1}}));
db1.getSiblingDB('test').revokeRolesFromUser("spencer", ['readWrite']);
// At this point db3 still thinks "spencer" has readWrite. Use it to add a different role
// and make sure it doesn't add back readWrite
hasAuthzError(db1.foo.update({}, { $inc: { a: 1 }}));
assert.writeOK(db3.foo.update({}, { $inc: { a: 1}}));
db3.getSiblingDB('test').grantRolesToUser("spencer", ['dbAdmin']);
hasAuthzError(db1.foo.update({}, { $inc: { a: 1 }}));
// modifying "spencer" should force db3 to update its cache entry for "spencer"
hasAuthzError(db3.foo.update({}, { $inc: { a: 1 }}));
// Make sure nothing changes from invalidating the cache
db1.adminCommand('invalidateUserCache');
db3.adminCommand('invalidateUserCache');
hasAuthzError(db1.foo.update({}, { $inc: { a: 1 }}));
hasAuthzError(db3.foo.update({}, { $inc: { a: 1 }}));
})();
(function testDroppingUser() {

View File

@ -236,8 +236,7 @@ slave = rt.start(false, mongoOptions, true);
var masterDB = master.getDB("admin");
// ensure that master/slave replication is up and running
masterDB.foo.save({});
masterDB.runCommand({getLastError: 1, w: 2, wtimeout: 5000});
masterDB.foo.save({}, { writeConcern: { w: 2, wtimeout: 5000 }});
masterDB.foo.drop();
authReplTest = AuthReplTest({

View File

@ -5,6 +5,10 @@
function runTest(conn) {
var authzErrorCode = 13;
var hasAuthzError = function(result) {
assert(result.hasWriteError());
assert.eq(authzErrorCode, result.getWriteError().code);
};
var userAdminConn = new Mongo(conn.host);
var testUserAdmin = userAdminConn.getDB('test');
@ -46,46 +50,36 @@ function runTest(conn) {
testUserAdmin.updateUser('testUser', {roles: [{role: 'adminRole', db: 'admin'}]});
assert.throws(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.commandWorked(db.adminCommand('connPoolSync'));
testUserAdmin.updateUser('testUser', {roles: ['testRole1']});
assert.doesNotThrow(function() {db.foo.findOne();});
assert.eq(0, db.foo.count());
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
testUserAdmin.updateUser('testUser', {roles: ['testRole2']});
assert.throws(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleSuccess(db);
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
assert.writeOK(db.foo.insert({ a: 1 }));
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
testUserAdmin.updateUser('testUser', {roles: ['testRole3']});
assert.doesNotThrow(function() {db.foo.findOne();});
assert.eq(1, db.foo.count());
db.foo.insert({a:1});
assert.gleSuccess(db);
assert.writeOK(db.foo.insert({ a: 1 }));
assert.eq(2, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.eq(1, db.foo.findOne().a);
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
testUserAdmin.updateUser('testUser', {roles: [{role: 'testRole4', db: 'test'}]});
assert.throws(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
})();
@ -95,10 +89,8 @@ function runTest(conn) {
testUserAdmin.updateRole('testRole4',
{roles: [{role: 'testRole2', db: 'test'}, "testRole2"]});
assert.throws(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleSuccess(db);
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
assert.writeOK(db.foo.insert({ a: 1 }));
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
testUserAdmin.updateRole('testRole4',
@ -106,22 +98,18 @@ function runTest(conn) {
actions: ['find']}]});
assert.doesNotThrow(function() {db.foo.findOne();});
assert.eq(3, db.foo.count());
db.foo.insert({a:1});
assert.gleSuccess(db);
assert.writeOK(db.foo.insert({ a: 1 }));
assert.eq(4, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.eq(1, db.foo.findOne().a);
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
testUserAdmin.updateRole('testRole4', {roles: []});
assert.doesNotThrow(function() {db.foo.findOne();});
assert.eq(4, db.foo.count());
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
assert.eq(4, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.eq(1, db.foo.findOne().a);
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
@ -129,11 +117,9 @@ function runTest(conn) {
adminUserAdmin.updateRole('adminRole', {roles: [{role: 'read', db: 'test'}]});
assert.doesNotThrow(function() {db.foo.findOne();});
assert.eq(4, db.foo.count());
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
assert.eq(4, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.eq(1, db.foo.findOne().a);
assert.commandWorked(db.adminCommand('connPoolSync'));
})();
@ -149,11 +135,9 @@ function runTest(conn) {
{role: 'testRole2', db: 'test'}]);
assert.doesNotThrow(function() {db.foo.findOne();});
assert.eq(4, db.foo.count());
db.foo.insert({a:1});
assert.gleSuccess(db);
assert.writeOK(db.foo.insert({ a: 1 }));
assert.eq(5, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, {$inc: {a:1}}, false, true));
assert.eq(1, db.foo.findOne().a);
assert.commandWorked(db.adminCommand('connPoolSync'));
assert.commandWorked(db.adminCommand('serverStatus'));
@ -167,10 +151,8 @@ function runTest(conn) {
{role: 'read', db: 'test'},
{role: 'testRole2', db: 'test'}]);
assert.throws(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.commandWorked(db.adminCommand('connPoolSync'));
assert.commandFailedWithCode(db.adminCommand('serverStatus'), authzErrorCode);
})();
@ -184,11 +166,9 @@ function runTest(conn) {
{resource: {db:"", collection: ""},
actions: ['find']}]);
assert.doesNotThrow(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
assert.eq(5, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.eq(1, db.foo.findOne().a);
assert.commandWorked(db.adminCommand('connPoolSync'));
assert.commandWorked(db.adminCommand('serverStatus'));
@ -200,11 +180,9 @@ function runTest(conn) {
{resource: {db: 'test', collection: 'foo'},
actions: ['find']}]);
assert.doesNotThrow(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleSuccess(db, authzErrorCode);
assert.writeOK(db.foo.insert({ a: 1 }));
assert.eq(6, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleSuccess(db);
assert.writeOK(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.eq(2, db.foo.findOne().a);
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
assert.commandFailedWithCode(db.adminCommand('serverStatus'), authzErrorCode);
@ -217,11 +195,9 @@ function runTest(conn) {
[{resource: {db: 'test', collection: ''},
actions: ['insert', 'update', 'find']}]);
assert.doesNotThrow(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleSuccess(db);
assert.writeOK(db.foo.insert({ a: 1 }));
assert.eq(7, db.foo.count());
db.foo.update({}, {$inc: {a:1}}, false, true);
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}, false, true));
assert.eq(2, db.foo.findOne().a);
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);
assert.commandFailedWithCode(db.adminCommand('serverStatus'), authzErrorCode);
@ -267,15 +243,13 @@ function runTest(conn) {
testUserAdmin.grantRolesToUser('testUser', ['testRole4'])
assert.doesNotThrow(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleSuccess(db, authzErrorCode);
assert.writeOK(db.foo.insert({ a: 1 }));
assert.eq(8, db.foo.count());
assert.commandWorked(testUserAdmin.runCommand({dropRole: 'testRole2'}));
assert.doesNotThrow(function() {db.foo.findOne();});
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
assert.eq(8, db.foo.count());
assert.eq(3, testUserAdmin.getRoles().length);

View File

@ -54,8 +54,7 @@ with_mongod( ['--noauth'], function setupTest( mongod ) {
somedb.createUser({user: 'frim', pwd: 'fram', roles: jsTest.basicUserRoles});
somedb.data.drop();
for (var i = 0; i < 10; ++i) {
somedb.data.insert( { val: i } );
assert ( ! somedb.getLastError() );
assert.writeOK(somedb.data.insert( { val: i } ));
}
admin.logout();
} );

View File

@ -5,6 +5,10 @@
function runTest(conn) {
var authzErrorCode = 13;
var hasAuthzError = function(result) {
assert(result.hasWriteError());
assert.eq(authzErrorCode, result.getWriteError().code);
};
conn.getDB('admin').createUser({user: 'admin', pwd: 'pwd', roles: ['root']});
conn.getDB('admin').auth('admin', 'pwd');
@ -37,15 +41,13 @@ function runTest(conn) {
// test CRUD
testDB.foo.insert({a:1});
assert.gleErrorCode(testDB, authzErrorCode);
hasAuthzError(testDB.foo.insert({ a: 1 }));
assert.throws(function() { testDB.foo.findOne()});
testUserAdmin.grantPrivilegesToRole('testRole1', [{resource: {db: 'test', collection: ''},
actions:['find']}]);
testDB.foo.insert({a:1});
assert.gleErrorCode(testDB, authzErrorCode);
hasAuthzError(testDB.foo.insert({ a: 1 }));
assert.doesNotThrow(function() { testDB.foo.findOne()});
assert.eq(0, testDB.foo.count());
assert.eq(0, testDB.foo.find().itcount());
@ -53,50 +55,40 @@ function runTest(conn) {
testUserAdmin.grantPrivilegesToRole('testRole1', [{resource: {db: 'test', collection: 'foo'},
actions:['insert']}]);
testDB.foo.insert({a:1});
assert.gleSuccess(testDB);
assert.writeOK(testDB.foo.insert({ a: 1 }));
assert.eq(1, testDB.foo.findOne().a)
assert.eq(1, testDB.foo.count());
assert.eq(1, testDB.foo.find().itcount());
testDB.foo.update({a:1}, {$inc: {a:1}});
assert.gleErrorCode(testDB, authzErrorCode);
hasAuthzError(testDB.foo.update({ a: 1 }, { $inc: { a: 1 }}));
assert.eq(1, testDB.foo.findOne().a)
testDB.bar.insert({a:1});
assert.gleErrorCode(testDB, authzErrorCode);
hasAuthzError(testDB.bar.insert({ a: 1 }));
assert.eq(0, testDB.bar.count());
adminUserAdmin.grantPrivilegesToRole('adminRole', [{resource: {db: '', collection: 'foo'},
actions:['update']}]);
testDB.foo.update({a:1}, {$inc: {a:1}});
assert.gleSuccess(testDB);
assert.writeOK(testDB.foo.update({ a: 1 }, { $inc: { a: 1 }}));
assert.eq(2, testDB.foo.findOne().a)
testDB.foo.update({b:1}, {$inc: {b:1}}, true); // upsert
assert.gleSuccess(testDB);
assert.writeOK(testDB.foo.update({ b: 1 }, { $inc: { b: 1 }}, true)); // upsert
assert.eq(2, testDB.foo.count());
assert.eq(2, testDB.foo.findOne({b: {$exists: true}}).b);
testDB.foo.remove({b:2});
assert.gleErrorCode(testDB, authzErrorCode);
hasAuthzError(testDB.foo.remove({ b: 2 }));
assert.eq(2, testDB.foo.count());
adminUserAdmin.grantPrivilegesToRole('adminRole', [{resource: {db: '', collection: ''},
actions:['remove']}]);
testDB.foo.remove({b:2});
assert.gleSuccess(testDB);
assert.writeOK(testDB.foo.remove({ b: 2 }));
assert.eq(1, testDB.foo.count());
// Test revoking privileges
testUserAdmin.revokePrivilegesFromRole('testRole1', [{resource: {db: 'test', collection: 'foo'},
actions:['insert']}]);
testDB.foo.insert({a:1});
assert.gleErrorCode(testDB, authzErrorCode);
hasAuthzError(testDB.foo.insert({ a: 1 }));
assert.eq(1, testDB.foo.count());
testDB.foo.update({a:2}, {$inc: {a:1}});
assert.gleSuccess(testDB);
assert.writeOK(testDB.foo.update({ a: 2 }, { $inc: { a: 1 }}));
assert.eq(3, testDB.foo.findOne({a: {$exists: true}}).a);
testDB.foo.update({c:1}, {$inc: {c:1}}, true); // upsert should fail
assert.gleErrorCode(testDB, authzErrorCode);
hasAuthzError(testDB.foo.update({ c: 1 }, { $inc: { c: 1 }}, true)); // upsert should fail
assert.eq(1, testDB.foo.count());

View File

@ -129,7 +129,7 @@ rstest.nodes.forEach(function (node) {
// Verify that dropping roles propagates.
rstest.getMaster().getDB("db1").dropRole("r2", { w: 2});
rstest.nodes.forEach(function (node) {
assert.throws(function() { node.getDB("db1").getRole("r2") }, [], node);
assert.eq(null, node.getDB("db1").getRole("r2"));
var role = node.getDB("db1").getRole("r3");
assert.eq(1, role.roles.length, node);
assertListContainsRole(role.roles, {role: "r1", db: "db1"}, node);

View File

@ -5,6 +5,10 @@
function runTest(conn) {
var authzErrorCode = 13;
var hasAuthzError = function(result) {
assert(result.hasWriteError());
assert.eq(authzErrorCode, result.getWriteError().code);
};
conn.getDB('admin').createUser({user: 'admin', pwd: 'pwd', roles: ['root']});
conn.getDB('admin').auth('admin', 'pwd');
@ -49,16 +53,14 @@ function runTest(conn) {
var user = testUserAdmin.getUser('spencer');
assert.eq(10028, user.customData.zipCode);
assert(db.auth('spencer', 'pwd'));
db.foo.insert({a:1});
assert.gleSuccess(db);
assert.writeOK(db.foo.insert({ a: 1 }));
assert.eq(1, db.foo.findOne().a);
assert.doesNotThrow(function() {db.getRole('testRole')});
assert.commandWorked(db.adminCommand('connPoolSync'));
db.logout();
assert(db.auth('andy', 'pwd'));
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
assert.throws(function() { db.foo.findOne();});
assert.throws(function() {db.getRole('testRole')});
})();
@ -76,8 +78,7 @@ function runTest(conn) {
roles: ["read", "testRole"]});
var user = testUserAdmin.getUser('spencer');
assert.eq(10036, user.customData.zipCode);
db.foo.insert({a:1});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.insert({ a: 1 }));
assert.eq(1, db.foo.findOne().a);
assert.eq(1, db.foo.count());
assert.doesNotThrow(function() {db.getRole('testRole')});
@ -85,8 +86,7 @@ function runTest(conn) {
testUserAdmin.updateUser('spencer', {roles: ["readWrite",
{role: 'adminRole', db:'admin'}]});
db.foo.update({}, {$inc: {a:1}});
assert.gleSuccess(db);
assert.writeOK(db.foo.update({}, { $inc: { a: 1 }}));
assert.eq(2, db.foo.findOne().a);
assert.eq(1, db.foo.count());
assert.throws(function() {db.getRole('testRole')});
@ -107,8 +107,7 @@ function runTest(conn) {
'readWrite']);
assert.commandWorked(db.runCommand({collMod: 'foo', usePowerOf2Sizes: true}));
db.foo.update({}, {$inc: {a:1}});
assert.gleSuccess(db);
assert.writeOK(db.foo.update({}, { $inc: { a: 1 }}));
assert.eq(3, db.foo.findOne().a);
assert.eq(1, db.foo.count());
assert.doesNotThrow(function() {db.getRole('testRole')});
@ -124,8 +123,7 @@ function runTest(conn) {
"testRole"]);
assert.commandWorked(db.runCommand({collMod: 'foo', usePowerOf2Sizes: true}));
db.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}));
assert.throws(function() { db.foo.findOne();});
assert.throws(function() {db.getRole('testRole')});
assert.commandWorked(db.adminCommand('connPoolSync'));
@ -133,8 +131,7 @@ function runTest(conn) {
testUserAdmin.revokeRolesFromUser('spencer', [{role: 'adminRole', db: 'admin'}]);
db.foo.update({}, {$inc: {a:1}});
assert.gleErrorCode(db, authzErrorCode);
hasAuthzError(db.foo.update({}, { $inc: { a: 1 }}));
assert.throws(function() { db.foo.findOne();});
assert.throws(function() {db.getRole('testRole')});
assert.commandFailedWithCode(db.adminCommand('connPoolSync'), authzErrorCode);

View File

@ -1,54 +0,0 @@
var mydb = db.getSiblingDB('auth1_db');
mydb.dropAllUsers();
pass = "a" + Math.random();
//print( "password [" + pass + "]" );
mydb.createUser({user: "eliot" ,pwd: pass, roles: jsTest.basicUserRoles});
assert( mydb.auth( "eliot" , pass ) , "auth failed" );
assert( ! mydb.auth( "eliot" , pass + "a" ) , "auth should have failed" );
pass2 = "b" + Math.random();
mydb.changeUserPassword("eliot", pass2);
assert( ! mydb.auth( "eliot" , pass ) , "failed to change password failed" );
assert( mydb.auth( "eliot" , pass2 ) , "new password didn't take" );
assert( mydb.auth( "eliot" , pass2 ) , "what?" );
mydb.dropUser( "eliot" );
assert( ! mydb.auth( "eliot" , pass2 ) , "didn't drop user" );
var a = mydb.getMongo().getDB( "admin" );
a.dropAllUsers();
pass = "c" + Math.random();
a.createUser({user: "super", pwd: pass, roles: jsTest.adminUserRoles});
assert( a.auth( "super" , pass ) , "auth failed" );
assert( !a.auth( "super" , pass + "a" ) , "auth should have failed" );
mydb.dropAllUsers();
pass = "a" + Math.random();
mydb.createUser({user: "eliot" , pwd: pass, roles: jsTest.basicUserRoles});
assert.commandFailed( mydb.runCommand( { authenticate: 1, user: "eliot", nonce: "foo", key: "bar" } ) );
// check sanity check SERVER-3003
var before = a.system.users.count({db: mydb.getName()});
assert.throws( function(){
mydb.createUser({ user: "" , pwd: "abc", roles: jsTest.basicUserRoles});
} , null , "C1" )
assert.throws( function(){
mydb.createUser({ user: "abc" , pwd: "", roles: jsTest.basicUserRoles});
} , null , "C2" )
var after = a.system.users.count({db: mydb.getName()});
assert( before > 0 , "C3" )
assert.eq( before , after , "C4" )
// Clean up after ourselves so other tests using authentication don't get messed up.
mydb.dropAllUsers()

View File

@ -1,9 +0,0 @@
// just make sure logout doesn't break anything
// SERVER-724
db.runCommand({logout : 1});
x = db.runCommand({logout : 1});
assert.eq( 1 , x.ok , "A" )
x = db.logout();
assert.eq( 1 , x.ok , "B" )

View File

@ -1,19 +0,0 @@
a = db.getSisterDB( "copydb2-test-a" );
b = db.getSisterDB( "copydb2-test-b" );
a.dropDatabase();
b.dropDatabase();
a.dropAllUsers();
b.dropAllUsers();
a.foo.save( { a : 1 } );
a.createUser({user: "chevy" , pwd: "chase", roles: jsTest.basicUserRoles});
assert.eq( 1 , a.foo.count() , "A" );
assert.eq( 0 , b.foo.count() , "B" );
// SERVER-727
a.copyDatabase( a._name , b._name, "" , "chevy" , "chase" );
assert.eq( 1 , a.foo.count() , "C" );
assert.eq( 1 , b.foo.count() , "D" );

View File

@ -1,11 +0,0 @@
f = db.jstests_autoid;
f.drop();
f.save( {z:1} );
a = f.findOne( {z:1} );
f.update( {z:1}, {z:2} );
b = f.findOne( {z:2} );
assert.eq( a._id.str, b._id.str );
c = f.update( {z:2}, {z:"abcdefgabcdefgabcdefg"} );
c = f.findOne( {} );
assert.eq( a._id.str, c._id.str );

View File

@ -1,11 +0,0 @@
// SERVER-5826 ensure you can't build an index with a non-existent plugin
t = db.bad_index_plugin;
assert.eq(t.ensureIndex({good: 1}), undefined);
assert.eq(t.getIndexes().length, 2); // good + _id
err = t.ensureIndex({bad: 'bad'});
assert.neq(err, undefined);
assert(err.code >= 0);
assert.eq(t.getIndexes().length, 2); // good + _id (no bad)

View File

@ -1,21 +0,0 @@
t = db.getCollection( "basic1" );
t.drop();
o = { a : 1 };
t.save( o );
assert.eq( 1 , t.findOne().a , "first" );
assert( o._id , "now had id" );
assert( o._id.str , "id not a real id" );
o.a = 2;
t.save( o );
assert.eq( 2 , t.findOne().a , "second" );
assert(t.validate().valid);
// not a very good test of currentOp, but tests that it at least
// is sort of there:
assert( db.currentOp().inprog != null );

View File

@ -1,16 +0,0 @@
t = db.getCollection( "basic2" );
t.drop();
o = { n : 2 };
t.save( o );
assert.eq( 1 , t.find().count() );
assert.eq( 2 , t.find( o._id ).toArray()[0].n );
assert.eq( 2 , t.find( o._id , { n : 1 } ).toArray()[0].n );
t.remove( o._id );
assert.eq( 0 , t.find().count() );
assert(t.validate().valid);

View File

@ -1,45 +0,0 @@
// Tests that "." cannot be in field names
t = db.getCollection( "foo_basic3" );
t.drop()
//more diagnostics on bad save, if exception fails
doBadSave = function(param) {
print("doing save with " + tojson(param))
t.save(param);
// Should not get here.
printjson(db.getLastErrorObj());
}
//more diagnostics on bad save, if exception fails
doBadUpdate = function(query, update) {
print("doing update with " + tojson(query) + " " + tojson(update))
t.update(query, update);
// Should not get here.
printjson(db.getLastErrorObj());
}
assert.throws(doBadSave, [{"a.b":5}], ". in names aren't allowed doesn't work");
assert.throws(doBadSave,
[{ "x" : { "a.b" : 5 } }],
". in embedded names aren't allowed doesn't work");
// following tests make sure update keys are checked
t.save({"a": 0,"b": 1})
assert.throws(doBadUpdate, [{a:0}, { "b.b" : 1 }],
"must deny '.' in key of update");
// upsert with embedded doc
assert.throws(doBadUpdate, [{a:10}, { c: {"b.b" : 1 }}],
"must deny embedded '.' in key of update");
// if it is a modifier, it should still go through
t.update({"a": 0}, {$set: { "c.c": 1}})
t.update({"a": 0}, {$inc: { "c.c": 1}})
// edge cases
assert.throws(doBadUpdate, [{a:0}, { "":{"b.b" : 1} }],
"must deny '' embedded '.' in key of update");
t.update({"a": 0}, {})

View File

@ -1,12 +0,0 @@
t = db.getCollection( "basic4" );
t.drop();
t.save( { a : 1 , b : 1.0 } );
assert( t.findOne() );
assert( t.findOne( { a : 1 } ) );
assert( t.findOne( { a : 1.0 } ) );
assert( t.findOne( { b : 1 } ) );
assert( t.findOne( { b : 1.0 } ) );
assert( ! t.findOne( { b : 2.0 } ) );

View File

@ -1,6 +0,0 @@
t = db.getCollection( "basic5" );
t.drop();
t.save( { a : 1 , b : [ 1 , 2 , 3 ] } );
assert.eq( 3 , t.findOne().b.length );

View File

@ -1,8 +0,0 @@
t = db.basic6;
t.findOne();
t.a.findOne();
assert.eq( "test.basic6" , t.toString() );
assert.eq( "test.basic6.a" , t.a.toString() );

View File

@ -1,11 +0,0 @@
t = db.basic7;
t.drop();
t.save( { a : 1 } )
t.ensureIndex( { a : 1 } );
assert.eq( t.find().toArray()[0].a , 1 );
assert.eq( t.find().arrayAccess(0).a , 1 );
assert.eq( t.find()[0].a , 1 );

View File

@ -1,11 +0,0 @@
t = db.basic8;
t.drop();
t.save( { a : 1 } );
o = t.findOne();
o.b = 2;
t.save( o );
assert.eq( 1 , t.find().count() , "A" );
assert.eq( 2 , t.findOne().b , "B" );

View File

@ -1,19 +0,0 @@
// Tests that $<prefix> field names are not allowed, but you can use a $ anywhere else.
t = db.getCollection( "foo_basic9" );
t.drop()
// more diagnostics on bad save, if exception fails
doBadSave = function(param) {
print("doing save with " + tojson(param))
t.save(param);
// Should not get here.
printjson(db.getLastErrorObj());
}
t.save({foo$foo:5});
t.save({foo$:5});
assert.throws(doBadSave, [{$foo:5}], "key names aren't allowed to start with $ doesn't work");
assert.throws(doBadSave,
[{x:{$foo:5}}],
"embedded key names aren't allowed to start with $ doesn't work");

View File

@ -1,33 +0,0 @@
t = db.basica;
t.drop();
t.save( { a : 1 , b : [ { x : 2 , y : 2 } , { x : 3 , y : 3 } ] } );
x = t.findOne();
x.b["0"].x = 4;
x.b["0"].z = 4;
x.b[0].m = 9;
x.b[0]["asd"] = 11;
x.a = 2;
x.z = 11;
tojson( x );
t.save( x );
assert.eq( tojson( x ) , tojson( t.findOne() ) , "FIRST" );
// -----
t.drop();
t.save( { a : 1 , b : [ { x : 2 , y : 2 } , { x : 3 , y : 3 } ] } );
x = t.findOne();
x.b["0"].z = 4;
//printjson( x );
t.save( x );
assert.eq( tojson( x ) , tojson( t.findOne() ) , "SECOND" );

Some files were not shown because too many files have changed in this diff Show More