debian/0000775000000000000000000000000012314750460007172 5ustar debian/mongodb-server.mongodb.init0000664000000000000000000001620012306036552014433 0ustar #!/bin/sh # # init.d script with LSB support. # # Copyright (c) 2007 Javier Fernandez-Sanguino # # This is free software; you may redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, # or (at your option) any later version. # # This is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License with # the Debian operating system, in /usr/share/common-licenses/GPL; if # not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA # ### BEGIN INIT INFO # Provides: mongodb # Required-Start: $network $local_fs $remote_fs # Required-Stop: $network $local_fs $remote_fs # Should-Start: $named # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: An object/document-oriented database # Description: 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: # . # * 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) # * Auto-sharding for cloud-level scalability (Q209) # . # This package is build with V8 JavaScript engine. # . # High performance, scalability, and reasonable depth of # functionality are the goals for the project. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/mongod DESC=database # Default defaults. Can be overridden by the /etc/default/$NAME NAME=mongodb CONF=/etc/mongodb.conf RUNDIR=/var/run/mongodb PIDFILE=$RUNDIR/$NAME.pid ENABLE_MONGODB=yes # Include mongodb defaults if available if [ -f /etc/default/$NAME ] ; then . /etc/default/$NAME fi if test ! -x $DAEMON; then echo "Could not find $DAEMON" exit 0 fi if test "x$ENABLE_MONGODB" != "xyes"; then exit 0 fi . /lib/lsb/init-functions STARTTIME=1 DIETIME=10 # Time to wait for the server to die, in seconds # If this value is set too low you might not # let some servers to die gracefully and # 'restart' will not work DAEMONUSER=${DAEMONUSER:-mongodb} DAEMON_OPTS=${DAEMON_OPTS:-"--unixSocketPrefix=$RUNDIR --config $CONF run"} set -e running_pid() { # Check if a given process pid's cmdline matches a given name pid=$1 name=$2 [ -z "$pid" ] && return 1 [ ! -d /proc/$pid ] && return 1 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` # Is this the expected server [ "$cmd" != "$name" ] && return 1 return 0 } running() { # Check if the process is running looking at /proc # (works for all users) # No pidfile, probably no daemon present [ ! -f "$PIDFILE" ] && return 1 pid=`cat $PIDFILE` running_pid $pid $DAEMON || return 1 return 0 } start_server() { test -e "$RUNDIR" || install -m 755 -o mongodb -g mongodb -d "$RUNDIR" # Start the process using the wrapper start-stop-daemon --background --start --quiet --pidfile $PIDFILE \ --make-pidfile --chuid $DAEMONUSER \ --exec $DAEMON -- $DAEMON_OPTS errcode=$? return $errcode } stop_server() { # Stop the process using the wrapper start-stop-daemon --stop --quiet --pidfile $PIDFILE \ --user $DAEMONUSER \ --exec $DAEMON errcode=$? return $errcode } force_stop() { # Force the process to die killing it manually [ ! -e "$PIDFILE" ] && return if running ; then kill -15 $pid # Is it really dead? sleep "$DIETIME"s if running ; then kill -9 $pid sleep "$DIETIME"s if running ; then echo "Cannot kill $NAME (pid=$pid)!" exit 1 fi fi fi rm -f $PIDFILE } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" # Check if it's running first if running ; then log_progress_msg "apparently already running" log_end_msg 0 exit 0 fi if start_server ; then # NOTE: Some servers might die some time after they start, # this code will detect this issue if STARTTIME is set # to a reasonable value [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time if running ; then # It's ok, the server started and is running log_end_msg 0 else # It is not running after we did start log_end_msg 1 fi else # Either we could not start it log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" if running ; then # Only stop the server if we see it running errcode=0 stop_server || errcode=$? log_end_msg $errcode else # If it's not running don't do anything log_progress_msg "apparently not running" log_end_msg 0 exit 0 fi ;; force-stop) # First try to stop gracefully the program $0 stop if running; then # If it's still running try to kill it more forcefully log_daemon_msg "Stopping (force) $DESC" "$NAME" errcode=0 force_stop || errcode=$? log_end_msg $errcode fi ;; restart|force-reload) log_daemon_msg "Restarting $DESC" "$NAME" errcode=0 stop_server || errcode=$? # Wait some sensible amount, some server need this [ -n "$DIETIME" ] && sleep $DIETIME start_server || errcode=$? [ -n "$STARTTIME" ] && sleep $STARTTIME running || errcode=$? log_end_msg $errcode ;; status) log_daemon_msg "Checking status of $DESC" "$NAME" if running ; then log_progress_msg "running" log_end_msg 0 else log_progress_msg "apparently not running" log_end_msg 1 exit 1 fi ;; # MongoDB can't reload its configuration. reload) log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" log_warning_msg "cannot re-read the config file (use restart)." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0 debian/mongodb-server.install0000664000000000000000000000011412306036552013507 0ustar debian/mongodb.conf etc debian/tmp/usr/bin/mongod debian/tmp/usr/bin/mongos debian/mongodb-clients.lintian-overrides0000664000000000000000000000057012306036552015640 0ustar # There is a bug in grotty when table spans across page border mongodb-clients: manpage-has-errors-from-man usr/share/man/man1/mongo.1.gz ():4509: character above first line discarded mongodb-clients: manpage-has-errors-from-man usr/share/man/man1/mongostat.1.gz ():3658: character above first line discarded debian/mongodb-server.lintian-overrides0000664000000000000000000000033212306036552015501 0ustar # There is a bug in grotty when table spans across page border mongodb-server: manpage-has-errors-from-man usr/share/man/man1/mongod.1.gz ():2840: character above first line discarded debian/tests/0000775000000000000000000000000012306053653010335 5ustar debian/tests/mongod0000664000000000000000000000015012306036552011536 0ustar #!/bin/bash set -e echo -n "Checking for running mongod process: " pgrep mongod 2>/dev/null echo "OK" debian/tests/control0000664000000000000000000000011212306036552011731 0ustar Tests: mongod mongo-client Depends: mongodb-server, mongodb-clients, nmap debian/tests/mongo-client0000664000000000000000000000064212306036552012654 0ustar #!/bin/bash set -e TIMEOUT=120 echo -n "Waiting for mongod to start: " count=0 while (! nc -z 127.0.0.1 27017); do echo -n "." count=$((count+1)) if test $count -gt $TIMEOUT; then echo "mongod failed to start?" pgrep mongod exit 1 fi sleep 1 done echo "mongod listening" echo "Performing basic test using mongo client: " mongo --verbose jstests/basic1.js 2>&1 echo "OK" debian/mongodb-server.mongodb.upstart0000664000000000000000000000111112306040340015153 0ustar # vim: set ft=upstart ts=4 et: description "MongoDB" start on runlevel [2345] stop on runlevel [!2345] limit nofile 64000 64000 kill timeout 300 # wait 300s between SIGTERM and SIGKILL. pre-start script mkdir -p /var/lib/mongodb/ mkdir -p /var/log/mongodb/ end script script ENABLE_MONGODB="yes" if [ -f /etc/default/mongodb ]; then . /etc/default/mongodb fi if [ "x$ENABLE_MONGODB" = "xyes" ]; then exec start-stop-daemon --start --quiet --chuid mongodb \ --exec /usr/bin/mongod -- --config /etc/mongodb.conf fi end script debian/copyright0000664000000000000000000002504112306036552011127 0ustar This package was debianized by Kristina Chodorow and Antonin Kral It was downloaded from http://www.mongodb.org Upstream Authors: Eliot Horowitz Dwight Merriman Aaron Staple Michael Dirolf Kristina Chodorow Debian Maintainers: Antonin Kral Roberto C. Sanchez Copyright: Copyright (c) 2009 10gen License: Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0 On a Debian system, the license can be found at /usr/share/common-licenses/Apache-2.0 AGPL 3.0 http://www.fsf.org/licensing/licenses/agpl-3.0.html The Debian packaging is Copyright (c) 2009, 2010, Kristina Chodorow , Antonin Kral and Roberto C. Sanchez . It is licensed under the AGPL, but will be relicensed under Apache License 2.0. Some parts of MongoDB are licensed under the AGPL, others are Apache 2.0. Please see individual source files for details. MongoDB uses third-party libraries or other resources that may be distributed under licenses different than the MongoDB software. Feel free to open a bug report if you find component which has different license and is not covered here. Your use of the source code for the these components is subject to the terms and conditions of the following licenses. License Notice for SCONS ------------------------ /usr/share/common-licenses/GPL-2 SCONS and it components, generated code and utilities (e.g. gch.py) are licensed under GPL 2. License Notice for Boost ------------------------ http://www.boost.org/LICENSE_1_0.txt Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License Notice for V8 --------------------- http://code.google.com/p/v8/source/browse/trunk/LICENSE This license applies to all parts of V8 that are not externally maintained libraries. The externally maintained libraries used by V8 are: - Jscre, located under third_party/jscre. This code is copyrighted by the University of Cambridge and Apple Inc. and released under a 2-clause BSD license. - Dtoa, located under third_party/dtoa. This code is copyrighted by David M. Gay and released under an MIT license. - Strongtalk assembler, the basis of the files assembler-arm-inl.h, assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, assembler-ia32.cc, assembler-ia32.h, assembler.cc and assembler.h. This code is copyrighted by Sun Microsystems Inc. and released under a 3-clause BSD license. These libraries have their own licenses; we recommend you read them, as their terms may differ from the terms below. Copyright 2006-2008, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License Notice for PCRE ----------------------- http://www.pcre.org/licence.txt PCRE LICENCE ------------ PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Release 7 of PCRE is distributed under the terms of the "BSD" licence, as specified below. The documentation for PCRE, supplied in the "doc" directory, is distributed under the same terms as the software itself. The basic library functions are written in C and are freestanding. Also included in the distribution is a set of C++ wrapper functions. THE BASIC LIBRARY FUNCTIONS --------------------------- Written by: Philip Hazel Email local part: ph10 Email domain: cam.ac.uk University of Cambridge Computing Service, Cambridge, England. Copyright (c) 1997-2008 University of Cambridge All rights reserved. THE C++ WRAPPER FUNCTIONS ------------------------- Contributed by: Google Inc. Copyright (c) 2007-2008, Google Inc. All rights reserved. THE "BSD" LICENCE ----------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the name of Google Inc. nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License for md5 implementation ------------------------------ md5 algorithm implementation (utils/md5.[ch]) is licensed under modified BSD License. Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com License exception for linking MongoDB with OpenSSL -------------------------------------------------- MongoDB have granted the following license exception for the AGPL licensed components of MongoDB to support use with OpenSSL; AGPL and OpenSSL are not compatible licenses without this exception. As a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file and distribute linked combinations including the program with the OpenSSL library. You must comply with the GNU Affero General Public License in all respects for all of the code used other than as permitted herein. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it here. See the following upstream commit for full details: https://github.com/mongodb/mongo/commit/5a282cc42c381c6103b1c903c745c64ea6af9f5b debian/mongodb.conf0000664000000000000000000000413712306036552011473 0ustar # mongodb.conf # Where to store the data. dbpath=/var/lib/mongodb #where to log logpath=/var/log/mongodb/mongodb.log logappend=true bind_ip = 127.0.0.1 #port = 27017 # Enable journaling, http://www.mongodb.org/display/DOCS/Journaling journal=true # Enables periodic logging of CPU utilization and I/O wait #cpu = true # Turn on/off security. Off is currently the default #noauth = true #auth = true # Verbose logging output. #verbose = true # Inspect all client data for validity on receipt (useful for # developing drivers) #objcheck = true # Enable db quota management #quota = true # Set oplogging level where n is # 0=off (default) # 1=W # 2=R # 3=both # 7=W+some reads #oplog = 0 # Diagnostic/debugging option #nocursors = true # Ignore query hints #nohints = true # Disable the HTTP interface (Defaults to localhost:27018). #nohttpinterface = true # Turns off server-side scripting. This will result in greatly limited # functionality #noscripting = true # Turns off table scans. Any query that would do a table scan fails. #notablescan = true # Disable data file preallocation. #noprealloc = true # Specify .ns file size for new databases. # nssize = # Accout token for Mongo monitoring server. #mms-token = # Server name for Mongo monitoring server. #mms-name = # Ping interval for Mongo monitoring server. #mms-interval = # Replication Options # in replicated mongo databases, specify here whether this is a slave or master #slave = true #source = master.example.com # Slave only: specify a single database to replicate #only = master.example.com # or #master = true #source = slave.example.com # Address of a server to pair with. #pairwith = # Address of arbiter server. #arbiter = # Automatically resync if slave data is stale #autoresync # Custom size for replication operation log. #oplogSize = # Size limit for in-memory storage of op ids. #opIdMem = # SSL options # Enable SSL on normal ports #sslOnNormalPorts = true # SSL Key file and password #sslPEMKeyFile = /etc/ssl/mongodb.pem #sslPEMKeyPassword = pass debian/mongodb-clients.manpages0000664000000000000000000000052412306036552013774 0ustar debian/manpages/bsondump.1 debian/manpages/mongo.1 debian/manpages/mongodump.1 debian/manpages/mongoexport.1 debian/manpages/mongofiles.1 debian/manpages/mongoimport.1 debian/manpages/mongooplog.1 debian/manpages/mongoperf.1 debian/manpages/mongorestore.1 debian/manpages/mongosniff.1 debian/manpages/mongostat.1 debian/manpages/mongotop.1 debian/source/0000775000000000000000000000000012306053653010473 5ustar debian/source/format0000664000000000000000000000001412306036552011700 0ustar 3.0 (quilt) debian/mongodb-dev.dirs0000664000000000000000000000002412306036552012252 0ustar usr/include usr/lib debian/changelog0000664000000000000000000005001212314750457011050 0ustar mongodb (1:2.4.9-1ubuntu2) trusty; urgency=medium * d/p/0099-Pagesize-hacks.patch: Apply some hacks for non-4k pages. -- Adam Conrad Thu, 27 Mar 2014 01:20:08 -0600 mongodb (1:2.4.9-1ubuntu1) trusty; urgency=medium * Enable ppc64el build (LP: #1288633): - d/control: Add ppc64el to target architectures. - d/control: Use google-perftools on ppc64el. - d/p/0004-Support-ppc64el-builds.patch: Detect ppc64 as 64 bit platform. * Enable javascript-less arm64 build (LP: #1288634): - d/control: Add arm64 to target architectures, ignore libv8-dev for arm64. - d/p/0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch: Add support for arm64. - d/p/0001-Add-option-to-disable-javascript.patch: Add option to disable javascript engine. - d/rules: Disable scripting and drop mongo binary for arm64. * General non-x86 enablement: - d/p/0005-ARM-support-for-ASM-operations-in-MongoDB.patch: dropped in preference to upstream accepted patch from Robie Basak: - d/p/0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch: Use gcc provided atomic operations for non-Intel archs. * d/mongodb-server.mongodb.upstart: Bump nofile limit to 64000 (LP: #1283007). * d/control: Use google-perftools on armhf. -- James Page Thu, 06 Mar 2014 11:08:10 +0000 mongodb (1:2.4.9-1) unstable; urgency=medium * New upstream release. -- Laszlo Boszormenyi (GCS) Thu, 16 Jan 2014 12:44:01 +0000 mongodb (1:2.4.8-2) unstable; urgency=low * Sync with Ubuntu (closes: #730203). [ James Page ] * d/control: Enable armhf across all binary packages. * d/control,tests: Add DEP-8 tests. * d/p/0011-Use-a-signed-char-to-store-BSONType-enumerations.patch: Fixup build failure on ARM due to missing signed'ness of char cast. [ Rogério Brito ] * debian/control: Add more details to the long descriptions. -- Laszlo Boszormenyi (GCS) Fri, 22 Nov 2013 18:09:38 +0100 mongodb (1:2.4.8-1) unstable; urgency=low * New upstream release. * Add armhf architecture to the supported build systems. * Build with SSL enabled. * Update Standards-Version to 3.9.5 . [ Viktar Vauchkevich ] * Add systemd support (closes: #717321). [ James Page ] * d/copyright: Add details of MongoDB AGPL+OpenSSL license exception to support continued use of MongoDB with SSL support enabled (LP: #1175028). * d/mongodb.conf: Add example SSL configuration options. * d/mongodb-server.mongodb.upstart: Add upstart configuration. -- Laszlo Boszormenyi (GCS) Wed, 13 Nov 2013 07:55:06 +0000 mongodb (1:2.4.6-1) unstable; urgency=low * New upstream release. * Change package priority to optional. * Update Standards-Version to 3.9.4 . * Fix typedefs FTBFS with 0009-ignore-unused-local-typedefs.patch (closes: #701324), thanks to James Page * Fix integer comparision FTBFS with 0010-fix-integer-signs.patch (closes: #724100). * Rework packaging with short debhelper format instead of cdbs. * Compile with system V8 library. * Move packaging to Debian servers. * New maintainer (closes: #725854). -- Laszlo Boszormenyi (GCS) Tue, 24 Sep 2013 12:31:11 +0000 mongodb (1:2.4.5-1) unstable; urgency=critical * new upstream release https://jira.mongodb.org/browse/SERVER/fixforversion/12519 * CVE-2013-4650 - fix allows remote authenticated users to obtain internal system privileges (Closes: #715007). * CVE-2013-2132 and CVE-2013-4142 - Remotely triggered segmentation fault in Javascript engine (Closes: #717173). * Force use of TIME_UTC_ boost macro (Closes: #710639). * Use gcc and g++ 4.7 to avoid #701324 which is still pending. * Remove build directory (Closes: #715015). * Currently uses embedded V8 as the one in Debian is too old. -- Antonin Kral Wed, 17 Jul 2013 16:23:43 +0200 mongodb (1:2.4.3-1) unstable; urgency=low [ Jeff Epler ] * [2a15682] kfreebsd does not have tcmalloc * [b66002a] enable building packages on kfreebsd [ Rogério Brito ] * [44bbe5b] debian/control: Make mongodb arch all, instead of arch-specific. * [50e5786] debian/patches: Add preparation for kFreeBSD. * [164ec3b] debian/patches: Regenerate the patches from patch queue. Thanks to Pino Toscano and Jeff Epler (Closes: #703061) * [b960dca] debian/control: Remove libpcre3 from build-depends. * [8e53a7e] debian/copyright: Wrap long lines. * [f33d197] debian/control: Make the mongodb metapackage arch-dependent. * [1771ce7] debian/control: Set priority of packages to extra. * [198f7bb] debian/control: Mark libgoogle-perftools-dev as linux-amd64 linux-i386. * [02826cb] debian/patches: Take some patches for ARM from Ubuntu. * [bfa912d] debian/patches: Remove patch that substituted install with installs. [ Antonin Kral ] * [a618d03] new upstream release https://jira.mongodb.org/browse/SERVER/fixforversion/12426 -- Antonin Kral Wed, 24 Apr 2013 21:10:53 +0200 mongodb (1:2.4.2-1) unstable; urgency=low * new upstream release https://jira.mongodb.org/browse/SERVER/fixforversion/12405 -- Antonin Kral Wed, 17 Apr 2013 21:52:17 +0200 mongodb (1:2.4.1-3) unstable; urgency=low [ Rogério Brito ] * [ab6f6c3] debian/control: Retouch the package descriptions. * [d44e3d4] d/{control,copyright}: Normalize fields with wrap-and-sort. * [8287fd7] d/control: Add more build-deps to avoid use of embedded libraries. * [17fcb2c] d/control: Add more build-deps for compliant packages. * [e239a9f] debian/rules: Use as many system libraries as possible. * [3326d9e] Add a small note to README.Debian to document differences from upstream. * [df784a3] debian/README.source: Be more descriptive on the workflow. * [d85c075] debian/patches: Add patch to use the system libstemmer library. * [3f4c7e7] gitignore: Ignore quilt's state directory. * [12d4a68] Add README.Debian file to mongodb-server. (Closes: #705054) * [99320d3] debian/control: Augment descriptions of packages. * [5d10dbf] Add bsondump to the clients package. (Closes: #679018) * [434c5da] Add newer/more clients to the mongodb-clients package. * [68bd0b9] Remove unused lintian overrides. (Closes: #705060) [ Antonin Kral ] * [04a8783] SERVER-5307 New man pages generated from docs by samk@10gen * [2237007] lintian override for grotty bug -- Antonin Kral Wed, 17 Apr 2013 11:58:03 +0200 mongodb (1:2.4.1-2) unstable; urgency=low * set version of mongodb-server in mongodb metapackage (Closes:#703580) * [d041ec8] fixes parsing of parallel option, (Closes:#702797) * [348ff81] update watch file, thanks Bart, (Closes:#688781) -- Antonin Kral Sun, 24 Mar 2013 19:13:21 +0100 mongodb (1:2.4.1-1) unstable; urgency=low * New upstream release 2.4.1 https://jira.mongodb.org/browse/SERVER/fixforversion/12402 -- Antonin Kral Sat, 23 Mar 2013 13:41:03 +0100 mongodb (1:2.2.2-1) unstable; urgency=low * New upstream release 2.2.2 https://jira.mongodb.org/browse/SERVER/fixforversion/11886 -- Antonin Kral Wed, 28 Nov 2012 09:34:58 +0100 mongodb (1:2.2.0-1) unstable; urgency=low * New upstream release 2.2.0 http://jira.mongodb.org/browse/SERVER/fixforversion/11496 http://blog.mongodb.org/post/30451575525/mongodb-2-2-released -- Antonin Kral Wed, 29 Aug 2012 21:06:20 +0200 mongodb (1:2.0.7-1) unstable; urgency=low * New upstream release 2.0.7 https://jira.mongodb.org/browse/SERVER/fixforversion/11201 -- Antonin Kral Fri, 10 Aug 2012 14:58:19 +0200 mongodb (1:2.0.6-1) unstable; urgency=low * New upstream release 2.0.6 https://jira.mongodb.org/browse/SERVER/fixforversion/11165 -- Antonin Kral Tue, 05 Jun 2012 19:52:28 +0200 mongodb (1:2.0.5-2) unstable; urgency=low * Removed mongodb-server as dependency of mongodb-dev (Closes:#672634) -- Antonin Kral Sun, 27 May 2012 13:00:38 +0200 mongodb (1:2.0.5-1) unstable; urgency=low * New upstream release 2.0.5 https://jira.mongodb.org/browse/SERVER/fixforversion/11137 -- Antonin Kral Thu, 10 May 2012 07:05:43 +0200 mongodb (1:2.0.4-1) unstable; urgency=low * New upstream release 2.0.4 https://jira.mongodb.org/browse/SERVER/fixforversion/11107 -- Antonin Kral Fri, 30 Mar 2012 21:41:35 +0200 mongodb (1:2.0.3-2) unstable; urgency=low * Enable journaling by default (Closes:#664080) -- Antonin Kral Thu, 15 Mar 2012 16:48:06 +0100 mongodb (1:2.0.3-1) unstable; urgency=low * New upstream release 2.0.3 https://jira.mongodb.org/browse/SERVER/fixforversion/11001 * added debian/copat * added Replaces clause from Ubuntu patch -- Antonin Kral Thu, 01 Mar 2012 14:14:34 +0100 mongodb (1:2.0.2-5) unstable; urgency=low * Allow parallel build, patch courtesy of Andre Ferraz (Closes:#646759) -- Antonin Kral Thu, 16 Feb 2012 10:25:06 +0100 mongodb (1:2.0.2-4) unstable; urgency=low * Move socket from /tmp to /var/run/mongodb (Closes: #658177) -- Antonin Kral Wed, 01 Feb 2012 14:53:12 +0100 mongodb (1:2.0.2-3) unstable; urgency=low * Describe jsonArray option for mongoimport in manpage (Closes: 656444) -- Antonin Kral Thu, 19 Jan 2012 14:11:14 +0100 mongodb (1:2.0.2-2) unstable; urgency=low * added logrotate for mongodb-server (Closes: #656065) -- Antonin Kral Mon, 16 Jan 2012 10:46:36 +0100 mongodb (1:2.0.2-1) unstable; urgency=low * New upstream release 2.0.2 https://jira.mongodb.org/browse/SERVER/fixforversion/10991 -- Antonin Kral Thu, 15 Dec 2011 11:26:24 +0100 mongodb (1:2.0.0-2) unstable; urgency=low * need to reupload package to get it build on i386 which failed because of cdbs error -- Antonin Kral Sun, 25 Sep 2011 20:22:08 +0200 mongodb (1:2.0.0-1) unstable; urgency=low * New upstream release 2.0.0 (Closes: #641646) http://blog.mongodb.org/post/10126837729/mongodb-2-0-released * proper Spider Monkey is embedded (Closes: #637370, #572870, #631054) * currently linking against system libpcre3 -- Antonin Kral Wed, 14 Sep 2011 17:09:16 +0200 mongodb (1:1.8.3-1) unstable; urgency=low * New upstream release 1.8.3 https://jira.mongodb.org/browse/SERVER/fixforversion/10390 -- Antonin Kral Tue, 23 Aug 2011 08:48:57 +0200 mongodb (1:1.8.2-2) unstable; urgency=low * [2e1c3ff] (Closes: #625401) ignore unused-but-set-{variable,parameter} * [0e9611d] (Closes: #572870, #631054) switch to v8 as javascript engine * [bbf5935] (Closes: #634484) use dbpath and logpath from config file not forcing in init.d * [bf8d466] update description * [cbe2d99] Imported Upstream version 1.8.3 -- Antonin Kral Tue, 23 Aug 2011 08:48:17 +0200 mongodb (1:1.8.2-1) unstable; urgency=low * New upstream release 1.8.2 https://jira.mongodb.org/browse/SERVER/fixforversion/10263 -- Antonin Kral Sat, 18 Jun 2011 21:25:25 +0200 mongodb (1:1.8.1-2) unstable; urgency=low * Depend on libboost 1.46 -- Antonin Kral Tue, 31 May 2011 13:19:30 +0200 mongodb (1:1.8.1-1) unstable; urgency=low * Upstream 1.8.1 http://jira.mongodb.org/browse/SERVER/fixforversion/10260 -- Antonin Kral Thu, 07 Apr 2011 07:38:17 +0200 mongodb (1:1.8.0-2) unstable; urgency=low * return empty TERM if not set (Closes: #620910) -- Antonin Kral Tue, 05 Apr 2011 10:21:26 +0200 mongodb (1:1.8.0-1) unstable; urgency=low * Upstream 1.8.0 http://blog.mongodb.org/post/3903149313/mongodb-1-8-released -- Antonin Kral Thu, 17 Mar 2011 00:10:27 +0100 mongodb (1:1.6.5-3) unstable; urgency=low [ Jérémy Lal ] * Switch to cdbs, cleanup. * Use debian/gbp.conf to filter out debian/* files from upstream tarball. [ Antonin Kral ] * [ab13e0b] added Vcs-* to debian/control * [eb35fc8] added Jeremy as co-maintainer -- Antonin Kral Thu, 24 Feb 2011 08:36:10 +0100 mongodb (1:1.6.5-2) unstable; urgency=low * Clean up Boost packages in Build-Depends * Add libboost-dev to mongodb-dev Depends line -- Roberto C. Sanchez Mon, 24 Jan 2011 20:17:29 -0500 mongodb (1:1.6.5-1) unstable; urgency=low * Upstream 1.6.5 http://jira.mongodb.org/browse/SERVER/fixforversion/10207 -- Antonin Kral Fri, 10 Dec 2010 13:10:04 +0100 mongodb (1:1.6.3-1) unstable; urgency=low * [0ad0c09] Imported Upstream version 1.6.3 http://jira.mongodb.org/browse/SERVER/fixforversion/10190 * replica_sets slavedelay, rollback * sharding optimization for larger than ram data sets -- Antonin Kral Fri, 24 Sep 2010 19:04:25 +0200 mongodb (1:1.6.2-1) unstable; urgency=low * [90ef97f] Imported Upstream version 1.6.2 http://jira.mongodb.org/browse/SERVER/fixforversion/10187 -- Antonin Kral Thu, 02 Sep 2010 17:41:00 +0200 mongodb (1:1.6.1-1) unstable; urgency=low * [3b9581e] Imported Upstream version 1.6.1 http://jira.mongodb.org/browse/SERVER/fixforversion/10183 * [5866afb] updated watch file fot 1.6.x version -- Antonin Kral Wed, 18 Aug 2010 09:33:36 +0200 mongodb (1:1.6.0-1) unstable; urgency=low * [7645618] Imported Upstream version 1.6.0 http://jira.mongodb.org/browse/SERVER/fixforversion/10182 * [7ae74af] install libs to /usr/lib not /usr/lib64 * [45c6766] use prefix and smokedbprefix -- Antonin Kral Wed, 11 Aug 2010 13:19:25 +0200 mongodb (1:1.4.4-3) unstable; urgency=low * [1576744] added libreadline-dev to build-deps (Closes: #589163) -- Antonin Kral Thu, 15 Jul 2010 21:41:49 +0200 mongodb (1:1.4.4-2) unstable; urgency=low * [3bd69dc] install libs to /usr/lib not /usr/lib64 (Closes: #588557) -- Antonin Kral Fri, 09 Jul 2010 21:26:05 +0200 mongodb (1:1.4.4-1) unstable; urgency=low * [5c6a221] Imported Upstream version 1.4.4 * upstream change log is at http://jira.mongodb.org/browse/SERVER/fixforversion/10166 * [68c73c3] removed not needed files from upstream * [c1546df] debian policy to 3.9.0 -- Antonin Kral Wed, 30 Jun 2010 09:32:45 +0200 mongodb (1:1.4.3-2) unstable; urgency=low * [64bca3c] Updated copyright information as requested by Richard Kreuter -- Antonin Kral Mon, 07 Jun 2010 08:27:36 +0200 mongodb (1:1.4.3-1) unstable; urgency=low * New upstream version 1.4.3 * Change log 1.4.3 http://jira.mongodb.org/browse/SERVER/fixforversion/10156 * added log to dirs to fix piuparts error -- Antonin Kral Sun, 30 May 2010 10:14:05 +0200 mongodb (1:1.4.2-3) unstable; urgency=low * Clean up debian/copyright * Fix various typos * Generally make lintian happy * Change section of mongodb-dev from database to libdevel (now matches archive override file) * Properly express copyrights * Fix typo in manpage * Remove unused lintian override. * Install usr/lib64 instead of usr/lib in mongodb-dev * updated watch file to actually work and report available stable releases -- Antonin Kral Tue, 11 May 2010 22:21:13 +0200 mongodb (1:1.4.2-2) unstable; urgency=low * Split single binary package into mongodb-server, mongodb-dev, and mongodb-clients. -- Roberto C. Sanchez Thu, 06 May 2010 21:20:52 -0400 mongodb (1:1.4.2-1) unstable; urgency=low * [4770a09] New upstream version 1.4.2 * changelog for 1.4.1 http://jira.mongodb.org/browse/SERVER/fixforversion/10144 * changelog for 1.4.2 http://jira.mongodb.org/browse/SERVER/fixforversion/10155 -- Antonin Kral Tue, 27 Apr 2010 19:55:04 +0200 mongodb (1:1.4.0-2) unstable; urgency=low * added Roberto C. Sanchez as co-maintainer -- Antonin Kral Fri, 09 Apr 2010 21:40:49 +0200 mongodb (1:1.4.0-1) unstable; urgency=low * [0ca01a9] Imported Upstream version 1.4.0 * [76c18ea] removed not needed files for debian * [c1578d9] merged changes from debianization from 1.2.4 * full upstream changelog http://jira.mongodb.org/secure/IssueNavigator.jspa?requestId=10080 * upstream release notes http://www.mongodb.org/display/DOCS/1.4+Release+Notes -- Antonin Kral Thu, 25 Mar 2010 19:44:59 +0100 mongodb (1:1.2.4-1) unstable; urgency=low * [c3803a1] Imported Upstream version 1.2.4 * [ab4e0c8] removal of unnecessary files for Debian from upstream source * changelog for upstream at http://jira.mongodb.org/browse/SERVER/fixforversion/10130 -- Antonin Kral Wed, 17 Mar 2010 10:18:01 +0100 mongodb (1:1.2.2-4) unstable; urgency=low * ensure removal of upstart script as upload of repacked source is failing -- Antonin Kral Wed, 10 Mar 2010 07:29:38 +0100 mongodb (1:1.2.2-3) unstable; urgency=low * [aced2f4] removed unnecessary dependency (Closes: #572873) * [ce78acd] Added call for tests to ensure correct build (Closes: #570106) -- Antonin Kral Sun, 07 Mar 2010 21:07:37 +0100 mongodb (1:1.2.2-2) unstable; urgency=low * [49232f8] removed upstart, it is buggy + not supported in Debian (Closes: #572812) -- Antonin Kral Sat, 06 Mar 2010 22:55:17 +0100 mongodb (1:1.2.2-1) unstable; urgency=low * this commit introduces stable version of MongoDB to Debian, hopefully to be included in upcoming stable (Closes: #570148) * [2fede57] Upstream release 1.2.2, based on commit fc3d3acafc253da085f7d0cdcd91059cc9bcd8e3 * [d21668d] versionString changed from "1.2.3-" to "1.2.2" * [5a8e160] removed debian/files * [26f3ec2] removed empty preinst * [5d12fec] removed unnecessary jars * [978f619] removed unused lib * [7157b84] Changed maintainer of the package * [0a939b5] mongo should build only on i386 and amd64 * [f3e7db5] generate list of manpages * [bcd0d12] database section is probably more appropriate * [7bec42f] clarification of licensing terms * [c74fd7d] bumped standards version * [357da67] merged the rest of debian changes from 1.3 -- Antonin Kral Wed, 17 Feb 2010 08:50:07 +0100 mongodb (1.3.1-3) unstable; urgency=low * [ff792f5] Reordered Build-Depends to enable automated with buildd (Closes: #570072) * [4d5a2c1] Added support of nostrip and debug DEB_BUILD_OPTIONS (Closes: #570077) * [cbc4e8b] Describe why is mongodb available for some architectures only (Closes: #570076) -- Antonin Kral Tue, 16 Feb 2010 21:59:56 +0100 mongodb (1.3.1-2) unstable; urgency=low * [efabc21] change order of build deps of xul-runner to fix sbuild (Closes: #569417) * [55e3c9b] added support for mongod config file * [88a7135] added README.Debian with note about bind_ip set to localhost -- Antonin Kral Fri, 12 Feb 2010 09:37:23 +0100 mongodb (1.3.1-1) unstable; urgency=low * Initial release (Closes: #523937) * [5cd4d87] rebuild original sources to remove debian/files * [4a84263] Removed empty preinst * [9698ffb] Changed maintainer of the package * [4486a47] mongo should build only on i386 and amd64 * [5842c04] no need for creating home-dir for mongo user * [f47e39e] Added missing manpages * [987cd73] generate list of manpages * [e3336d8] used more specific build-depeneds, thanks to Richard Kreuter * [ba8697c] removed unnecessary jars dir with its content * [91fe1cf] cover licensing terms of used components * [d59c02f] init.d cleanup * [78d712b] cover licensing terms of utils/md5.[ch] * [a696359] removed lib/ from upstream -- Antonin Kral Fri, 29 Jan 2010 19:48:45 +0100 debian/mongodb-server.mongodb.service0000664000000000000000000000030712306036552015131 0ustar [Unit] Description=An object/document-oriented database Documentation=man:mongod(1) [Service] User=mongodb ExecStart=/usr/bin/mongod --config /etc/mongodb.conf [Install] WantedBy=multi-user.target debian/mongodb-clients.install0000664000000000000000000000054012306036552013645 0ustar debian/tmp/usr/bin/bsondump debian/tmp/usr/bin/mongo debian/tmp/usr/bin/mongodump debian/tmp/usr/bin/mongoexport debian/tmp/usr/bin/mongofiles debian/tmp/usr/bin/mongoimport debian/tmp/usr/bin/mongooplog debian/tmp/usr/bin/mongoperf debian/tmp/usr/bin/mongorestore debian/tmp/usr/bin/mongosniff debian/tmp/usr/bin/mongostat debian/tmp/usr/bin/mongotop debian/compat0000664000000000000000000000000212306036552010370 0ustar 9 debian/mongodb-dev.install0000664000000000000000000000005212306036552012760 0ustar debian/tmp/usr/include debian/tmp/usr/lib debian/rules0000775000000000000000000000421712306046437010261 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_SCONS_OPTIONS := ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) DEB_SCONS_OPTIONS := --d=DEBUGBUILD endif ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) DEB_SCONS_OPTIONS := --d=DEBUGBUILD endif ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS))) PROCS=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) DEB_SCONS_OPTIONS += -j$(PROCS) endif HARDENING_OPTIONS = CC="$(CC)" CFLAGS="$(CFLAGS)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" COMMON_OPTIONS = --use-system-snappy --use-system-pcre \ --use-system-boost --use-system-v8 --ssl $(DEB_SCONS_OPTIONS) gperftools_archs = amd64 i386 armhf ppc64el ifneq (,$(filter $(DEB_HOST_ARCH), $(gperftools_archs))) COMMON_OPTIONS += --allocator=tcmalloc --use-system-tcmalloc else COMMON_OPTIONS += --allocator=system endif ifeq ($(DEB_HOST_ARCH), arm64) COMMON_OPTIONS += --disable-scripting endif DEB_SCONS_CLEAN = --directory="." $(HARDENING_OPTIONS) . --keep-going --clean \ $(COMMON_OPTIONS) DEB_SCONS_BUILD = --directory="." $(HARDENING_OPTIONS) all $(COMMON_OPTIONS) DEB_SCONS_CHECK = --smokedbprefix=$(CURDIR)/debian/tmp-test smoke \ $(COMMON_OPTIONS) DEB_SCONS_INSTALL = --directory="." $(HARDENING_OPTIONS) \ --prefix=$(CURDIR)/debian/tmp/usr install --full $(COMMON_OPTIONS) override_dh_clean: scons $(DEB_SCONS_CLEAN) find $(CURDIR)/ -name "*.pyc" -delete rm -rf $(CURDIR)/debian/tmp-test/ rm -rf $(CURDIR)/.scons/ rm -rf $(CURDIR)/build/ rm -f $(CURDIR)/failfile.smoke $(CURDIR)/smoke-last.json dh_clean override_dh_auto_build: scons $(DEB_SCONS_BUILD) override_dh_auto_test: scons $(DEB_SCONS_CHECK) override_dh_auto_install: scons $(DEB_SCONS_INSTALL) override_dh_installinit: dh_installinit -pmongodb-server --name=mongodb ifeq ($(DEB_HOST_ARCH), arm64) # mongo shell is broken without scripting so drop it from # the binary override_dh_install: dh_install rm -f $(CURDIR)/tmp/mongodb-clients/usr/bin/mongo endif %: dh $@ --parallel .PHONY: override_dh_clean override_dh_auto_build override_dh_auto_test \ override_dh_auto_install override_dh_installinit debian/mongodb-server.manpages0000664000000000000000000000006212306036552013636 0ustar debian/manpages/mongod.1 debian/manpages/mongos.1 debian/mongodb-server.dirs0000664000000000000000000000005412306036552013005 0ustar etc usr/bin var/lib/mongodb var/log/mongodb debian/control0000664000000000000000000001133612306040175010575 0ustar Source: mongodb Section: database Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) Uploaders: Jérémy Lal Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), libboost-date-time-dev, libboost-dev (>> 1.50), libboost-filesystem-dev, libboost-program-options-dev, libboost-thread-dev, libgoogle-perftools-dev [linux-amd64 linux-i386 armhf ppc64el], libpcap-dev, libpcre3-dev, libreadline-dev, libsnappy-dev, libstemmer-dev, libssl-dev, libv8-dev (>= 3.12) [!arm64], python-pymongo, scons Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/collab-maint/mongodb.git Vcs-Browser: http://anonscm.debian.org/git/collab-maint/mongodb.git Homepage: http://www.mongodb.org XS-Testsuite: autopkgtest Package: mongodb Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el arm64 Depends: mongodb-dev, mongodb-server (>= 1:2.4.1-2), ${misc:Depends}, ${shlibs:Depends} Description: object/document-oriented database (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: . * 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) * Auto-sharding for cloud-level scalability . High performance, scalability, and reasonable depth of functionality are the goals for the project. . This is a convenience metapackage that depends on all the mongodb parts: the server, the clients and the development files (headers and library). Package: mongodb-server Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el arm64 Depends: adduser, mongodb-clients, ${misc:Depends}, ${shlibs:Depends} Replaces: mongodb (<= 1:1.4.2-2) Description: object/document-oriented database (server package) 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: . * 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) * Auto-sharding for cloud-level scalability . High performance, scalability, and reasonable depth of functionality are the goals for the project. . This package contains the server itself (mongod) and the sharding server/load-balancer (mongos). Package: mongodb-clients Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el arm64 Depends: ${misc:Depends}, ${shlibs:Depends} Replaces: mongodb (<= 1:1.4.2-2) Description: object/document-oriented database (client apps) 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: . * 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) * Auto-sharding for cloud-level scalability . High performance, scalability, and reasonable depth of functionality are the goals for the project. . This package contains the standard administrative shell (mongo) and other utilities for administration or analysis of performance of the server. Package: mongodb-dev Section: libdevel Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el arm64 Depends: libboost-dev, ${misc:Depends} Suggests: mongodb-server Replaces: mongodb (<= 1:1.4.2-2) Description: object/document-oriented database (development) 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: . * 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) * Auto-sharding for cloud-level scalability . High performance, scalability, and reasonable depth of functionality are the goals for the project. . This package contains the development headers and libraries. debian/mongodb-clients.dirs0000664000000000000000000000001012306036552013130 0ustar usr/bin debian/README.source0000664000000000000000000000147612306036552011361 0ustar git-buildpackage ================ Use of the command `git-import-orig` from the git-buildpackage suite of scripts is highly encouraged, as it makes for an easier maintenance of the packaging. When importing new upstream versions, it is recommended to run: git-buildpackage --pristine-tar --uscan so that most of the tasks are automated. debian/gbp.conf =============== The `debian/*` files from the upstream tarball are filtered out (read: "mostly ignored") because of divergences that create conflicts that are difficult to merge. That being said, it is a good thing to manually check what upstream changed in their `debian` dir and adapt those changes to the Debian packaging, as they may have changed build dependencies or other assumptions. -- Rogério Brito , Fri, 12 Apr 2013 22:26:07 -0300 debian/mongodb-server.logrotate0000664000000000000000000000022712306036552014046 0ustar /var/log/mongodb/*.log { weekly rotate 10 copytruncate delaycompress compress notifempty missingok } debian/manpages/0000775000000000000000000000000012306053653010766 5ustar debian/manpages/mongos.10000664000000000000000000003024112306036552012351 0ustar .TH "MONGOS" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongos \- MongoDB Shard Utility . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp \fI\%mongos\fP for "MongoDB Shard," is a routing service for MongoDB shard configurations that processes queries from the application layer, and determines the location of this data in the \fIsharded cluster\fP, in order to complete these operations. From the perspective of the application, a \fI\%mongos\fP instance behaves identically to any other MongoDB instance. .IP Note Changed in version 2.1. .sp Some aggregation operations using the \fBaggregate\fP will cause \fI\%mongos\fP instances to require more CPU resources than in previous versions. This modified performance profile may dictate alternate architecture decisions if you use the \fIaggregation framework\fP extensively in a sharded environment. .RE .IP "See also" .sp \fB/sharding\fP and \fB/core/sharded\-clusters\fP. .RE .SH OPTIONS .INDENT 0.0 .TP .B mongos .UNINDENT .INDENT 0.0 .TP .B \-\-help, \-h Returns a basic help and usage text. .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fBmongod\fP daemon. .UNINDENT .INDENT 0.0 .TP .B \-\-config , \-f Specifies a configuration file, that you can use to specify runtime\-configurations. While the options are equivalent and accessible via the other command line arguments, the configuration file is the preferred method for runtime configuration of mongod. See the "\fB/reference/configuration\-options\fP" document for more information about these options. .sp Not all configuration options for \fBmongod\fP make sense in the context of \fI\%mongos\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose, \-v Increases the amount of internal reporting returned on standard output or in the log file specified by \fI\%--logpath\fP. Use the \fB\-v\fP form to control the level of verbosity by including the option multiple times, (e.g. \fB\-vvvvv\fP.) .UNINDENT .INDENT 0.0 .TP .B \-\-quiet Runs the \fI\%mongos\fP instance in a quiet mode that attempts to limit the amount of output. .UNINDENT .INDENT 0.0 .TP .B \-\-port Specifies a TCP port for the \fI\%mongos\fP to listen for client connections. By default \fI\%mongos\fP listens for connections on port 27017. .sp UNIX\-like systems require root access to access ports with numbers lower than 1024. .UNINDENT .INDENT 0.0 .TP .B \-\-bind_ip The IP address that the \fI\%mongos\fP process will bind to and listen for connections. By default \fI\%mongos\fP listens for connections on the localhost (i.e. \fB127.0.0.1\fP address.) You may attach \fI\%mongos\fP to any interface; however, if you attach \fI\%mongos\fP to a publicly accessible interface you must implement proper authentication or firewall restrictions to protect the integrity of your database. .UNINDENT .INDENT 0.0 .TP .B \-\-maxConns Specifies the maximum number of simultaneous connections that \fI\%mongos\fP will accept. This setting will have no effect if the value of this setting is higher than your operating system\(aqs configured maximum connection tracking threshold. .sp This is particularly useful for \fI\%mongos\fP if you have a client that creates a number of collections but allows them to timeout rather than close the collections. When you set \fBmaxConns\fP, ensure the value is slightly higher than the size of the connection pool or the total number of connections to prevent erroneous connection spikes from propagating to the members of a \fIshard\fP cluster. .IP Note You cannot set \fBmaxConns\fP to a value higher than \fI20000\fP. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-objcheck Forces the \fI\%mongos\fP to validate all requests from clients upon receipt to ensure that invalid objects are never inserted into the database. This option has a performance impact, and is not enabled by default. .UNINDENT .INDENT 0.0 .TP .B \-\-logpath Specify a path for the log file that will hold all diagnostic logging information. .sp Unless specified, \fI\%mongos\fP will output all log information to the standard output. Additionally, unless you also specify \fI\%--logappend\fP, the logfile will be overwritten when the process restarts. .UNINDENT .INDENT 0.0 .TP .B \-\-logappend Specify to ensure that \fI\%mongos\fP appends additional logging data to the end of the logfile rather than overwriting the content of the log when the process restarts. .UNINDENT .INDENT 0.0 .TP .B \-\-syslog New in version 2.1.0. .sp Sends all logging output to the host\(aqs \fIsyslog\fP system rather than to standard output or a log file as with \fI\%--logpath\fP. .IP Warning You cannot use \fI\%--syslog\fP with \fI\%--logpath\fP. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-pidfilepath Specify a file location to hold the "\fIPID\fP" or process ID of the \fI\%mongos\fP process. Useful for tracking the \fI\%mongos\fP process in combination with the \fI\%mongos --fork\fP option. .sp Without a specified \fI\%--pidfilepath\fP option, \fI\%mongos\fP creates no PID file. .UNINDENT .INDENT 0.0 .TP .B \-\-keyFile Specify the path to a key file to store authentication information. This option is only useful for the connection between \fI\%mongos\fP instances and components of the \fIsharded cluster\fP. .IP "See also" .sp \fIsharding\-security\fP .RE .UNINDENT .INDENT 0.0 .TP .B \-\-nounixsocket Disables listening on the UNIX socket. Without this option \fI\%mongos\fP creates a UNIX socket. .UNINDENT .INDENT 0.0 .TP .B \-\-unixSocketPrefix Specifies a path for the UNIX socket. Unless specified, \fI\%mongos\fP creates a socket in the \fB/tmp\fP path. .UNINDENT .INDENT 0.0 .TP .B \-\-fork Enables a \fIdaemon\fP mode for \fBmongod\fP which forces the process to the background. This is the normal mode of operation, in production and production\-like environments, but may \fInot\fP be desirable for testing. .UNINDENT .INDENT 0.0 .TP .B \-\-configdb ,<:port>, Set this option to specify a configuration database (i.e. \fIconfig database\fP) for the \fIsharded cluster\fP. You must specify either 1 configuration server or 3 configuration servers, in a comma separated list. .IP Note \fI\%mongos\fP instances read from the first \fIconfig server\fP in the list provided. All \fI\%mongos\fP instances \fBmust\fP specify the hosts to the \fI\%--configdb\fP setting in the same order. .sp If your configuration databases reside in more that one data center, order the hosts in the \fI\%--configdb\fP argument so that the config database that is closest to the majority of your \fI\%mongos\fP instances is first servers in the list. .RE .IP Warning Never remove a config server from the \fI\%--configdb\fP parameter, even if the config server or servers are not available, or offline. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-test This option is for internal testing use only, and runs unit tests without starting a \fI\%mongos\fP instance. .UNINDENT .INDENT 0.0 .TP .B \-\-upgrade This option updates the meta data format used by the \fIconfig database\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-chunkSize The value of the \fI\%--chunkSize\fP determines the size of each \fIchunk\fP, \fIin megabytes\fP, of data distributed around the \fIsharded cluster\fP. The default value is 64 megabytes, which is the ideal size for chunks in most deployments: larger chunk size can lead to uneven data distribution, smaller chunk size often leads to inefficient movement of chunks between nodes. However, in some circumstances it may be necessary to set a different chunk size. .sp This option \fIonly\fP sets the chunk size when initializing the cluster for the first time. If you modify the run\-time option later, the new value will have no effect. See the "\fIsharding\-balancing\-modify\-chunk\-size\fP" procedure if you need to change the chunk size on an existing sharded cluster. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support to allow clients to connect to \fI\%mongos\fP using IPv6 networks. MongoDB disables IPv6 support by default in \fBmongod\fP and all utilities. .UNINDENT .INDENT 0.0 .TP .B \-\-jsonp Permits \fIJSONP\fP access via an HTTP interface. Consider the security implications of allowing this activity before enabling this option. .UNINDENT .INDENT 0.0 .TP .B \-\-noscripting Disables the scripting engine. .UNINDENT .INDENT 0.0 .TP .B \-\-nohttpinterface New in version 2.1.2. .sp Disables the HTTP interface. .UNINDENT .INDENT 0.0 .TP .B \-\-localThreshold New in version 2.2. .sp \fI\%--localThreshold\fP affects the logic that \fI\%mongos\fP uses when selecting \fIreplica set\fP members to pass read operations to from clients. Specify a value to \fI\%--localThreshold\fP in milliseconds. The default value is \fB15\fP, which corresponds to the default value in all of the client \fBdrivers\fP. .sp When \fI\%mongos\fP receives a request that permits reads to \fIsecondary\fP members, the \fI\%mongos\fP will: .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 find the member of the set with the lowest ping time. .IP \(bu 2 construct a list of replica set members that is within a ping time of 15 milliseconds of the nearest suitable member of the set. .sp If you specify a value for \fI\%--localThreshold\fP, \fI\%mongos\fP will construct the list of replica members that are within the latency allowed by this value. .IP \(bu 2 The \fI\%mongos\fP will select a member to read from at random from this list. .UNINDENT .UNINDENT .UNINDENT .sp The ping time used for a set member compared by the \fI\%--localThreshold\fP setting is a moving average of recent ping times, calculated, at most, every 10 seconds. As a result, some queries may reach members above the threshold until the \fI\%mongos\fP recalculates the average. .sp See the \fIreplica\-set\-read\-preference\-behavior\-member\-selection\fP section of the \fIread preference\fP documentation for more information. .UNINDENT .INDENT 0.0 .TP .B \-\-noAutoSplit New in version 2.0.7. .sp \fI\%--noAutoSplit\fP prevents \fI\%mongos\fP from automatically inserting metadata splits in a \fIsharded collection\fP. If set on all \fI\%mongos\fP, this will prevent MongoDB from creating new chunks as the data in a collection grows. .sp Because any \fI\%mongos\fP in a cluster can create a split, to totally disable splitting in a cluster you must set \fI\%--noAutoSplit\fP on all \fI\%mongos\fP. .IP Warning With \fI\%--noAutoSplit\fP enabled, the data in your sharded cluster may become imbalanced over time. Enable with caution. .RE .UNINDENT .SS SSL Options .IP "See" .sp \fB/administration/ssl\fP for full documentation of MongoDB\(aqs support. .RE .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\-\-username\fP) credentials. .sp By default, \fI\%mongos\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongos\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongoimport.10000664000000000000000000003013312306036552013421 0ustar .TH "MONGOIMPORT" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongoimport \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp The \fI\%mongoimport\fP tool provides a route to import content from a JSON, CSV, or TSV export created by \fBmongoexport\fP, or potentially, another third\-party export tool. See the "\fB/administration/import\-export\fP" 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. .IP Note Do not use \fI\%mongoimport\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 "\fB/administration/backups\fP" for this kind of functionality. .RE .SH OPTIONS .INDENT 0.0 .TP .B mongoimport .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongoimport\fP program. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port>, \-h Specifies a resolvable hostname for the \fBmongod\fP to which you want to restore the database. By default \fI\%mongoimport\fP will attempt to connect to a MongoDB process ruining on the localhost port numbered \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. \fI\%mongoimport\fP will, given the seed of at least one connected set member, connect to primary node of that set. This option would resemble: .sp .nf .ft C \-\-host repl0/mongo0.example.net,mongo0.example.net:27018,mongo1.example.net,mongo2.example.net .ft P .fi .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, 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\%mongoimport --host\fP command. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongoimport\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongoimport\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. .IP Note SSL support in mongoimport is not compiled into the default distribution of MongoDB. See \fB/administration/ssl\fP for more information on SSL and MongoDB. .sp Additionally, mongoimport does not support connections to \fBmongod\fP instances that require client certificate validation. .RE .sp Allows \fI\%mongoimport\fP to connect to \fBmongod\fP instance over an SSL connection. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u Specifies a username to authenticate to the MongoDB instance, if your database requires authentication. Use in conjunction with the \fI\%mongoimport --password\fP option to supply a password. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%mongoimport --username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongoimport\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongoimport\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongoimport\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-dbpath Specifies the directory of the MongoDB data files. If used, the \fI\%--dbpath\fP option enables \fI\%mongoimport\fP to attach directly to local data files and insert the data without the \fBmongod\fP. To run with \fB\-\-dbpath\fP, \fI\%mongoimport\fP needs to lock access to the data directory: as a result, 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 \fI\%mongoimport\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. .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 relevant when specifying the \fI\%--dbpath\fP option. .UNINDENT .INDENT 0.0 .TP .B \-\-db , \-d Use the \fI\%--db\fP option to specify a database for \fI\%mongoimport\fP to restore data. If you do not specify a \fB\fP, \fI\%mongoimport\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, or to restore only some data in the specified backup. .UNINDENT .INDENT 0.0 .TP .B \-\-collection , \-c Use the \fI\%--collection\fP option to specify a collection for \fBmongorestore\fP to restore. If you do not specify a \fB\fP, \fI\%mongoimport\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. .UNINDENT .INDENT 0.0 .TP .B \-\-fields >, \-f Specify a comma seperatedlist 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 As an alternative to \fI\%--fields\fP the \fI\%--fieldFile\fP option allows you to specify a file (e.g. \fB\(ga\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. .UNINDENT .INDENT 0.0 .TP .B \-\-ignoreBlanks In \fIcsv\fP and \fItsv\fP exports, ignore empty fields. If not specified, \fI\%mongoimport\fP creates fields without values in imported documents. .UNINDENT .INDENT 0.0 .TP .B \-\-type 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. .UNINDENT .INDENT 0.0 .TP .B \-\-file Specify the location of a file containing the data to import. \fI\%mongoimport\fP will read data from standard input (e.g. "stdin.") if you do not specify a file. .UNINDENT .INDENT 0.0 .TP .B \-\-drop Modifies the importation procedure so that the target instance drops every collection before restoring the collection from the dumped backup. .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, \fI\%mongoimport\fP will import the first line as a distinct document. .UNINDENT .INDENT 0.0 .TP .B \-\-upsert Modifies the import process to update existing objects in the 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 \fI\%mongoimport\fP will upsert on the basis of the \fB_id\fP field. .UNINDENT .INDENT 0.0 .TP .B \-\-upsertFields Specifies a list of fields for the query portion of the \fIupsert\fP. Use this option if the \fB_id\fP fields in the existing documents don\(aqt match the field in the document, but another field or field combination can uniquely identify documents as a basis for performing upsert operations. .sp To ensure adequate performance, indexes should exist for this field or fields. .UNINDENT .INDENT 0.0 .TP .B \-\-stopOnError New in version 2.2. .sp Forces \fI\%mongoimport\fP to halt the import operation at the first error rather than continuing the operation despite errors. .UNINDENT .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 document within a single \fIJSON\fP array. .sp Use 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 .sp In this example, \fI\%mongoimport\fP imports the \fIcsv\fP formatted data in the \fB/opt/backups/contacts.csv\fP into the collection \fBcontacts\fP in the \fBusers\fP database on the MongoDB instance running on the localhost port numbered \fB27017\fP. .sp .nf .ft C mongoimport \-\-db users \-\-collection contacts \-\-type csv \-\-file /opt/backups/contacts.csv .ft P .fi .sp In the following example, \fI\%mongoimport\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. .sp .nf .ft C mongoimport \-\-collection contacts \-\-file contacts.json \-\-journal .ft P .fi .sp In the next example, \fI\%mongoimport\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 \fI\%mongoimport\fP will halt because of the \fI\%--stopOnError\fP option. .sp .nf .ft C mongoimport \-\-db sales \-\-collection contacts \-\-stopOnError \-\-dbpath /srv/mongodb/ .ft P .fi .sp In the final example, \fI\%mongoimport\fP imports data from the file \fB/opt/backups/mdb1\-examplenet.json\fP into the collection \fBcontacts\fP within the database \fBmarketing\fP on a remote MongoDB database. This \fI\%mongoimport\fP accesses the \fBmongod\fP instance running on the host \fBmongodb1.example.net\fP over port \fB37017\fP, which requires the username \fBuser\fP and the password \fBpass\fP. .sp .nf .ft C mongoimport \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass \-\-collection contacts \-\-db marketing \-\-file /opt/backups/mdb1\-examplenet.json .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongosniff.10000664000000000000000000001163112306036552013216 0ustar .TH "MONGOSNIFF" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongosniff \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp \fI\%mongosniff\fP provides a low\-level operation tracing/sniffing view into database activity in real time. Think of \fI\%mongosniff\fP as a MongoDB\-specific analogue of \fBtcpdump\fP for TCP/IP network traffic. Typically, \fI\%mongosniff\fP is most frequently used in driver development. .IP Note \fI\%mongosniff\fP requires \fBlibpcap\fP and is only available for Unix\-like systems. Furthermore, the version distributed with the MongoDB binaries is dynamically linked against aversion 0.9 of \fBlibpcap\fP. If your system has a different version of \fBlibpcap\fP, you will need to compile \fI\%mongosniff\fP yourself or create a symbolic link pointing to \fBlibpcap.so.0.9\fP to your local version of \fBlibpcap\fP. Use an operation that resembles the following: .sp .nf .ft C ln \-s /usr/lib/libpcap.so.1.1.1 /usr/lib/libpcap.so.0.9 .ft P .fi .sp Change the path\(aqs and name of the shared library as needed. .RE .sp As an alternative to \fI\%mongosniff\fP, Wireshark, a popular network sniffing tool is capable of inspecting and parsing the MongoDB wire protocol. .SH OPTIONS .INDENT 0.0 .TP .B mongosniff .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .UNINDENT .INDENT 0.0 .TP .B \-\-forward <:port> Declares a host to forward all parsed requests that the \fI\%mongosniff\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<: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: .sp .nf .ft C /<:port>,,... .ft P .fi .UNINDENT .INDENT 0.0 .TP .B \-\-source , , 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 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 \fI\%mongosniff\fP. .UNINDENT .INDENT 0.0 .TP .B Specifies alternate ports to sniff for traffic. By default, \fI\%mongosniff\fP watches for MongoDB traffic on port 27017. Append multiple port numbers to the end of \fI\%mongosniff\fP to monitor traffic on multiple ports. .UNINDENT .SH USAGE .sp Use the following command to connect to a \fBmongod\fP or \fBmongos\fP running on port 27017 \fIand\fP 27018 on the localhost interface: .sp .nf .ft C mongosniff \-\-source NET lo 27017 27018 .ft P .fi .sp Use the following command to only log invalid \fIBSON\fP objects for the \fBmongod\fP or \fBmongos\fP running on the localhost interface and port 27018, for driver development and troubleshooting: .sp .nf .ft C mongosniff \-\-objcheck \-\-source NET lo 27018 .ft P .fi .SH BUILD MONGOSNIFF .sp To build \fBmongosniff\fP yourself, Linux users can use the following procedure: .INDENT 0.0 .IP 1. 3 Obtain prerequisites using your operating systems package management software. Dependencies include: .INDENT 3.0 .IP \(bu 2 \fBlibpcap\fP \- to capture network packets. .IP \(bu 2 \fBgit\fP \- to download the MongoDB source code. .IP \(bu 2 \fBscons\fP and a C++ compiler \- to build \fI\%mongosniff\fP. .UNINDENT .IP 2. 3 Download a copy of the MongoDB source code using \fBgit\fP: .sp .nf .ft C git clone git://github.com/mongodb/mongo.git .ft P .fi .IP 3. 3 Issue the following sequence of commands to change to the \fBmongo/\fP directory and build \fI\%mongosniff\fP: .sp .nf .ft C cd mongo scons mongosniff .ft P .fi .UNINDENT .IP Note If you run \fBscons mongosniff\fP before installing \fBlibpcap\fP you must run \fBscons clean\fP before you can build \fI\%mongosniff\fP. .RE .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongooplog.10000664000000000000000000002536112306036552013236 0ustar .TH "MONGOOPLOG" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongooplog \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .sp New in version 2.2. .SH SYNOPSIS .sp \fI\%mongooplog\fP is a simple tool that polls operations from the \fIreplication\fP \fIoplog\fP of a remote server, and applies them to the local server. This capability supports certain classes of real\-time migrations that require that the source server remain online and in operation throughout the migration process. .sp Typically this command will take the following form: .sp .nf .ft C mongooplog \-\-from mongodb0.example.net \-\-host mongodb1.example.net .ft P .fi .sp This command copies oplog entries from the \fBmongod\fP instance running on the host \fBmongodb0.example.net\fP and duplicates operations to the host \fBmongodb1.example.net\fP. If you do not need to keep the \fI\%--from\fP host running during the migration, consider using \fBmongodump\fP and \fBmongorestore\fP or another \fBbackup\fP operation, which may be better suited to your operation. .IP Note If the \fBmongod\fP instance specified by the \fI\%--from\fP argument is running with \fBauthentication\fP, then \fI\%mongooplog\fP will not be able to copy oplog entries. .RE .IP "See also" .sp \fBmongodump\fP, \fBmongorestore\fP, "\fB/administration/backups\fP", "\fIOplog Internals Overview\fP", and "\fIReplica Set Oplog Sizing\fP". .RE .SH OPTIONS .INDENT 0.0 .TP .B mongooplog .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongooplog\fP utility. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port>, \-h Specifies a resolvable hostname for the \fBmongod\fP instance to which \fI\%mongooplog\fP will apply \fIoplog\fP operations retrieved from the serve specified by the \fI\%--from\fP option. .sp \fI\%mongooplog\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. .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: .sp .nf .ft C /<:port>,,... .ft P .fi .UNINDENT .INDENT 0.0 .TP .B \-\-port Specifies the port number of the \fBmongod\fP instance where \fI\%mongooplog\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. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongooplog\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongooplog\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. .IP Note SSL support in mongooplog is not compiled into the default distribution of MongoDB. See \fB/administration/ssl\fP for more information on SSL and MongoDB. .sp Additionally, mongooplog does not support connections to \fBmongod\fP instances that require client certificate validation. .RE .sp Allows \fI\%mongooplog\fP to connect to \fBmongod\fP instance over an SSL connection. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u 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. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%--username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongooplog\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongooplog\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongooplog\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-dbpath Specifies a directory, containing MongoDB data files, to which \fI\%mongooplog\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, \fI\%mongooplog\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 \fI\%mongooplog\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. .UNINDENT .INDENT 0.0 .TP .B \-\-journal Allows \fI\%mongooplog\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. .UNINDENT .INDENT 0.0 .TP .B \-\-fields [field1[,field2]], \-f [field1[,field2]] Specify a field or number fields to constrain which data \fI\%mongooplog\fP will migrate. All other fields will be \fIexcluded\fP from the migration. Comma separate a list of fields to limit the applied fields. .UNINDENT .INDENT 0.0 .TP .B \-\-fieldFile As an alternative to "\fI\%--fields\fP" the \fI\%--fieldFile\fP option allows you to specify a file (e.g. \fB\fP) that holds a list of field names to \fIinclude\fP in the migration. All other fields will be \fIexcluded\fP from the migration. Place one field per line. .UNINDENT .INDENT 0.0 .TP .B \-\-seconds , \-s Specify a number of seconds of operations for \fI\%mongooplog\fP to pull from the \fI\%remote host\fP. Unless specified the default value is \fB86400\fP seconds, or 24 hours. .UNINDENT .INDENT 0.0 .TP .B \-\-from Specify the host for \fI\%mongooplog\fP to retrieve \fIoplog\fP operations from. \fI\%mongooplog\fP \fIrequires\fP this option. .sp Unless you specify the \fI\%--host\fP option, \fI\%mongooplog\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. .UNINDENT .INDENT 0.0 .TP .B \-\-oplogns 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. .UNINDENT .SS Usage .sp Consider the following prototype \fI\%mongooplog\fP command: .sp .nf .ft C mongooplog \-\-from mongodb0.example.net \-\-host mongodb1.example.net .ft P .fi .sp Here, entries from the \fIoplog\fP of the \fBmongod\fP running on port \fB27017\fP. This only pull entries from the last 24 hours. .sp In the next command, the parameters limit this operation to only apply operations to the database \fBpeople\fP in the collection \fBusage\fP on the target host (i.e. \fBmongodb1.example.net\fP): .sp .nf .ft C mongooplog \-\-from mongodb0.example.net \-\-host mongodb1.example.net \-\-database people \-\-collection usage .ft P .fi .sp This operation only applies oplog entries from the last 24 hours. Use the \fI\%--seconds\fP argument to capture a greater or smaller amount of time. Consider the following example: .sp .nf .ft C mongooplog \-\-from mongodb0.example.net \-\-seconds 172800 .ft P .fi .sp In this operation, \fI\%mongooplog\fP captures 2 full days of operations. To migrate 12 hours of \fIoplog\fP entries, use the following form: .sp .nf .ft C mongooplog \-\-from mongodb0.example.net \-\-seconds 43200 .ft P .fi .sp For the previous two examples, \fI\%mongooplog\fP migrates entries to the \fBmongod\fP process running on the localhost interface connected to the \fB27017\fP port. \fI\%mongooplog\fP can also operate directly on MongoDB\(aqs data files if no \fBmongod\fP is running on the \fItarget\fP host. Consider the following example: .sp .nf .ft C mongooplog \-\-from mongodb0.example.net \-\-dbpath /srv/mongodb \-\-journal .ft P .fi .sp Here, \fI\%mongooplog\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 \fI\%mongooplog\fP will use the durability \fIjournal\fP to ensure that the data files remain in a consistent state. .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongotop.10000664000000000000000000002056012306036552012714 0ustar .TH "MONGOTOP" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongotop \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp \fI\%mongotop\fP provides a method to track the amount of time a MongoDB instance spends reading and writing data. \fI\%mongotop\fP provides statistics on a per\-collection level. By default, \fI\%mongotop\fP returns values every second. .IP "See also" .sp For more information about monitoring MongoDB, see \fB/administration/monitoring\fP. .sp For additional background on various other MongoDB status outputs see: .INDENT 0.0 .IP \(bu 2 \fB/reference/server\-status\fP .IP \(bu 2 \fB/reference/replica\-status\fP .IP \(bu 2 \fB/reference/database\-statistics\fP .IP \(bu 2 \fB/reference/collection\-statistics\fP .UNINDENT .sp For an additional utility that provides MongoDB metrics see "\fBmongostat\fP." .RE .SH OPTIONS .INDENT 0.0 .TP .B mongotop .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Print the version of the \fI\%mongotop\fP utility and exit. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port> Specifies a resolvable hostname for the \fBmongod\fP from which you want to export data. By default \fI\%mongotop\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 \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: .sp .nf .ft C /<:port>,,... .ft P .fi .UNINDENT .INDENT 0.0 .TP .B \-\-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\%mongotop --host\fP command. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongotop\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongotop\fP, disable IPv6 support by default. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u Specifies a username to authenticate to the MongoDB instance, if your database requires authentication. Use in conjunction with the \fI\%mongotop\fP option to supply a password. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%--username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongotop\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongotop\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongotop\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-locks New in version 2.2. .sp Toggles the mode of \fI\%mongotop\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 The final argument is the length of time, in seconds, that \fI\%mongotop\fP waits in between calls. By default \fI\%mongotop\fP returns data every second. .UNINDENT .SH FIELDS .sp \fI\%mongotop\fP returns time values specified in milliseconds (ms.) .sp \fI\%mongotop\fP only reports active namespaces or databases, 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 \fI\%mongotop\fP. .INDENT 0.0 .TP .B mongotop.ns 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 \fI\%ns\fP field does not appear in the \fI\%mongotop\fP output. .UNINDENT .INDENT 0.0 .TP .B mongotop.db New in version 2.2. .sp 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 \fI\%mongotop\fP with the \fI\%--locks\fP option. .UNINDENT .INDENT 0.0 .TP .B mongotop.total Provides the total amount of time that this \fBmongod\fP spent operating on this namespace. .UNINDENT .INDENT 0.0 .TP .B mongotop.read Provides the amount of time that this \fBmongod\fP spent performing read operations on this namespace. .UNINDENT .INDENT 0.0 .TP .B mongotop.write Provides the amount of time that this \fBmongod\fP spent performing write operations on this namespace. .UNINDENT .INDENT 0.0 .TP .B mongotop. Provides a time stamp for the returned data. .UNINDENT .SH USE .sp By default \fI\%mongotop\fP connects to the MongoDB instance running on the localhost port \fB27017\fP. However, \fI\%mongotop\fP can optionally connect to remote \fBmongod\fP instances. See the \fI\%mongotop options\fP for more information. .sp To force \fI\%mongotop\fP to return less frequently specify a number, in seconds at the end of the command. In this example, \fI\%mongotop\fP will return every 15 seconds. .sp .nf .ft C mongotop 15 .ft P .fi .sp This command produces the following output: .sp .nf .ft C connected to: 127.0.0.1 ns total read write 2012\-08\-13T15:45:40 test.system.namespaces 0ms 0ms 0ms local.system.replset 0ms 0ms 0ms local.system.indexes 0ms 0ms 0ms admin.system.indexes 0ms 0ms 0ms admin. 0ms 0ms 0ms ns total read write 2012\-08\-13T15:45:55 test.system.namespaces 0ms 0ms 0ms local.system.replset 0ms 0ms 0ms local.system.indexes 0ms 0ms 0ms admin.system.indexes 0ms 0ms 0ms admin. 0ms 0ms 0ms .ft P .fi .sp To return a \fI\%mongotop\fP report every 5 minutes, use the following command: .sp .nf .ft C mongotop 300 .ft P .fi .sp To report the use of per\-database locks, use \fI\%mongotop --locks\fP, which produces the following output: .sp .nf .ft C $ mongotop \-\-locks connected to: 127.0.0.1 db total read write 2012\-08\-13T16:33:34 local 0ms 0ms 0ms admin 0ms 0ms 0ms . 0ms 0ms 0ms .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongod.10000664000000000000000000007040412306036552012337 0ustar .TH "MONGOD" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongod \- MongoDB Server . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp \fI\%mongod\fP is the primary daemon process for the MongoDB system. It handles data requests, manages data format, and performs background management operations. .sp This document provides a complete overview of all command line options for \fI\%mongod\fP. These options are primarily useful for testing purposes. In common operation, use the \fBconfiguration file options\fP to control the behavior of your database, which is fully capable of all operations described below. .SH OPTIONS .INDENT 0.0 .TP .B mongod .UNINDENT .INDENT 0.0 .TP .B \-\-help, \-h Returns a basic help and usage text. .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongod\fP daemon. .UNINDENT .INDENT 0.0 .TP .B \-\-config , \-f Specifies a configuration file, that you can use to specify runtime\-configurations. While the options are equivalent and accessible via the other command line arguments, the configuration file is the preferred method for runtime configuration of mongod. See the "\fB/reference/configuration\-options\fP" document for more information about these options. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose, \-v Increases the amount of internal reporting returned on standard output or in the log file specified by \fI\%--logpath\fP. Use the \fB\-v\fP form to control the level of verbosity by including the option multiple times, (e.g. \fB\-vvvvv\fP.) .UNINDENT .INDENT 0.0 .TP .B \-\-quiet Runs the \fI\%mongod\fP instance 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, including \fBdrop\fP, \fBdropIndexes\fP, \fBdiagLogging\fP, \fBvalidate\fP, and \fBclean\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 \-\-port Specifies a TCP port for the \fI\%mongod\fP to listen for client connections. By default \fI\%mongod\fP listens for connections on port 27017. .sp UNIX\-like systems require root privileges to use ports with numbers lower than 1024. .UNINDENT .INDENT 0.0 .TP .B \-\-bind_ip The IP address that the \fI\%mongod\fP process will bind to and listen for connections. By default \fI\%mongod\fP listens for connections on the localhost (i.e. \fB127.0.0.1\fP address.) You may attach \fI\%mongod\fP to any interface; however, if you attach \fI\%mongod\fP to a publicly accessible interface ensure that you have implemented proper authentication and/or firewall restrictions to protect the integrity of your database. .UNINDENT .INDENT 0.0 .TP .B \-\-maxConns Specifies the maximum number of simultaneous connections that \fI\%mongod\fP will accept. This setting will have no effect if it is higher than your operating system\(aqs configured maximum connection tracking threshold. .IP Note You cannot set \fBmaxConns\fP to a value higher than \fI20000\fP. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-objcheck Forces the \fI\%mongod\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 database. .UNINDENT .INDENT 0.0 .TP .B \-\-noobjcheck New in version 2.4. .sp Disables the default document validation that MongoDB performs on all incoming BSON documents. .UNINDENT .INDENT 0.0 .TP .B \-\-logpath Specify a path for the log file that will hold all diagnostic logging information. .sp Unless specified, \fI\%mongod\fP will output all log information to the standard output. Additionally, unless you also specify \fI\%--logappend\fP, the logfile will be overwritten when the process restarts. .IP Note The behavior of the logging system may change in the near future in response to the \fI\%SERVER-4499\fP case. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-logappend When specified, this option ensures that \fI\%mongod\fP appends new entries to the end of the logfile rather than overwriting the content of the log when the process restarts. .UNINDENT .INDENT 0.0 .TP .B \-\-syslog New in version 2.1.0. .sp Sends all logging output to the host\(aqs \fIsyslog\fP system rather than to standard output or a log file as with \fI\%--logpath\fP. .IP Warning You cannot use \fI\%--syslog\fP with \fI\%--logpath\fP. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-pidfilepath Specify a file location to hold the "\fIPID\fP" or process ID of the \fI\%mongod\fP process. Useful for tracking the \fI\%mongod\fP process in combination with the \fI\%mongod --fork\fP option. .sp Without a specified \fI\%--pidfilepath\fP option, \fBmongos\fP creates no PID file. .UNINDENT .INDENT 0.0 .TP .B \-\-keyFile Specify the path to a key file to store authentication information. This option is only useful for the connection between replica set members. .IP "See also" .sp "\fIReplica Set Security\fP" and "\fB/administration/replica\-sets\fP." .RE .UNINDENT .INDENT 0.0 .TP .B \-\-nounixsocket Disables listening on the UNIX socket. Unless set to false, \fI\%mongod\fP and \fBmongos\fP provide a UNIX\-socket. .UNINDENT .INDENT 0.0 .TP .B \-\-unixSocketPrefix Specifies a path for the UNIX socket. Unless this option has a value, \fI\%mongod\fP and \fBmongos\fP, create a socket with the \fB/tmp\fP as a prefix. .UNINDENT .INDENT 0.0 .TP .B \-\-fork Enables a \fIdaemon\fP mode for \fI\%mongod\fP that runs the process to the background. This is the normal mode of operation, in production and production\-like environments, but may \fInot\fP be desirable for testing. .UNINDENT .INDENT 0.0 .TP .B \-\-auth Enables database authentication for users connecting from remote hosts. configure users via the \fBmongo shell shell\fP. If no users exist, the localhost interface will continue to have access to the database until the you create the first user. .sp See the \fBSecurity and Authentication\fP page for more information regarding this functionality. .UNINDENT .INDENT 0.0 .TP .B \-\-cpu Forces \fI\%mongod\fP to report the percentage of CPU time in write lock. \fI\%mongod\fP generates output every four seconds. MongoDB writes this data to standard output or the logfile if using the \fBlogpath\fP option. .UNINDENT .INDENT 0.0 .TP .B \-\-dbpath Specify a directory for the \fI\%mongod\fP instance to store its data. Typical locations include: \fB/srv/mongodb\fP, \fB/var/lib/mongodb\fP or \fB/opt/mongodb\fP .sp Unless specified, \fI\%mongod\fP will look for data files in the default \fB/data/db\fP directory. (Windows systems use the \fB\edata\edb\fP directory.) If you installed using a package management system. Check the \fB/etc/mongodb.conf\fP file provided by your packages to see the configuration of the \fBdbpath\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-diaglog Creates a very verbose, \fIdiagnostic log\fP for troubleshooting and recording various errors. MongoDB writes these log files in the \fBdbpath\fP directory in a series of files that begin with the string \fBdiaglog\fP and end with the initiation time of the logging as a hex string. .sp The specified value configures the level of verbosity. Possible values, and their impact are as follows. .TS center; |l|l|. _ T{ \fBValue\fP T} T{ \fBSetting\fP T} _ T{ 0 T} T{ off. No logging. T} _ T{ 1 T} T{ Log write operations. T} _ T{ 2 T} T{ Log read operations. T} _ T{ 3 T} T{ Log both read and write operations. T} _ T{ 7 T} T{ Log write and some read operations. T} _ .TE .sp You can use the \fBmongosniff\fP tool to replay this output for investigation. Given a typical diaglog file, located at \fB/data/db/diaglog.4f76a58c\fP, you might use a command in the following form to read these files: .sp .nf .ft C mongosniff \-\-source DIAGLOG /data/db/diaglog.4f76a58c .ft P .fi .sp \fI\%--diaglog\fP is for internal use and not intended for most users. .IP Warning Setting the diagnostic level to \fB0\fP will cause \fI\%mongod\fP to stop writing data to the \fIdiagnostic log\fP file. However, the \fI\%mongod\fP instance will continue to keep the file open, even if it is no longer writing data to the file. If you want to rename, move, or delete the diagnostic log you must cleanly shut down the \fI\%mongod\fP instance before doing so. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-directoryperdb Alters the storage pattern of the data directory to store each database\(aqs files in a distinct folder. This option will create directories within the \fI\%--dbpath\fP named for each directory. .sp Use this option in conjunction with your file system and device configuration so that MongoDB will store data on a number of distinct disk devices to increase write throughput or disk capacity. .UNINDENT .INDENT 0.0 .TP .B \-\-journal Enables operation journaling to ensure write durability and data consistency. \fI\%mongod\fP enables journaling by default on 64\-bit builds of versions after 2.0. .UNINDENT .INDENT 0.0 .TP .B \-\-journalOptions Provides functionality for testing. Not for general use, and may affect database integrity. .UNINDENT .INDENT 0.0 .TP .B \-\-journalCommitInterval Specifies the maximum amount of time for \fI\%mongod\fP to allow between journal operations. The default value is 100 milliseconds, while possible values range from 2 to 300 milliseconds. Lower values increase the durability of the journal, at the expense of disk performance. .sp To force \fI\%mongod\fP to commit to the journal more frequently, you can specify \fBj:true\fP. When a write operation with \fBj:true\fP pending, \fI\%mongod\fP will reduce \fBjournalCommitInterval\fP to a third of the set value. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Specify this option to enable IPv6 support. This will allow clients to connect to \fI\%mongod\fP using IPv6 networks. \fI\%mongod\fP disables IPv6 support by default in \fI\%mongod\fP and all utilities. .UNINDENT .INDENT 0.0 .TP .B \-\-jsonp Permits \fIJSONP\fP access via an HTTP interface. Consider the security implications of allowing this activity before enabling this option. .UNINDENT .INDENT 0.0 .TP .B \-\-noauth Disable authentication. Currently the default. Exists for future compatibility and clarity. .UNINDENT .INDENT 0.0 .TP .B \-\-nohttpinterface Disables the HTTP interface. .UNINDENT .INDENT 0.0 .TP .B \-\-nojournal Disables the durability journaling. By default, \fI\%mongod\fP enables journaling in 64\-bit versions after v2.0. .UNINDENT .INDENT 0.0 .TP .B \-\-noprealloc Disables the preallocation of data files. This will shorten the start up time in some cases, but can cause significant performance penalties during normal operations. .UNINDENT .INDENT 0.0 .TP .B \-\-noscripting Disables the scripting engine. .UNINDENT .INDENT 0.0 .TP .B \-\-notablescan Forbids operations that require a table scan. .UNINDENT .INDENT 0.0 .TP .B \-\-nssize Specifies the default size for namespace files (i.e \fB.ns\fP). This option has no impact on the size of existing namespace files. The maximum size is 2047 megabytes. .sp The default value is 16 megabytes; this provides for approximately 24,000 namespaces. Each collection, as well as each index, counts as a namespace. .UNINDENT .INDENT 0.0 .TP .B \-\-profile Changes the level of database profiling, which inserts information about operation performance into output of \fI\%mongod\fP or the log file. The following levels are available: .TS center; |l|l|. _ T{ \fBLevel\fP T} T{ \fBSetting\fP T} _ T{ 0 T} T{ Off. No profiling. T} _ T{ 1 T} T{ On. Only includes slow operations. T} _ T{ 2 T} T{ On. Includes all operations. T} _ .TE .sp Profiling is off by default. Database profiling can impact database performance. Enable this option only after careful consideration. .UNINDENT .INDENT 0.0 .TP .B \-\-quota Enables a maximum limit for the number data files each database can have. When running with \fI\%--quota\fP, there are a maximum of 8 data files per database. Adjust the quota with the \fI\%--quotaFiles\fP option. .UNINDENT .INDENT 0.0 .TP .B \-\-quotaFiles Modify limit on the number of data files per database. This option requires the \fI\%--quota\fP setting. The default value for \fI\%--quotaFiles\fP is 8. .UNINDENT .INDENT 0.0 .TP .B \-\-rest Enables the simple \fIREST\fP API. .UNINDENT .INDENT 0.0 .TP .B \-\-repair Runs a repair routine on all databases. This is equivalent to shutting down and running the \fBrepairDatabase\fP database command on all databases. .IP Warning In general, if you have an intact copy of your data, such as would exist on a very recent backup or an intact member of a \fIreplica set\fP, \fBdo not\fP use \fBrepairDatabase\fP or related options like \fBdb.repairDatabase()\fP in the \fBmongo\fP shell or \fI\%mongod --repair\fP. Restore from an intact copy of your data. .RE .IP Note When using \fIjournaling\fP, there is almost never any need to run \fBrepairDatabase\fP. In the event of an unclean shutdown, the server will be able restore the data files to a pristine state automatically. .RE .sp Changed in version 2.1.2. .sp If you run the repair option \fIand\fP have data in a journal file, \fI\%mongod\fP will refuse to start. In these cases you should start \fI\%mongod\fP without the \fI\%--repair\fP option to allow \fI\%mongod\fP to recover data from the journal. This will complete more quickly and will result in a more consistent and complete data set. .sp To continue the repair operation despite the journal files, shut down \fI\%mongod\fP cleanly and restart with the \fI\%--repair\fP option. .IP Note \fI\%--repair\fP copies data from the source data files into new data files in the \fBrepairpath\fP, and then replaces the original data files with the repaired data files. \fIIf\fP \fBrepairpath\fP is on the same device as \fBdbpath\fP, you \fImay\fP interrupt a \fI\%mongod\fP running \fI\%--repair\fP without affecting the integrity of the data set. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-repairpath Specifies the root directory containing MongoDB data files, to use for the \fI\%--repair\fP operation. Defaults to a \fB_tmp\fP directory within the \fBdbpath\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-setParameter New in version 2.4. .sp Specifies an option to configure on startup. Specify multiple options with multiple \fI\%--setParameter\fP options. See \fB/reference/parameters\fP for full documentation of these parameters. The \fBsetParameter\fP database command provides access to many of these parameters. \fI\%--setParameter\fP supports the following options: .INDENT 7.0 .IP \(bu 2 \fBenableLocalhostAuthBypass\fP .IP \(bu 2 \fBenableTestCommands\fP .IP \(bu 2 \fBjournalCommitInterval\fP .IP \(bu 2 \fBlogLevel\fP .IP \(bu 2 \fBlogUserIds\fP .IP \(bu 2 \fBnotablescan\fP .IP \(bu 2 \fBquiet\fP .IP \(bu 2 \fBreplApplyBatchSize\fP .IP \(bu 2 \fBreplIndexPrefetch\fP .IP \(bu 2 \fBsupportCompatibilityFormPrivilegeDocuments\fP .IP \(bu 2 \fBsyncdelay\fP .IP \(bu 2 \fBtraceExceptions\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-slowms Defines the value of "slow," for the \fI\%--profile\fP option. The database logs all slow queries to the log, even when the profiler is not turned on. When the database profiler is on, \fI\%mongod\fP the profiler writes to the \fBsystem.profile\fP collection. See the \fBprofile\fP command for more information on the database profiler. .UNINDENT .INDENT 0.0 .TP .B \-\-smallfiles Enables a mode where MongoDB uses a smaller default file size. Specifically, \fI\%--smallfiles\fP reduces the initial size for data files and limits them to 512 megabytes. \fI\%--smallfiles\fP also reduces the size of each \fIjournal\fP files from 1 gigabyte to 128 megabytes. .sp Use \fI\%--smallfiles\fP if you have a large number of databases that each holds a small quantity of data. \fI\%--smallfiles\fP can lead your \fI\%mongod\fP to create a large number of files, which may affect performance for larger databases. .UNINDENT .INDENT 0.0 .TP .B \-\-shutdown Used in \fIcontrol scripts\fP, the \fI\%--shutdown\fP will cleanly and safely terminate the \fI\%mongod\fP process. When invoking \fI\%mongod\fP with this option you must set the \fI\%--dbpath\fP option either directly or by way of the \fBconfiguration file\fP and the \fI\%--config\fP option. .sp \fI\%--shutdown\fP is only available on Linux systems. .UNINDENT .INDENT 0.0 .TP .B \-\-syncdelay \fI\%mongod\fP writes data very quickly to the journal, and lazily to the data files. \fI\%--syncdelay\fP controls how much time can pass before MongoDB flushes data to the \fIdatabase files\fP via an \fIfsync\fP operation. The default setting is 60 seconds. In almost every situation you should not set this value and use the default setting. .sp The \fBserverStatus\fP command reports the background flush thread\(aqs status via the \fBbackgroundFlushing\fP field. .sp \fBsyncdelay\fP has no effect on the \fBjournal\fP files or \fBjournaling\fP. .IP Warning If you set \fI\%--syncdelay\fP to \fB0\fP, MongoDB will not sync the memory mapped files to disk. Do not set this value on production systems. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-sysinfo Returns diagnostic system information and then exits. The information provides the page size, the number of physical pages, and the number of available physical pages. .UNINDENT .INDENT 0.0 .TP .B \-\-upgrade Upgrades the on\-disk data format of the files specified by the \fI\%--dbpath\fP to the latest version, if needed. .sp This option only affects the operation of \fI\%mongod\fP if the data files are in an old format. .IP Note In most cases you should \fBnot\fP set this value, so you can exercise the most control over your upgrade process. See the MongoDB \fI\%release notes\fP (on the download page) for more information about the upgrade process. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-traceExceptions For internal diagnostic use only. .UNINDENT .SS Replication Options .INDENT 0.0 .TP .B \-\-replSet Use this option to configure replication with replica sets. Specify a setname as an argument to this set. All hosts must have the same set name. .IP "See also" .sp "\fB/replication\fP," "\fB/administration/replica\-sets\fP," and "\fB/reference/replica\-configuration\fP" .RE .UNINDENT .INDENT 0.0 .TP .B \-\-oplogSize Specifies a maximum size in megabytes for the replication operation log (e.g. \fIoplog\fP.) By \fI\%mongod\fP creates an \fIoplog\fP based on the maximum amount of space available. For 64\-bit systems, the op log is typically 5% of available disk space. .sp Once the \fI\%mongod\fP has created the oplog for the first time, changing \fI\%--oplogSize\fP will not affect the size of the oplog. .UNINDENT .INDENT 0.0 .TP .B \-\-fastsync In the context of \fIreplica set\fP replication, set this option if you have seeded this member with a snapshot of the \fIdbpath\fP of another member of the set. Otherwise the \fI\%mongod\fP will attempt to perform an initial sync, as though the member were a new member. .IP Warning If the data is not perfectly synchronized \fIand\fP \fI\%mongod\fP starts with \fBfastsync\fP, then the secondary or slave will be permanently out of sync with the primary, which may cause significant consistency problems. .RE .UNINDENT .INDENT 0.0 .TP .B \-\-replIndexPrefetch New in version 2.2. .sp You must use \fI\%--replIndexPrefetch\fP in conjunction with \fBreplSet\fP. The default value is \fBall\fP and available options are: .INDENT 7.0 .IP \(bu 2 \fBnone\fP .IP \(bu 2 \fBall\fP .IP \(bu 2 \fB_id_only\fP .UNINDENT .sp By default \fIsecondary\fP members of a \fIreplica set\fP will load all indexes related to an operation into memory before applying operations from the oplog. You can modify this behavior so that the secondaries will only load the \fB_id\fP index. Specify \fB_id_only\fP or \fBnone\fP to prevent the \fI\%mongod\fP from loading \fIany\fP index into memory. .UNINDENT .SS Master\-Slave Replication .sp These options provide access to conventional master\-slave database replication. While this functionality remains accessible in MongoDB, replica sets are the preferred configuration for database replication. .INDENT 0.0 .TP .B \-\-master Configures \fI\%mongod\fP to run as a replication \fImaster\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-slave Configures \fI\%mongod\fP to run as a replication \fIslave\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-source <:port> For use with the \fI\%--slave\fP option, the \fB\-\-source\fP option designates the server that this instance will replicate. .UNINDENT .INDENT 0.0 .TP .B \-\-only For use with the \fI\%--slave\fP option, the \fB\-\-only\fP option specifies only a single \fIdatabase\fP to replicate. .UNINDENT .INDENT 0.0 .TP .B \-\-slavedelay For use with the \fI\%--slave\fP option, the \fB\-\-slavedelay\fP option configures a "delay" in seconds, for this slave to wait to apply operations from the \fImaster\fP node. .UNINDENT .INDENT 0.0 .TP .B \-\-autoresync For use with the \fI\%--slave\fP option, the \fI\%--autoresync\fP option allows this slave to automatically resync if the local data is more than 10 seconds behind the master. This option may be problematic if the \fIoplog\fP is too small (controlled by the \fI\%--oplogSize\fP option.) If the \fIoplog\fP not large enough to store the difference in changes between the master\(aqs current state and the state of the slave, this node will forcibly resync itself unnecessarily. When you set the If the \fI\%--autoresync\fP option the slave will not attempt an automatic resync more than once in a ten minute period. .UNINDENT .SS Sharding Cluster Options .INDENT 0.0 .TP .B \-\-configsvr Declares that this \fI\%mongod\fP instance serves as the \fIconfig database\fP of a sharded cluster. When running with this option, clients will not be able to write data to any database other than \fBconfig\fP and \fBadmin\fP. The default port for \fI\%mongod\fP with this option is \fB27019\fP and \fI\%mongod\fP writes all data files to the \fB/configdb\fP sub\-directory of the \fI\%--dbpath\fP directory. .UNINDENT .INDENT 0.0 .TP .B \-\-shardsvr Configures this \fI\%mongod\fP instance as a shard in a partitioned cluster. The default port for these instances is \fB27018\fP. The only effect of \fI\%--shardsvr\fP is to change the port number. .UNINDENT .INDENT 0.0 .TP .B \-\-noMoveParanoia Disables a "paranoid mode" for data writes for chunk migration operation. See the \fIchunk migration\fP and \fBmoveChunk\fP command documentation for more information. .sp By default \fI\%mongod\fP will save copies of migrated chunks on the "from" server during migrations as "paranoid mode." Setting this option disables this paranoia. .UNINDENT .SS SSL Options .IP "See" .sp \fB/administration/ssl\fP for full documentation of MongoDB\(aqs support. .RE .INDENT 0.0 .TP .B \-\-sslOnNormalPorts New in version 2.2. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .sp Enables SSL for \fI\%mongod\fP. With \fI\%--sslOnNormalPorts\fP, a \fI\%mongod\fP requires SSL encryption for all connections on the default MongoDB port, or the port specified by \fI\%--port\fP. By default, \fI\%--sslOnNormalPorts\fP is disabled. .UNINDENT .INDENT 0.0 .TP .B \-\-sslPEMKeyFile New in version 2.2. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .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 When using \fI\%--sslOnNormalPorts\fP, you must specify \fI\%--sslPEMKeyFile\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-sslPEMKeyPassword New in version 2.2. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .sp Specifies the password to de\-crypt the certificate\-key file (i.e. \fI\%--sslPEMKeyFile\fP). Only use \fI\%--sslPEMKeyPassword\fP if the certificate\-key file is encrypted. In all cases, \fI\%mongod\fP will redact the password from all logging and reporting output. .sp Changed in version 2.4: \fI\%--sslPEMKeyPassword\fP is only needed when the private key is encrypted. In earlier versions \fI\%mongod\fP would require \fI\%--sslPEMKeyPassword\fP whenever using \fI\%--sslOnNormalPorts\fP, even when the private key was not encrypted. .UNINDENT .INDENT 0.0 .TP .B \-\-sslCAFile New in version 2.4. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .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 .UNINDENT .INDENT 0.0 .TP .B \-\-sslCRLFile New in version 2.4. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .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 .UNINDENT .INDENT 0.0 .TP .B \-\-sslWeakCertificateValidation New in version 2.4. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .sp Disables the requirement for SSL certificate validation, that \fI\%--sslCAFile\fP enables. With \fI\%--sslWeakCertificateValidation\fP, \fI\%mongod\fP will accept connections if the client does not present a certificate when establishing the connection. .sp If the client presents a certificate and \fI\%mongod\fP has \fI\%--sslWeakCertificateValidation\fP enabled, \fI\%mongod\fP will validate the certificate using the root certificate chain specified by \fI\%--sslCAFile\fP, and reject clients with invalid certificates. .sp Use \fI\%--sslWeakCertificateValidation\fP if you have a mixed deployment that includes clients that do not or cannot present certificates to \fI\%mongod\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-sslFIPSMode New in version 2.4. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .sp When specified, \fI\%mongod\fP will use the FIPS mode of the installed OpenSSL library. Your system must have a FIPS compliant OpenSSL library to use \fI\%--sslFIPSMode\fP. .UNINDENT .SH USAGE .sp In common usage, the invocation of \fI\%mongod\fP will resemble the following in the context of an initialization or control script: .sp .nf .ft C mongod \-\-config /etc/mongodb.conf .ft P .fi .sp See the "\fB/reference/configuration\-options\fP" for more information on how to configure \fI\%mongod\fP using the configuration file. .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongoexport.10000664000000000000000000002544312306036552013440 0ustar .TH "MONGOEXPORT" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongoexport \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp \fI\%mongoexport\fP is a utility that produces a JSON or CSV export of data stored in a MongoDB instance. See the "\fB/administration/import\-export\fP" 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. .IP Note Do not use \fBmongoimport\fP and \fI\%mongoexport\fP for full\-scale backups because they may not reliably capture data type information. Use \fBmongodump\fP and \fBmongorestore\fP as described in "\fB/administration/backups\fP" for this kind of functionality. .RE .SH OPTIONS .INDENT 0.0 .TP .B mongoexport .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongoexport\fP utility. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port> Specifies a resolvable hostname for the \fBmongod\fP from which you want to export data. By default \fI\%mongoexport\fP attempts to connect to a MongoDB process ruining on the localhost 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: .sp .nf .ft C /<:port>,,... .ft P .fi .UNINDENT .INDENT 0.0 .TP .B \-\-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\%mongoexport --host\fP command. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongoexport\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongoexport\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. .IP Note SSL support in mongoexport is not compiled into the default distribution of MongoDB. See \fB/administration/ssl\fP for more information on SSL and MongoDB. .sp Additionally, mongoexport does not support connections to \fBmongod\fP instances that require client certificate validation. .RE .sp Allows \fI\%mongoexport\fP to connect to \fBmongod\fP instance over an SSL connection. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u Specifies a username to authenticate to the MongoDB instance, if your database requires authentication. Use in conjunction with the \fI\%mongoexport --password\fP option to supply a password. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%--username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongoexport\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongoexport\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongoexport\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-dbpath Specifies the directory of the MongoDB data files. If used, the \fB\-\-dbpath\fP option enables \fI\%mongoexport\fP to attach directly to local data files and insert the data without the \fBmongod\fP. To run with \fB\-\-dbpath\fP, \fI\%mongoexport\fP needs to lock access to the data directory: as a result, 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 \fI\%mongoexport\fP to export 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. .UNINDENT .INDENT 0.0 .TP .B \-\-journal Allows \fI\%mongoexport\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. .UNINDENT .INDENT 0.0 .TP .B \-\-db , \-d Use the \fI\%--db\fP option to specify the name of the database that contains the collection you want to export. .UNINDENT .INDENT 0.0 .TP .B \-\-collection , \-c Use the \fI\%--collection\fP option to specify the collection that you want \fI\%mongoexport\fP to export. .UNINDENT .INDENT 0.0 .TP .B \-\-fields , \-f Specify a field or number fields to \fIinclude\fP in the export. All other fields will be \fIexcluded\fP from the export. Comma separate a list of fields to limit the fields exported. .UNINDENT .INDENT 0.0 .TP .B \-\-fieldFile As an alternative to "\fI\%--fields\fP" the \fI\%--fieldFile\fP option allows you to specify a file (e.g. \fB\(ga\fP) to hold a list of field names to specify a list of fields to \fIinclude\fP in the export. All other fields will be \fIexcluded\fP from the export. Place one field per line. .UNINDENT .INDENT 0.0 .TP .B \-\-query Provides a \fIJSON document\fP as a query that optionally limits the documents returned in the export. .UNINDENT .INDENT 0.0 .TP .B \-\-csv Changes the export format to a comma separated values (CSV) format. By default \fI\%mongoexport\fP writes data using one \fIJSON\fP document for every MongoDB document. .UNINDENT .INDENT 0.0 .TP .B \-\-jsonArray Modifies the output of \fI\%mongoexport\fP to write the entire contents of the export as a single \fIJSON\fP array. By default \fI\%mongoexport\fP writes data using one JSON document for every MongoDB document. .UNINDENT .INDENT 0.0 .TP .B \-\-slaveOk, \-k Allows \fI\%mongoexport\fP to read data from secondary or slave nodes when using \fI\%mongoexport\fP with a replica set. This option is only available if connected to a \fBmongod\fP or \fBmongos\fP and is not available when used with the "\fI\%mongoexport --dbpath\fP" option. .sp This is the default behavior. .UNINDENT .INDENT 0.0 .TP .B \-\-out , \-o Specify a file to write the export to. If you do not specify a file name, the \fI\%mongoexport\fP writes data to standard output (e.g. \fBstdout\fP). .UNINDENT .INDENT 0.0 .TP .B \-\-forceTableScan New in version 2.2. .sp Forces \fI\%mongoexport\fP to scan the data store directly: typically, \fI\%mongoexport\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, \fI\%mongoexport\fP does not use \fB$snapshot\fP. As a result, the export produced by \fI\%mongoexport\fP can reflect the state of the database at many different points in time. .IP Warning Use \fI\%--forceTableScan\fP with extreme caution and consideration. .RE .UNINDENT .SH USAGE .sp In the following example, \fI\%mongoexport\fP exports the collection \fBcontacts\fP from the \fBusers\fP database from the \fBmongod\fP instance running on the localhost port number \fB27017\fP. This command writes the export data in \fICSV\fP format into a file located at \fB/opt/backups/contacts.csv\fP. .sp .nf .ft C mongoexport \-\-db users \-\-collection contacts \-\-csv \-\-out /opt/backups/contacts.csv .ft P .fi .sp The next example creates an export of the collection \fBcontacts\fP from the MongoDB instance running on the localhost port number \fB27017\fP, with journaling explicitly enabled. This writes the export to the \fBcontacts.json\fP file in \fIJSON\fP format. .sp .nf .ft C mongoexport \-\-db sales \-\-collection contacts \-\-out contacts.json \-\-journal .ft P .fi .sp The following example exports the collection \fBcontacts\fP from the \fBsales\fP database located in the MongoDB data files located at \fB/srv/mongodb/\fP. This operation writes the export to standard output in \fIJSON\fP format. .sp .nf .ft C mongoexport \-\-db sales \-\-collection contacts \-\-dbpath /srv/mongodb/ .ft P .fi .IP Warning The above example will only succeed if there is no \fBmongod\fP connected to the data files located in the \fB/srv/mongodb/\fP directory. .RE .sp The final 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. .sp .nf .ft C mongoexport \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass \-\-collection contacts \-\-db marketing \-\-out mdb1\-examplenet.json .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongofiles.10000664000000000000000000002523212306036552013215 0ustar .TH "MONGOFILES" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongofiles \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp The \fI\%mongofiles\fP utility makes it possible to manipulate files stored in your MongoDB instance in \fIGridFS\fP objects from the command line. It is particularly useful as it provides an interface between objects stored in your file system and GridFS. .sp All \fI\%mongofiles\fP commands take arguments in three groups: .INDENT 0.0 .IP 1. 3 \fI\%Options\fP. You may use one or more of these options to control the behavior of \fI\%mongofiles\fP. .IP 2. 3 \fI\%Commands\fP. Use one of these commands to determine the action of \fI\%mongofiles\fP. .IP 3. 3 A file name representing either the name of a file on your system\(aqs file system, a GridFS object. .UNINDENT .sp \fI\%mongofiles\fP, like \fBmongodump\fP, \fBmongoexport\fP, \fBmongoimport\fP, and \fBmongorestore\fP, can access data stored in a MongoDB data directory without requiring a running \fBmongod\fP instance, if no other \fBmongod\fP is running. .IP Note For \fIreplica sets\fP, \fI\%mongofiles\fP can only read from the set\(aqs \(aq\fIprimary\fP. .RE .SH COMMANDS .INDENT 0.0 .TP .B mongofiles .UNINDENT .INDENT 0.0 .TP .B list Lists the files in the GridFS store. The characters specified after \fBlist\fP (e.g. \fB\fP) optionally limit the list of returned items to files that begin with that string of characters. .UNINDENT .INDENT 0.0 .TP .B search Lists the files in the GridFS store with names that match any portion of \fB\fP. .UNINDENT .INDENT 0.0 .TP .B put Copy the specified file from the local file system into GridFS storage. .sp Here, \fB\fP refers to the name the object will have in GridFS, and \fI\%mongofiles\fP assumes that this reflects the name the file has on the local file system. If the local filename is different use the \fI\%mongofiles --local\fP option. .UNINDENT .INDENT 0.0 .TP .B get Copy the specified file from GridFS storage to the local file system. .sp Here, \fB\fP refers to the name the object will have in GridFS, and \fI\%mongofiles\fP assumes that this reflects the name the file has on the local file system. If the local filename is different use the \fI\%mongofiles --local\fP option. .UNINDENT .INDENT 0.0 .TP .B delete Delete the specified file from GridFS storage. .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongofiles\fP utility. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port> Specifies a resolvable hostname for the \fBmongod\fP that holds your GridFS system. By default \fI\%mongofiles\fP attempts to connect to a MongoDB process ruining 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. .UNINDENT .INDENT 0.0 .TP .B \-\-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\%mongofiles --host\fP command. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongofiles\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongofiles\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. .IP Note SSL support in mongofiles is not compiled into the default distribution of MongoDB. See \fB/administration/ssl\fP for more information on SSL and MongoDB. .sp Additionally, mongofiles does not support connections to \fBmongod\fP instances that require client certificate validation. .RE .sp Allows \fI\%mongofiles\fP to connect to \fBmongod\fP instance over an SSL connection. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u Specifies a username to authenticate to the MongoDB instance, if your database requires authentication. Use in conjunction with the \fI\%mongofiles --password\fP option to supply a password. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%mongofiles --username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongofiles\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongofiles\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongofiles\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-dbpath Specifies the directory of the MongoDB data files. If used, the \fI\%--dbpath\fP option enables \fI\%mongofiles\fP to attach directly to local data files interact with the GridFS data without the \fBmongod\fP. To run with \fI\%--dbpath\fP, \fI\%mongofiles\fP needs to lock access to the data directory: as a result, 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 \fI\%mongofiles\fP when running with the \fI\%--dbpath\fP option and MongoDB uses 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 \fI\%mongofiles\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 \fI\%mongofiles\fP to record all data on disk regularly. .UNINDENT .INDENT 0.0 .TP .B \-\-db , \-d Use the \fI\%--db\fP option to specify the MongoDB database that stores or will store the GridFS files. .UNINDENT .INDENT 0.0 .TP .B \-\-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. .UNINDENT .INDENT 0.0 .TP .B \-\-local , \-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\fP modifier refers to the name the object will have in GridFS. \fI\%mongofiles\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 , t Provides the ability to specify a \fIMIME\fP type to describe the file inserted into GridFS storage. \fI\%mongofiles\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. .sp In the default operation, files will not be overwritten by a \fBmongofiles put\fP option. .UNINDENT .SH USE .sp To return a list of all files in a \fIGridFS\fP collection in the \fBrecords\fP database, use the following invocation at the system shell: .sp .nf .ft C mongofiles \-d records list .ft P .fi .sp This \fI\%mongofiles\fP instance will connect to the \fBmongod\fP instance running on the \fB27017\fP localhost interface to specify the same operation on a different port or hostname, and issue a command that resembles one of the following: .sp .nf .ft C mongofiles \-\-port 37017 \-d records list mongofiles \-\-hostname db1.example.net \-d records list mongofiles \-\-hostname db1.example.net \-\-port 37017 \-d records list .ft P .fi .sp Modify any of the following commands as needed if you\(aqre connecting the \fBmongod\fP instances on different ports or hosts. .sp To upload a file named \fB32\-corinth.lp\fP to the GridFS collection in the \fBrecords\fP database, you can use the following command: .sp .nf .ft C mongofiles \-d records put 32\-corinth.lp .ft P .fi .sp To delete the \fB32\-corinth.lp\fP file from this GridFS collection in the \fBrecords\fP database, you can use the following command: .sp .nf .ft C mongofiles \-d records delete 32\-corinth.lp .ft P .fi .sp To search for files in the GridFS collection in the \fBrecords\fP database that have the string \fBcorinth\fP in their names, you can use following command: .sp .nf .ft C mongofiles \-d records search corinth .ft P .fi .sp To list all files in the GridFS collection in the \fBrecords\fP database that begin with the string \fB32\fP, you can use the following command: .sp .nf .ft C mongofiles \-d records list 32 .ft P .fi .sp To fetch the file from the GridFS collection in the \fBrecords\fP database named \fB32\-corinth.lp\fP, you can use the following command: .sp .nf .ft C mongofiles \-d records get 32\-corinth.lp .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongoperf.10000664000000000000000000001255012306036552013046 0ustar .TH "MONGOPERF" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongoperf \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp \fI\%mongoperf\fP is a utility to check disk I/O performance independently of MongoDB. .sp It times tests of random disk I/O and presents the results. You can use \fI\%mongoperf\fP for any case apart from MongoDB. The \fI\%mmf\fP \fBtrue\fP mode is completely generic. In that mode is it somewhat analogous to tools such as \fI\%bonnie++\fP (albeit mongoperf is simpler). .sp Specify options to \fI\%mongoperf\fP using a JavaScript document. .IP "See also" .INDENT 0.0 .IP \(bu 2 \fI\%bonnie\fP .IP \(bu 2 \fI\%bonnie++\fP .IP \(bu 2 \fI\%Output from an example run\fP .IP \(bu 2 \fI\%Checking Disk Performance with the mongoperf Utility\fP .UNINDENT .RE .SH OPTIONS .INDENT 0.0 .TP .B mongoperf .UNINDENT .INDENT 0.0 .TP .B \-\-help Displays the options to \fI\%mongoperf\fP. Specify options to \fI\%mongoperf\fP with a JSON document described in the \fI\%Configuration Fields\fP section. .UNINDENT .INDENT 0.0 .TP .B \fI\%mongoperf\fP accepts configuration options in the form of a file that holds a \fIJSON\fP document. You must stream the content of this file into \fI\%mongoperf\fP, as in the following operation: .sp .nf .ft C mongoperf < config .ft P .fi .sp In this example \fBconfig\fP is the name of a file that holds a JSON document that resembles the following example: .sp .nf .ft C { nThreads:, fileSizeMB:, sleepMicros:, mmf:, r:, w:, recSizeKB:, syncDelay: } .ft P .fi .sp See the \fI\%Configuration Fields\fP section for documentation of each of these fields. .UNINDENT .SH CONFIGURATION FIELDS .INDENT 0.0 .TP .B mongoperf.nThreads \fIType:\fP Integer. .sp \fIDefault:\fP 1 .sp Defines the number of threads \fI\%mongoperf\fP will use in the test. To saturate your system\(aqs storage system you will need multiple threads. Consider setting \fI\%nThreads\fP to \fB16\fP. .UNINDENT .INDENT 0.0 .TP .B mongoperf.fileSizeMB \fIType:\fP Integer. .sp \fIDefault:\fP 1 megabyte (i.e. 1024\s-2\u2\d\s0 bytes) .sp Test file size. .UNINDENT .INDENT 0.0 .TP .B mongoperf.sleepMicros \fIType:\fP Integer. .sp \fIDefault:\fP 0 .sp \fI\%mongoperf\fP will pause for the number of specified \fI\%sleepMicros\fP divided by the \fI\%nThreads\fP between each operation. .UNINDENT .INDENT 0.0 .TP .B mongoperf.mmf \fIType:\fP Boolean. .sp \fIDefault:\fP \fBfalse\fP .sp Set \fI\%mmf\fP to \fBtrue\fP to use memory mapped files for the tests. .sp Generally: .INDENT 7.0 .IP \(bu 2 when \fI\%mmf\fP is \fBfalse\fP, \fI\%mongoperf\fP tests direct, physical, I/O, without caching. Use a large file size to test heavy random I/O load and to avoid I/O coalescing. .IP \(bu 2 when \fI\%mmf\fP is \fBtrue\fP, \fI\%mongoperf\fP runs tests of the caching system, and can use normal file system cache. Use \fBmmf\fP in this mode to test file system cache behavior with memory mapped files. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B mongoperf.r \fIType:\fP Boolean. .sp \fIDefault:\fP \fBfalse\fP .sp Set \fI\%r\fP to \fBtrue\fP to perform reads as part of the tests. .sp Either \fI\%r\fP or \fI\%w\fP must be \fBtrue\fP. .UNINDENT .INDENT 0.0 .TP .B mongoperf.w \fIType:\fP Boolean. .sp \fIDefault:\fP \fBfalse\fP .sp Set \fI\%w\fP to \fBtrue\fP to perform writes as part of the tests. .sp Either \fI\%r\fP or \fI\%w\fP must be \fBtrue\fP. .UNINDENT .INDENT 0.0 .TP .B mongoperf.syncDelay \fIType:\fP Integer. .sp \fIDefault:\fP 0 .sp Seconds between disk flushes. \fI\%syncDelay\fP is similar to \fBsyncDelay\fP for \fBmongod\fP. .sp The \fI\%syncDelay\fP controls how frequently \fI\%mongoperf\fP performs an asynchronous disk flush the memory mapped file used for testing. By default, \fBmongod\fP performs this operation every every 60 seconds. Use \fI\%syncDelay\fP to test basic system performance of this type of operation. .sp Only use \fI\%syncDelay\fP in conjunction with \fI\%mmf\fP set to \fBtrue\fP. .sp The default value of \fB0\fP disables this .UNINDENT .SH USE .sp .nf .ft C mongoperf < jsonconfigfile .ft P .fi .sp Replace \fBjsonconfigfile\fP with the path to the \fI\%mongoperf\fP configuration. You may also invoke \fI\%mongoperf\fP in the following form: .sp .nf .ft C echo "{nThreads:16,fileSizeMB:1000,r:true}" | ./mongoperf .ft P .fi .sp In this operation: .INDENT 0.0 .IP \(bu 2 \fI\%mongoperf\fP tests direct physical random read io\(aqs, using 16 concurrent reader threads. .IP \(bu 2 \fI\%mongoperf\fP uses a 1 gigabyte test file. .UNINDENT .sp Consider using \fBiostat\fP, as invoked in the following example to monitor I/O performance during the test. .sp .nf .ft C iostat \-xm 2 .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongodump.10000664000000000000000000002617012306036552013062 0ustar .TH "MONGODUMP" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongodump \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp \fI\%mongodump\fP is a utility for creating a binary export of the contents of a database. Consider using this utility as part an effective \fBbackup strategy\fP. Use in conjunction with \fBmongorestore\fP to provide restore functionality. .IP Note The format of data created by \fI\%mongodump\fP tool from the 2.2 distribution or later is different and incompatible with earlier versions of \fBmongod\fP. .RE .IP "See also" .sp "\fBmongorestore\fP" and "\fB/administration/backups\fP". .RE .SH OPTIONS .INDENT 0.0 .TP .B mongodump .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongodump\fP utility and exits. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port> Specifies a resolvable hostname for the \fBmongod\fP that you wish to use to create the database dump. By default \fI\%mongodump\fP will attempt to connect to a MongoDB process ruining on the localhost 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 \fI\%mongodump\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: .sp .nf .ft C mongodump \-\-host repl0/mongo0.example.net,mongo0.example.net:27018,mongo1.example.net,mongo2.example.net .ft P .fi .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, 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. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongodump\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongodump\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. .IP Note SSL support in mongodump is not compiled into the default distribution of MongoDB. See \fB/administration/ssl\fP for more information on SSL and MongoDB. .sp Additionally, mongodump does not support connections to \fBmongod\fP instances that require client certificate validation. .RE .sp Allows \fI\%mongodump\fP to connect to \fBmongod\fP instance over an SSL connection. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u 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. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%--username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongodump\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongodump\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongodump\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-dbpath Specifies the directory of the MongoDB data files. If used, the \fI\%--dbpath\fP option enables \fI\%mongodump\fP to attach directly to local data files and copy the data without the \fBmongod\fP. To run with \fI\%--dbpath\fP, \fI\%mongodump\fP needs to restrict access to the data directory: as a result, 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 \fI\%mongodump\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. .UNINDENT .INDENT 0.0 .TP .B \-\-journal Allows \fI\%mongodump\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. .UNINDENT .INDENT 0.0 .TP .B \-\-db , \-d Use the \fI\%--db\fP option to specify a database for \fI\%mongodump\fP to backup. If you do not specify a DB, \fI\%mongodump\fP copies all databases in this instance into the dump files. Use this option to backup or copy a smaller subset of your data. .UNINDENT .INDENT 0.0 .TP .B \-\-collection , \-c Use the \fI\%--collection\fP option to specify a collection for \fI\%mongodump\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. .UNINDENT .INDENT 0.0 .TP .B \-\-out , \-o Specifies a path where \fI\%mongodump\fP and store the output the database dump. To output the database dump to standard output, specify a \fB\-\fP rather than a path. .UNINDENT .INDENT 0.0 .TP .B \-\-query , \-q Provides a query to limit (optionally) the documents included in the output of \fI\%mongodump\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-oplog Use this option to ensure that \fI\%mongodump\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. .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. .sp \fI\%--oplog\fP has no effect when running \fI\%mongodump\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. .IP Note \fI\%--oplog\fP only works against nodes that maintain a \fIoplog\fP. This includes all members of a replica set, as well as \fImaster\fP nodes in master/slave replication deployments. .RE .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 \fBmongod\fP crash. .UNINDENT .INDENT 0.0 .TP .B \-\-forceTableScan Forces \fI\%mongodump\fP to scan the data store directly: typically, \fI\%mongodump\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, \fI\%mongodump\fP does not use \fB$snapshot\fP. As a result, the dump produced by \fI\%mongodump\fP can reflect the state of the database at many different points in time. .IP Warning Use \fI\%--forceTableScan\fP with extreme caution and consideration. .RE .IP Warning 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 \fI\%mongodump\fP, when queued write operation waits behind the \fBfsync\fP lock. .RE .UNINDENT .SH BEHAVIOR .sp When running \fI\%mongodump\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. .SH USAGE .sp See the \fB/tutorial/backup\-databases\-with\-binary\-database\-dumps\fP for a larger overview of \fI\%mongodump\fP usage. Also see the "\fBmongorestore\fP" document for an overview of the \fBmongorestore\fP, which provides the related inverse functionality. .sp The following command, creates a dump file that contains only the collection named \fBcollection\fP in the database named \fBtest\fP. In this case the database is running on the local interface on port \fB27017\fP: .sp .nf .ft C mongodump \-\-collection collection \-\-db test .ft P .fi .sp In the next example, \fI\%mongodump\fP creates a backup of the database instance stored in the \fB/srv/mongodb\fP directory on the local machine. This requires that no \fBmongod\fP instance is using the \fB/srv/mongodb\fP directory. .sp .nf .ft C mongodump \-\-dbpath /srv/mongodb .ft P .fi .sp In the final example, \fI\%mongodump\fP creates a database dump located at \fB/opt/backup/mongodump\-2011\-10\-24\fP, from a database running on port \fB37017\fP on the host \fBmongodb1.example.net\fP and authenticating using the username \fBuser\fP and the password \fBpass\fP, as follows: .sp .nf .ft C mongodump \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass /opt/backup/mongodump\-2011\-10\-24 .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongorestore.10000664000000000000000000003047612306036552013604 0ustar .TH "MONGORESTORE" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongorestore \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp The \fI\%mongorestore\fP tool imports content from binary database dump, created by \fBmongodump\fP into a specific database. \fI\%mongorestore\fP can import content to an existing database or create a new one. .sp \fI\%mongorestore\fP only performs inserts into the existing database, and does not perform updates or \fIupserts\fP. If existing data with the same \fB_id\fP already exists on the target database, \fI\%mongorestore\fP will \fInot\fP replace it. .sp \fI\%mongorestore\fP will recreate indexes from the dump .sp The behavior of \fI\%mongorestore\fP has the following properties: .INDENT 0.0 .IP \(bu 2 all operations are inserts, not updates. .IP \(bu 2 all inserts are "fire and forget," \fI\%mongorestore\fP does not wait for a response from a \fBmongod\fP to ensure that the MongoDB process has received or recorded the operation. .sp The \fBmongod\fP will record any errors to its log that occur during a restore operation but \fI\%mongorestore\fP will not receive errors. .UNINDENT .IP Note 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. .RE .SH OPTIONS .INDENT 0.0 .TP .B mongorestore .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongorestore\fP tool. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port> Specifies a resolvable hostname for the \fBmongod\fP to which you want to restore the database. By default \fI\%mongorestore\fP will attempt 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 \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: .sp .nf .ft C /<:port>,,... .ft P .fi .UNINDENT .INDENT 0.0 .TP .B \-\-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. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongorestore\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongorestore\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. .IP Note SSL support in mongorestore is not compiled into the default distribution of MongoDB. See \fB/administration/ssl\fP for more information on SSL and MongoDB. .sp Additionally, mongorestore does not support connections to \fBmongod\fP instances that require client certificate validation. .RE .sp Allows \fI\%mongorestore\fP to connect to \fBmongod\fP instance over an SSL connection. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u 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. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%mongorestore --username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongorestore\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongorestore\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongorestore\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-dbpath Specifies the directory of the MongoDB data files. If used, the \fI\%--dbpath\fP option enables \fI\%mongorestore\fP to attach directly to local data files and insert the data without the \fBmongod\fP. To run with \fI\%--dbpath\fP, \fI\%mongorestore\fP needs to lock access to the data directory: as a result, 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 \fI\%mongorestore\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. .UNINDENT .INDENT 0.0 .TP .B \-\-journal Allows \fI\%mongorestore\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. .UNINDENT .INDENT 0.0 .TP .B \-\-db , \-d Use the \fI\%--db\fP option to specify a database for \fI\%mongorestore\fP to restore data \fIinto\fP. If the database doesn\(aqt exist, \fI\%mongorestore\fP will create the specified database. If you do not specify a \fB\fP, \fI\%mongorestore\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\%mongorestore\fP restores. You must use the \fI\%mongorestore\fP \fI\%path option\fP to limit that restored data. .UNINDENT .INDENT 0.0 .TP .B \-\-collection , \-c Use the \fI\%--collection\fP option to specify a collection for \fI\%mongorestore\fP to restore. If you do not specify a \fB\fP, \fI\%mongorestore\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. .UNINDENT .INDENT 0.0 .TP .B \-\-objcheck Forces the \fI\%mongorestore\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 database. .UNINDENT .INDENT 0.0 .TP .B \-\-noobjcheck New in version 2.4. .sp Disables the default document validation that MongoDB performs on all incoming BSON documents. .UNINDENT .INDENT 0.0 .TP .B \-\-filter \(aq\(aq Limits the documents that \fI\%mongorestore\fP imports to only those documents that match the JSON document specified as \fB\(aq\(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 \-\-drop 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. .UNINDENT .INDENT 0.0 .TP .B \-\-keepIndexVersion Prevents \fI\%mongorestore\fP from upgrading the index to the latest version during the restoration process. .UNINDENT .INDENT 0.0 .TP .B \-\-w New in version 2.2. .sp Specifies the \fIwrite concern\fP for each write operation that \fI\%mongorestore\fP writes to the target database. By default, \fI\%mongorestore\fP does not wait for a response for \fIwrite acknowledgment\fP. .UNINDENT .INDENT 0.0 .TP .B \-\-noOptionsRestore New in version 2.2. .sp Prevents \fI\%mongorestore\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 New in version 2.2. .sp Prevents \fI\%mongorestore\fP from restoring and building indexes as specified in the corresponding \fBmongodump\fP output. .UNINDENT .INDENT 0.0 .TP .B \-\-oplogLimit New in version 2.2. .sp Prevents \fI\%mongorestore\fP from applying \fIoplog\fP entries newer than the \fB\fP. Specify \fB\fP values in the form of \fB:\fP, where \fB\fP is the seconds since the UNIX epoch, and \fB\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 .B The final argument of the \fI\%mongorestore\fP command is a directory path. This argument specifies the location of the database dump from which to restore. .UNINDENT .SH USAGE .sp See \fB/tutorial/backup\-databases\-with\-binary\-database\-dumps\fP for a larger overview of \fI\%mongorestore\fP usage. Also see the "\fBmongodump\fP" document for an overview of the \fBmongodump\fP, which provides the related inverse functionality. .sp Consider the following example: .sp .nf .ft C mongorestore \-\-collection people \-\-db accounts dump/accounts/ .ft P .fi .sp Here, \fI\%mongorestore\fP reads the database dump in the \fBdump/\fP sub\-directory of the current directory, and restores \fIonly\fP the documents in the collection named \fBpeople\fP from the database named \fBaccounts\fP. \fI\%mongorestore\fP restores data to the instance running on the localhost interface on port \fB27017\fP. .sp In the next example, \fI\%mongorestore\fP restores a backup of the database instance located in \fBdump\fP to a database instance stored in the \fB/srv/mongodb\fP on the local machine. This requires that there are no active \fBmongod\fP instances attached to \fB/srv/mongodb\fP data directory. .sp .nf .ft C mongorestore \-\-dbpath /srv/mongodb .ft P .fi .sp In the final example, \fI\%mongorestore\fP restores a database dump located at \fB/opt/backup/mongodump\-2011\-10\-24\fP, from a database running on port \fB37017\fP on the host \fBmongodb1.example.net\fP. \fI\%mongorestore\fP authenticates to the this MongoDB instance using the username \fBuser\fP and the password \fBpass\fP, as follows: .sp .nf .ft C mongorestore \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass /opt/backup/mongodump\-2011\-10\-24 .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/bsondump.10000664000000000000000000000644412306036552012706 0ustar .TH "BSONDUMP" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME bsondump \- MongoDB BSON utility . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp The \fI\%bsondump\fP converts \fIBSON\fP files into human\-readable formats, including \fIJSON\fP. For example, \fI\%bsondump\fP is useful for reading the output files generated by \fBmongodump\fP. .SH OPTIONS .INDENT 0.0 .TP .B bsondump .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%bsondump\fP utility. .UNINDENT .INDENT 0.0 .TP .B \-\-objcheck Validates each \fIBSON\fP object before outputting it in \fIJSON\fP format. By default, \fI\%bsondump\fP enables \fI\%--objcheck\fP by default. 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 database. .UNINDENT .INDENT 0.0 .TP .B \-\-noobjcheck New in version 2.4. .sp Disables the default document validation that \fI\%bsondump\fP performs on all BSON documents. .UNINDENT .INDENT 0.0 .TP .B \-\-filter \(aq\(aq Limits the documents that \fI\%bsondump\fP exports to only those documents that match the \fIJSON document\fP specified as \fB\(aq\(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 \fI\%bsondump\fP from outputting "\fIJSON\fP" (the default) to a debugging format. .UNINDENT .INDENT 0.0 .TP .B The final argument to \fI\%bsondump\fP is a document containing \fIBSON\fP. This data is typically generated by \fBmongodump\fP or by MongoDB in a \fIrollback\fP operation. .UNINDENT .SH USAGE .sp By default, \fI\%bsondump\fP outputs data to standard output. To create corresponding \fIJSON\fP files, you will need to use the shell redirect. See the following command: .sp .nf .ft C bsondump collection.bson > collection.json .ft P .fi .sp Use the following command (at the system shell) to produce debugging output for a \fIBSON\fP file: .sp .nf .ft C bsondump \-\-type=debug collection.bson .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongostat.10000664000000000000000000003067112306036552013071 0ustar .TH "MONGOSTAT" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongostat \- MongoDB . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp The \fI\%mongostat\fP utility provides a quick overview of the status of a currently running \fBmongod\fP or \fBmongos\fP instance. \fI\%mongostat\fP is functionally similar to the UNIX/Linux file system utility \fBvmstat\fP, but provides data regarding \fBmongod\fP and \fBmongos\fP instances. .IP "See also" .sp For more information about monitoring MongoDB, see \fB/administration/monitoring\fP. .sp For more background on various other MongoDB status outputs see: .INDENT 0.0 .IP \(bu 2 \fB/reference/server\-status\fP .IP \(bu 2 \fB/reference/replica\-status\fP .IP \(bu 2 \fB/reference/database\-statistics\fP .IP \(bu 2 \fB/reference/collection\-statistics\fP .UNINDENT .sp For an additional utility that provides MongoDB metrics see "\fBmongotop\fP." .RE .sp \fI\%mongostat\fP connects to the \fBmongod\fP instance running on the local host interface on TCP port \fB27017\fP; however, \fI\%mongostat\fP can connect to any accessible remote \fBmongod\fP instance. .SH OPTIONS .INDENT 0.0 .TP .B mongostat .UNINDENT .INDENT 0.0 .TP .B \-\-help Returns a basic help and usage text. .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.) .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the \fI\%mongostat\fP utility. .UNINDENT .INDENT 0.0 .TP .B \-\-host <:port> Specifies a resolvable hostname for the \fBmongod\fP from which you want to export data. By default \fI\%mongostat\fP attempts to connect to a MongoDB instance 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 \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: .sp .nf .ft C /<:port>,,... .ft P .fi .UNINDENT .INDENT 0.0 .TP .B \-\-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\%mongostat --host\fP command. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 Enables IPv6 support that allows \fI\%mongostat\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongostat\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. .IP Note SSL support in mongostat is not compiled into the default distribution of MongoDB. See \fB/administration/ssl\fP for more information on SSL and MongoDB. .sp Additionally, mongostat does not support connections to \fBmongod\fP instances that require client certificate validation. .RE .sp Allows \fI\%mongostat\fP to connect to \fBmongod\fP instance over an SSL connection. .UNINDENT .INDENT 0.0 .TP .B \-\-username , \-u Specifies a username to authenticate to the MongoDB instance, if your database requires authentication. Use in conjunction with the \fI\%mongostat --password\fP option to supply a password. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p Specifies a password to authenticate to the MongoDB instance. Use in conjunction with the \fI\%mongostat --username\fP option to supply a username. .sp If you specify a \fI\%--username\fP without the \fI\%--password\fP option, \fI\%mongostat\fP will prompt for a password interactively. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongostat\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongostat\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP for more information about Kerberos authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-noheaders Disables the output of column or field names. .UNINDENT .INDENT 0.0 .TP .B \-\-rowcount , \-n Controls the number of rows to output. Use in conjunction with the \fBsleeptime\fP argument to control the duration of a \fI\%mongostat\fP operation. .sp Unless \fI\%--rowcount\fP is specified, \fI\%mongostat\fP will return an infinite number of rows (e.g. value of \fB0\fP.) .UNINDENT .INDENT 0.0 .TP .B \-\-http Configures \fI\%mongostat\fP to collect data using the HTTP interface rather than a raw database connection. .UNINDENT .INDENT 0.0 .TP .B \-\-discover With this option \fI\%mongostat\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, \fI\%mongostat\fP will return data from all \fIshards\fP in the cluster. If a replica set provides a shard in the sharded cluster, \fI\%mongostat\fP will report on non\-hidden members of that replica set. .sp The \fI\%mongostat --host\fP option is not required but potentially useful in this case. .UNINDENT .INDENT 0.0 .TP .B \-\-all Configures \fI\%mongostat\fP to return all optional \fI\%fields\fP. .UNINDENT .INDENT 0.0 .TP .B The final argument is the length of time, in seconds, that \fI\%mongostat\fP waits in between calls. By default \fI\%mongostat\fP returns one call every second. .sp \fI\%mongostat\fP returns values that reflect the operations over a 1 second period. For values of \fB\fP greater than 1, \fI\%mongostat\fP averages data to reflect average operations per second. .UNINDENT .SH FIELDS .sp \fI\%mongostat\fP returns values that reflect the operations over a 1 second period. When \fBmongostat \fP has a value greater than 1, \fI\%mongostat\fP averages the statistics to reflect average operations per second. .sp \fI\%mongostat\fP outputs the following fields: .INDENT 0.0 .TP .B inserts The number of objects inserted into the database per second. If followed by an asterisk (e.g. \fB*\fP), the datum refers to a replicated operation. .UNINDENT .INDENT 0.0 .TP .B query The number of query operations per second. .UNINDENT .INDENT 0.0 .TP .B update The number of update operations per second. .UNINDENT .INDENT 0.0 .TP .B delete The number of delete operations per second. .UNINDENT .INDENT 0.0 .TP .B getmore The number of get more (i.e. cursor batch) operations per second. .UNINDENT .INDENT 0.0 .TP .B command The number of commands per second. On \fIslave\fP and \fIsecondary\fP systems, \fI\%mongostat\fP presents two values separated by a pipe character (e.g. \fB|\fP), in the form of \fBlocal|replicated\fP commands. .UNINDENT .INDENT 0.0 .TP .B flushes The number of \fIfsync\fP operations per second. .UNINDENT .INDENT 0.0 .TP .B mapped The total amount of data mapped in megabytes. This is the total data size at the time of the last \fI\%mongostat\fP call. .UNINDENT .INDENT 0.0 .TP .B size The amount of (virtual) memory in megabytes used by the process at the time of the last \fI\%mongostat\fP call. .UNINDENT .INDENT 0.0 .TP .B res The amount of (resident) memory in megabytes used by the process at the time of the last \fI\%mongostat\fP call. .UNINDENT .INDENT 0.0 .TP .B faults Changed in version 2.1. .sp The number of page faults per second. .sp Before version 2.1 this value was only provided for MongoDB instances running on Linux hosts. .UNINDENT .INDENT 0.0 .TP .B locked The percent of time in a global write lock. .sp Changed in version 2.2: The \fBlocked db\fP field replaces the \fBlocked %\fP field to more appropriate data regarding the database specific locks in version 2.2. .UNINDENT .INDENT 0.0 .TP .B locked db New in version 2.2. .sp The percent of time in the per\-database context\-specific lock. \fI\%mongostat\fP will report the database that has spent the most time since the last \fI\%mongostat\fP call with a write lock. .sp This value represents the amount of time that the listed database spent in a locked state \fIcombined\fP with the time that the \fBmongod\fP spent in the global lock. Because of this, and the sampling method, you may see some values greater than 100%. .UNINDENT .INDENT 0.0 .TP .B idx miss The percent of index access attempts that required a page fault to load a btree node. This is a sampled value. .UNINDENT .INDENT 0.0 .TP .B qr The length of the queue of clients waiting to read data from the MongoDB instance. .UNINDENT .INDENT 0.0 .TP .B qw The length of the queue of clients waiting to write data from the MongoDB instance. .UNINDENT .INDENT 0.0 .TP .B ar The number of active clients performing read operations. .UNINDENT .INDENT 0.0 .TP .B aw The number of active clients performing write operations. .UNINDENT .INDENT 0.0 .TP .B netIn The amount of network traffic, in \fIbytes\fP, received by the MongoDB instance. .sp This includes traffic from \fI\%mongostat\fP itself. .UNINDENT .INDENT 0.0 .TP .B netOut The amount of network traffic, in \fIbytes\fP, sent by the MongoDB instance. .sp This includes traffic from \fI\%mongostat\fP itself. .UNINDENT .INDENT 0.0 .TP .B conn The total number of open connections. .UNINDENT .INDENT 0.0 .TP .B set The name, if applicable, of the replica set. .UNINDENT .INDENT 0.0 .TP .B repl The replication status of the node. .TS center; |l|l|. _ T{ \fBValue\fP T} T{ \fBReplication Type\fP T} _ T{ M T} T{ \fImaster\fP T} _ T{ SEC T} T{ \fIsecondary\fP T} _ T{ REC T} T{ recovering T} _ T{ UNK T} T{ unknown T} _ T{ SLV T} T{ \fIslave\fP T} _ .TE .UNINDENT .SH USAGE .sp In the first example, \fI\%mongostat\fP will return data every second for 20 seconds. \fI\%mongostat\fP collects data from the \fBmongod\fP instance running on the localhost interface on port 27017. All of the following invocations produce identical behavior: .sp .nf .ft C mongostat \-\-rowcount 20 1 mongostat \-\-rowcount 20 mongostat \-n 20 1 mongostat \-n 20 .ft P .fi .sp In the next example, \fI\%mongostat\fP returns data every 5 minutes (or 300 seconds) for as long as the program runs. \fI\%mongostat\fP collects data from the \fBmongod\fP instance running on the localhost interface on port \fB27017\fP. Both of the following invocations produce identical behavior. .sp .nf .ft C mongostat \-\-rowcount 0 300 mongostat \-n 0 300 mongostat 300 .ft P .fi .sp In the following example, \fI\%mongostat\fP returns data every 5 minutes for an hour (12 times.) \fI\%mongostat\fP collects data from the \fBmongod\fP instance running on the localhost interface on port 27017. Both of the following invocations produce identical behavior. .sp .nf .ft C mongostat \-\-rowcount 12 300 mongostat \-n 12 300 .ft P .fi .sp In many cases, using the \fI\%--discover\fP will help provide a more complete snapshot of the state of an entire group of machines. If a \fBmongos\fP process connected to a \fIsharded cluster\fP is running on port \fB27017\fP of the local machine, you can use the following form to return statistics from all members of the cluster: .sp .nf .ft C mongostat \-\-discover .ft P .fi .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/manpages/mongo.10000664000000000000000000003355612306036552012202 0ustar .TH "MONGO" "1" "March 14, 2013" "2.2.3" "mongodb-manual" .SH NAME mongo \- MongoDB Shell . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructuredText. . .SH DESCRIPTION .sp \fI\%mongo\fP is an interactive JavaScript shell interface to MongoDB, which provides a powerful interface for systems administrators as well as a way for developers to test queries and operations directly with the database. \fI\%mongo\fP also provides a fully functional JavaScript environment for use with a MongoDB. This document addresses the basic invocation of the \fI\%mongo\fP shell and an overview of its usage. .SH SYNOPSIS .INDENT 0.0 .TP .B mongo [\-\-shell] [\-\-nodb] [\-\-norc] [\-\-quiet] [\-\-port ] [\-\-host ] [\-\-eval ] [\-u ] [\-\-username ] [\-p ] [\-\-password ] [\-\-help] [\-h] [\-\-version] [\-\-verbose] [\-\-ipv6] [database] [file.js] .UNINDENT .SH INTERFACE .SS Options .INDENT 0.0 .TP .B \-\-shell Enables the shell interface after evaluating a \fIJavaScript\fP file. If you invoke the \fI\%mongo\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 \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. .UNINDENT .INDENT 0.0 .TP .B \-\-quiet Silences output from the shell during the connection process. .UNINDENT .INDENT 0.0 .TP .B \-\-port Specifies the port where the \fBmongod\fP or \fBmongos\fP instance is listening. Unless specified \fI\%mongo\fP connects to \fBmongod\fP instances on port \fB27017\fP, which is the default \fBmongod\fP port. .UNINDENT .INDENT 0.0 .TP .B \-\-host specifies the host where the \fBmongod\fP or \fBmongos\fP is running to connect to as \fB\fP. By default \fI\%mongo\fP will attempt to connect to a MongoDB process running on the localhost. .UNINDENT .INDENT 0.0 .TP .B \-\-eval Evaluates a JavaScript expression specified as an argument to this option. \fI\%mongo\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 , \-u 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, \fI\%mongo\fP will exit with an exception. .UNINDENT .INDENT 0.0 .TP .B \-\-password , \-p 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 without the \fI\%--password\fP option, \fI\%mongo\fP will prompt for a password interactively, if the \fBmongod\fP or \fBmongos\fP requires authentication. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationDatabase New in version 2.4. .sp Specifies the database that holds the user\(aqs (e.g \fI\%--username\fP) credentials. .sp By default, \fI\%mongo\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, \fB/reference/privilege\-documents\fP and \fB/reference/user\-privileges\fP for more information about delegated authentication in MongoDB. .UNINDENT .INDENT 0.0 .TP .B \-\-authenticationMechanism 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 the MongoDB Subscriber Edition, \fI\%mongo\fP also includes support for \fBGSSAPI\fP to handle Kerberos authentication. .sp See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP 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 New in version 2.4. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .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 New in version 2.4. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .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 New in version 2.4. .IP Note 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 the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for more information about SSL and MongoDB. .RE .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 .UNINDENT .INDENT 0.0 .TP .B \-\-help, \-h Returns a basic help and usage text. .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the version of the shell. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose 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 \fI\%mongo\fP to connect to the MongoDB instance using an IPv6 network. All MongoDB programs and processes, including \fI\%mongo\fP, disable IPv6 support by default. .UNINDENT .INDENT 0.0 .TP .B Specifies the "database address" of the database to connect to. For example: .sp .nf .ft C mongo admin .ft P .fi .sp The above command will connect the \fI\%mongo\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: .sp .nf .ft C mongo mongodb1.example.net mongo mongodb1/admin mongo 10.8.8.10/test .ft P .fi .UNINDENT .INDENT 0.0 .TP .B Specifies a JavaScript file to run and then exit. Must be the last option specified. Use the \fI\%--shell\fP option to return to a shell after the file finishes running. .UNINDENT .SS Files .sp \fB~/.dbshell\fP .INDENT 0.0 .INDENT 3.5 \fI\%mongo\fP maintains a history of commands in the \fB.dbshell\fP file. .IP Note \fI\%mongo\fP does not recorded interaction related to authentication in the history file, including \fBauthenticate\fP and \fBdb.addUser()\fP. .RE .IP Warning Versions of Windows \fBmongo.exe\fP earlier than 2.2.0 will save the \fI.dbshell\fP file in the \fBmongo.exe\fP working directory. .RE .UNINDENT .UNINDENT .sp \fB~/.mongorc.js\fP .INDENT 0.0 .INDENT 3.5 \fI\%mongo\fP will read the \fB.mongorc.js\fP file from the home directory of the user invoking \fI\%mongo\fP. In the file, users can define variables, customize the \fI\%mongo\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 by specifying \fI\%a .js file to mongo\fP, \fI\%mongo\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 reading \fB.mongorc.js\fP. .UNINDENT .UNINDENT .sp \fB/tmp/mongo_edit\fI\fP.js\fP .INDENT 0.0 .INDENT 3.5 Created by \fI\%mongo\fP when editing a file. If the file exists \fI\%mongo\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\fP.js\fP .INDENT 0.0 .INDENT 3.5 Created by \fBmongo.exe\fP on Windows when editing a file. If the file exists \fI\%mongo\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 .INDENT 0.0 .TP .B EDITOR Specifies the path to an editor to use with the \fBedit\fP shell command. A JavaScript variable \fBEDITOR\fP will override the value of \fI\%EDITOR\fP. .UNINDENT .INDENT 0.0 .TP .B HOME Specifies the path to the home directory where \fI\%mongo\fP will read the \fB.mongorc.js\fP file and write the \fB.dbshell\fP file. .UNINDENT .INDENT 0.0 .TP .B HOMEDRIVE On Windows systems, \fI\%HOMEDRIVE\fP specifies the path the directory where \fI\%mongo\fP will read the \fB.mongorc.js\fP file and write the \fB.dbshell\fP file. .UNINDENT .INDENT 0.0 .TP .B HOMEPATH Specifies the Windows path to the home directory where \fI\%mongo\fP will read the \fB.mongorc.js\fP file and write the \fB.dbshell\fP file. .UNINDENT .SH KEYBOARD SHORTCUTS .sp The \fI\%mongo\fP shell supports the following keyboard shortcuts: [1] .TS center; |l|l|. _ T{ \fBKeybinding\fP T} T{ \fBFunction\fP T} _ T{ Up arrow T} T{ Retrieve previous command from history T} _ T{ Down\-arrow T} T{ Retrieve next command from history T} _ T{ Home T} T{ Go to beginning of the line T} _ T{ End T} T{ Go to end of the line T} _ T{ Tab T} T{ Autocomplete method/command T} _ T{ Left\-arrow T} T{ Go backward one character T} _ T{ Right\-arrow T} T{ Go forward one character T} _ T{ Ctrl\-left\-arrow T} T{ Go backward one word T} _ T{ Ctrl\-right\-arrow T} T{ Go forward one word T} _ T{ Meta\-left\-arrow T} T{ Go backward one word T} _ T{ Meta\-right\-arrow T} T{ Go forward one word T} _ T{ Ctrl\-A T} T{ Go to the beginning of the line T} _ T{ Ctrl\-B T} T{ Go backward one character T} _ T{ Ctrl\-C T} T{ Exit the \fI\%mongo\fP shell T} _ T{ Ctrl\-D T} T{ Delete a char (or exit the \fI\%mongo\fP shell) T} _ T{ Ctrl\-E T} T{ Go to the end of the line T} _ T{ Ctrl\-F T} T{ Go forward one character T} _ T{ Ctrl\-G T} T{ Abort T} _ T{ Ctrl\-J T} T{ Accept/evaluate the line T} _ T{ Ctrl\-K T} T{ Kill/erase the line T} _ T{ Ctrl\-L or type \fBcls\fP T} T{ Clear the screen T} _ T{ Ctrl\-M T} T{ Accept/evaluate the line T} _ T{ Ctrl\-N T} T{ Retrieve next command from history T} _ T{ Ctrl\-P T} T{ Retrieve previous command from history T} _ T{ Ctrl\-R T} T{ Reverse\-search command history T} _ T{ Ctrl\-S T} T{ Forward\-search command history T} _ T{ Ctrl\-T T} T{ Transpose characters T} _ T{ Ctrl\-U T} T{ Perform Unix line\-discard T} _ T{ Ctrl\-W T} T{ Perform Unix word\-rubout T} _ T{ Ctrl\-Y T} T{ Yank T} _ T{ Ctrl\-Z T} T{ Suspend (job control works in linux) T} _ T{ Ctrl\-H T} T{ Backward\-delete a character T} _ T{ Ctrl\-I T} T{ Complete, same as Tab T} _ T{ Meta\-B T} T{ Go backward one word T} _ T{ Meta\-C T} T{ Capitalize word T} _ T{ Meta\-D T} T{ Kill word T} _ T{ Meta\-F T} T{ Go forward one word T} _ T{ Meta\-L T} T{ Change word to lowercase T} _ T{ Meta\-U T} T{ Change word to uppercase T} _ T{ Meta\-Y T} T{ Yank\-pop T} _ T{ Meta\-Backspace T} T{ Backward\-kill word T} _ T{ Meta\-< T} T{ Retrieve the first command in command history T} _ T{ Meta\-> T} T{ Retrieve the last command in command history T} _ .TE .IP [1] 5 MongoDB accommodates multiple keybinding, Since 2.0, \fI\%mongo\fP includes support for basic emacs keybindings. .SH USE .sp Typically users invoke the shell with the \fI\%mongo\fP command at the system prompt. Consider the following examples for other scenarios. .sp To connect to a database on a remote host using authentication and a non\-standard port, use the following form: .sp .nf .ft C mongo \-\-username \-\-password \-\-hostname \-\-port 28015 .ft P .fi .sp Alternatively, consider the following short form: .sp .nf .ft C mongo \-u \-p \-\-host \-\-port 28015 .ft P .fi .sp Replace \fB\fP, \fB\fP, and \fB\fP with the appropriate values for your situation and substitute or omit the \fI\%--port\fP as needed. .sp To execute a JavaScript file without evaluating the \fB~/.mongorc.js\fP file before starting a shell session, use the following form: .sp .nf .ft C mongo \-\-shell \-\-norc alternate\-environment.js .ft P .fi .sp To print return a query as \fIJSON\fP, from the system prompt using the \fI\%--eval\fP option, use the following form: .sp .nf .ft C mongo \-\-eval \(aqdb.collection.find().forEach(printjson)\(aq .ft P .fi .sp Use single quotes (e.g. \fB\(aq\fP) to enclose the JavaScript, as well as the additional JavaScript required to generate this output. .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT 2011-2013, 10gen, Inc. .\" Generated by docutils manpage writer. . debian/mongodb-server.postinst0000664000000000000000000000276112306036552013736 0ustar #!/bin/sh # postinst script for mongodb # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) # create a mongodb group and user if ! grep -q mongodb /etc/passwd; then adduser --system --no-create-home mongodb addgroup --system mongodb adduser mongodb mongodb fi # create db -- note: this should agree with dbpath in mongodb.conf mkdir -p /var/lib/mongodb chown -R mongodb:mongodb /var/lib/mongodb # create logdir -- note: this should agree with logpath in mongodb.conf mkdir -p /var/log/mongodb chown -R mongodb:mongodb /var/log/mongodb # create rundir mkdir -p /var/run/mongodb chown -R mongodb:mongodb /var/run/mongodb ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/mongodb-server.README.Debian0000664000000000000000000000172012306036552014163 0ustar MongoDB for Debian ------------------ Database at different location from upstream To be consistent with the Debian Policy, the mongodb-server package puts the databases under the /var/lib/mongodb directory instead of what upstream uses in its documentation (namely, /data/db). You can change this on your installation by editing the configuration file /etc/mongodb.conf in the dbpath directive. Binds only to localhost As mongo needs some tuning to become secure, it binds to localhost by default. You can change this behavior in /etc/mongodb.conf by editing/removing/commenting out bind_ip line. Why only for x86 and amd64? The mongodb server depends on both little-endianness and unaligned memory access, which I believe means it can only work on i386 and amd64. We believe that the mongodb will be useful even it is not available for all Debian supported platforms. -- Rogério Brito , Fri, 12 Apr 2013 22:10:41 -0300 debian/watch0000664000000000000000000000037712306036552010232 0ustar version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|BETA|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/ \ http://www.mongodb.org/downloads .*/mongodb-src-r(\d.*)\.(?:tgz|tar\.(?:gz|bz2|xz)) # Bart Martens Sun, 10 Feb 2013 07:18:34 +0000 debian/README.Debian0000664000000000000000000000172012306036552011233 0ustar MongoDB for Debian ------------------ Database at different location from upstream To be consistent with the Debian Policy, the mongodb-server package puts the databases under the /var/lib/mongodb directory instead of what upstream uses in its documentation (namely, /data/db). You can change this on your installation by editing the configuration file /etc/mongodb.conf in the dbpath directive. Binds only to localhost As mongo needs some tuning to become secure, it binds to localhost by default. You can change this behavior in /etc/mongodb.conf by editing/removing/commenting out bind_ip line. Why only for x86 and amd64? The mongodb server depends on both little-endianness and unaligned memory access, which I believe means it can only work on i386 and amd64. We believe that the mongodb will be useful even it is not available for all Debian supported platforms. -- Rogério Brito , Fri, 12 Apr 2013 22:10:41 -0300 debian/gbp.conf0000664000000000000000000000015212306036552010607 0ustar [DEFAULT] pristine-tar = True [git-import-orig] filter = ['debian/*','lib/*'] filter-pristine-tar = True debian/patches/0000775000000000000000000000000012314750427010624 5ustar debian/patches/0001-Create-kfreebsd-like-linux-in-most-respects.patch0000664000000000000000000000174212306036641022502 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:15:18 -0500 Subject: Create kfreebsd like linux in most respects --- SConstruct | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 5fb0e83..f3ac3f9 100644 --- a/SConstruct +++ b/SConstruct @@ -344,6 +344,8 @@ libdeps.setup_environment( env ) if env['PYSYSPLATFORM'] == 'linux3': env['PYSYSPLATFORM'] = 'linux2' +if 'gnukfreebsd' in env['PYSYSPLATFORM']: + env['PYSYSPLATFORM'] = 'linux2' if 'freebsd' in env['PYSYSPLATFORM']: env['PYSYSPLATFORM'] = 'freebsd' @@ -524,7 +526,7 @@ if "darwin" == os.sys.platform: env.Append( EXTRACPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) ) env.Append( EXTRALIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) ) -elif os.sys.platform.startswith("linux"): +elif os.sys.platform.startswith("linux") or os.sys.platform.startswith("gnukfreebsd"): linux = True platform = "linux" debian/patches/0006-Fix-ARM-alignment-problems.patch0000664000000000000000000000404012306036641017162 0ustar From: Robie Basak Date: Sat, 20 Apr 2013 22:05:50 -0300 Subject: Fix ARM alignment problems This is a temporary workaround. We avoid double alignment issues by using memcpy to make sure that all doubles are aligned before accessing them. Last-Update: 2013-03-15 --- src/mongo/bson/bsonelement.h | 16 +++++++++++++++- src/mongo/db/key.cpp | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h index f094ab9..1ecb47f 100644 --- a/src/mongo/bson/bsonelement.h +++ b/src/mongo/bson/bsonelement.h @@ -17,7 +17,7 @@ #pragma once -#include // strlen +#include // strlen, memcpy #include #include @@ -529,13 +529,27 @@ namespace mongo { } inline double BSONElement::numberDouble() const { +#if defined(__arm__) + int int_result; + long long long_long_result; +#endif switch( type() ) { case NumberDouble: return _numberDouble(); case NumberInt: +#if defined(__arm__) + memcpy(&int_result, value(), sizeof(int_result)); + return int_result; +#else return *reinterpret_cast< const int* >( value() ); +#endif case NumberLong: +#if defined(__arm__) + memcpy(&long_long_result, value(), sizeof(long_long_result)); + return (double)long_long_result; +#else return (double) *reinterpret_cast< const long long* >( value() ); +#endif default: return 0; } diff --git a/src/mongo/db/key.cpp b/src/mongo/db/key.cpp index 3d9eaa7..95959d8 100644 --- a/src/mongo/db/key.cpp +++ b/src/mongo/db/key.cpp @@ -406,7 +406,7 @@ namespace mongo { p += 8; break; case cdouble: - b.append("", (double&) *p); + b.append("", (reinterpret_cast< const PackedDouble& >(*p)).d); p += sizeof(double); break; case cint: debian/patches/0009-ignore-unused-local-typedefs.patch0000664000000000000000000000227112306036641017726 0ustar Description: Disable unused-local-typedefs errors Disables new unused-local-typedefs as found in gcc 4.8 . Based on commit to trunk upstream. Author: James Page Origin: https://github.com/mongodb/mongo/commit/2d30f0b562c1925a52670e767c2c0222189fb8f0 --- a/SConstruct +++ b/SConstruct @@ -715,6 +715,7 @@ if nix: env.Append( CCFLAGS=["-Werror", "-pipe"] ) if not has_option('clang'): env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's + env.Append( CXXFLAGS=["-Wno-unused-local-typedefs"] ) # New in gcc 4.8 env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) --- a/src/third_party/v8/SConscript +++ b/src/third_party/v8/SConscript @@ -51,7 +51,8 @@ LIBRARY_FLAGS = { '-W', '-Wno-unused-parameter', '-Woverloaded-virtual', - '-Wnon-virtual-dtor'] + '-Wnon-virtual-dtor', + '-Wno-unused-local-typedefs'] }, 'mode:debug': { 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'], debian/patches/0008-Use-system-libstemmer.patch0000664000000000000000000000111212306036641016440 0ustar From: Antonin Kral Date: Wed, 17 Jul 2013 19:35:02 +0200 Subject: Use system libstemmer --- SConstruct | 1 - 1 file changed, 1 deletion(-) diff --git a/SConstruct b/SConstruct index f3ac3f9..2c888f3 100644 --- a/SConstruct +++ b/SConstruct @@ -802,7 +802,6 @@ if not use_system_version_of_library("boost"): CPPDEFINES=['BOOST_ALL_NO_LIB']) env.Prepend(CPPPATH=['$BUILD_DIR/third_party/s2']) -env.Prepend(CPPPATH=['$BUILD_DIR/third_party/libstemmer_c/include']) env.Append( CPPPATH=['$EXTRACPPPATH'], LIBPATH=['$EXTRALIBPATH'] ) debian/patches/0099-Pagesize-hacks.patch0000664000000000000000000000356012314750414015102 0ustar diff --git a/src/mongo/util/logfile.cpp b/src/mongo/util/logfile.cpp index fa53690..28562b2 100644 --- a/src/mongo/util/logfile.cpp +++ b/src/mongo/util/logfile.cpp @@ -26,6 +26,7 @@ #include "mongo/util/startup_test.h" #include "mongo/util/text.h" +#define PAGESIZE sysconf(_SC_PAGESIZE) using namespace mongoutils; @@ -36,16 +41,16 @@ namespace mongo { if( 0 && debug ) { try { LogFile f("logfile_test"); - void *p = malloc(16384); + void *p = malloc(4*PAGESIZE); char *buf = (char*) p; - buf += 4095; + buf += PAGESIZE - 1; buf = (char*) (((size_t)buf)&(~0xfff)); memset(buf, 'z', 8192); - buf[8190] = '\n'; - buf[8191] = 'B'; + buf[2 * PAGESIZE - 2] = '\n'; + buf[2 * PAGESIZE - 1] = 'B'; buf[0] = 'A'; - f.synchronousAppend(buf, 8192); - f.synchronousAppend(buf, 8192); + f.synchronousAppend(buf, 2 * PAGESIZE); + f.synchronousAppend(buf, 2 * PAGESIZE); free(p); } catch(DBException& e ) { @@ -226,7 +231,11 @@ namespace mongo { fassert( 16144, charsToWrite >= 0 ); fassert( 16142, _fd >= 0 ); - fassert( 16143, reinterpret_cast( buf ) % g_minOSPageSizeBytes == 0 ); // aligned + +// Disabling alignment test on PPC64 due to a 64kB page size on PPC64 instead of 4kB on x86 +#ifndef __PPC64__ + fassert( 16143, reinterpret_cast( buf ) % g_minOSPageSizeBytes == 0 ); // aligned +#endif #ifdef POSIX_FADV_DONTNEED const off_t pos = lseek(_fd, 0, SEEK_CUR); // doesn't actually seek, just get current position debian/patches/0001-Add-option-to-disable-javascript.patch0000664000000000000000000001244412306036641020407 0ustar Description: Add option to disable script integration Origin: https://github.com/mongodb/mongo/pull/591 --- a/SConscript.buildinfo +++ b/SConscript.buildinfo @@ -8,7 +8,7 @@ import sys import buildscripts.utils -Import('env windows usev8 usesm') +Import('env windows usev8') def getSysInfo(): if windows: @@ -41,8 +41,6 @@ def generate_buildinfo(env, target, sour if usev8: js_engine = "V8" - elif usesm: - js_engine = "SpiderMonkey" else: js_engine = "Unknown" --- a/SConstruct +++ b/SConstruct @@ -172,8 +172,7 @@ add_option( "asio" , "Use Asynchronous I add_option( "ssl" , "Enable SSL" , 0 , True ) # library choices -add_option( "usesm" , "use spider monkey for javascript" , 0 , True ) -add_option( "usev8" , "use v8 for javascript" , 0 , True ) +add_option( "disable-scripting" , "do not build support for javascript" , 0 , True ) # mongo feature options add_option( "noshell", "don't build shell" , 0 , True ) @@ -273,10 +272,10 @@ static = has_option( "static" ) debugBuild = has_option( "debugBuild" ) or has_option( "debugBuildAndLogging" ) debugLogging = has_option( "debugBuildAndLogging" ) -noshell = has_option( "noshell" ) -usesm = has_option( "usesm" ) -usev8 = has_option( "usev8" ) +disable_scripting = has_option( "disable-scripting" ) + +noshell = has_option( "noshell" ) asio = has_option( "asio" ) @@ -425,7 +424,9 @@ if boostVersion is None: else: boostVersion = "-" + boostVersion -if ( not ( usesm or usev8 or justClientLib) ): +if disable_scripting or justClientLib: + usev8 = False +else: usev8 = True options_topass["usev8"] = True @@ -768,9 +769,6 @@ if nix: print( "removing precompiled headers" ) os.unlink( env.File("$BUILD_DIR/mongo/pch.h.$GCHSUFFIX").abspath ) # gcc uses the file if it exists -if usesm: - env.Append( CPPDEFINES=["JS_C_STRINGS_ARE_UTF8"] ) - if "uname" in dir(os): hacks = buildscripts.findHacks( os.uname() ) if hacks is not None: @@ -1138,7 +1136,8 @@ Export("shellEnv") Export("testEnv") Export("has_option use_system_version_of_library") Export("installSetup") -Export("usesm usev8") +Export("usev8") +Export("disable_scripting") Export("darwin windows solaris linux freebsd nix") Export('module_sconscripts') Export("debugBuild") --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -6,11 +6,12 @@ import os import itertools from buildscripts import utils +Import("disable_scripting") Import("env") Import("shellEnv") Import("testEnv") Import("has_option") -Import("usesm usev8") +Import("usev8") Import("installSetup") Import("enforce_glibc") Import("darwin windows solaris linux nix") @@ -310,11 +311,7 @@ env.StaticLibrary('bson_template_evaluat env.CppUnitTest('bson_template_evaluator_test', ['scripting/bson_template_evaluator_test.cpp'], LIBDEPS=['bson_template_evaluator']) -if usesm: - env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_spidermonkey.cpp', - 'scripting/sm_db.cpp'], - LIBDEPS=['$BUILD_DIR/third_party/js-1.7/js', 'bson_template_evaluator']) -elif usev8: +if usev8: env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_v8.cpp', 'scripting/v8_db.cpp', 'scripting/v8_utils.cpp', @@ -676,7 +673,9 @@ env.StaticLibrary('mocklib', [ test = testEnv.Install( '#/', testEnv.Program("test", - [ f for f in Glob("dbtests/*.cpp") if not str(f).endswith('framework.cpp') ], + [ f for f in Glob("dbtests/*.cpp") + if not str(f).endswith('framework.cpp') and + not (str(f).endswith('jstests.cpp') and disable_scripting)], LIBDEPS = [ "mongocommon", "serveronly", --- a/src/mongo/scripting/engine_none.cpp +++ b/src/mongo/scripting/engine_none.cpp @@ -21,4 +21,8 @@ namespace mongo { void ScriptEngine::setup() { // noop } + + std::string ScriptEngine::getInterpreterVersionString() { + return "none"; + } } --- a/src/third_party/SConscript +++ b/src/third_party/SConscript @@ -1,6 +1,6 @@ # -*- mode: python -*- -Import("env use_system_version_of_library windows darwin usesm usev8") +Import("env use_system_version_of_library windows darwin usev8") env.SConscript( [ "murmurhash3/SConscript", @@ -34,18 +34,7 @@ else: env.SConscript('snappy/SConscript') env.StaticLibrary('shim_snappy', ['shim_snappy.cpp'], LIBDEPS=['snappy/snappy']) -if usesm: - if use_system_version_of_library("sm"): - env.StaticLibrary("shim_spidermonkey", ['shim_spidermonkey.cpp'], SYSLIBDEPS=['js']) - else: - if windows: - env.Append(CPPDEFINES=['XP_WIN']) - else: - env.Append(CPPDEFINES=['XP_UNIX']) - env.Append(CPPPATH='$BUILD_DIR/third_party/js-1.7') - env.SConscript('js-1.7/SConscript') - env.StaticLibrary('shim_spidermonkey', ['shim_spidermonkey.cpp'], LIBDEPS=['js-1.7/js']) -elif usev8: +if usev8: if use_system_version_of_library("v8"): env.StaticLibrary("shim_v8", ['shim_v8.cpp'], SYSLIBDEPS=['v8']) else: debian/patches/0011-Use-a-signed-char-to-store-BSONType-enumerations.patch0000664000000000000000000000256012306036641023241 0ustar From a1689790db10139d09c4fb29f500470564faabde Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Mon, 6 May 2013 23:01:56 +0100 Subject: [PATCH] SERVER-9680 Use a signed char to store BSONType enumerations MinKey is defined as -1, so a signed char must be used to store BSONType enumerations. Using a char to store a negative value results in undefined behaviour. On i386 and amd64 architectures it happens to work because on these platforms a char is generally signed, but this is not guaranteed. This fixes a build failure on ARM, where chars are unsigned by default, and using MinKey (defined as -1) results in a compiler error. --- src/mongo/bson/bson_validate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo/bson/bson_validate.cpp b/src/mongo/bson/bson_validate.cpp index 9ac0bcb..88e6d48 100644 --- a/src/mongo/bson/bson_validate.cpp +++ b/src/mongo/bson/bson_validate.cpp @@ -130,8 +130,8 @@ Status validateElementInfo(Buffer* buffer, ValidationState::State* nextState) { Status status = Status::OK(); - char type; - if ( !buffer->readNumber(&type) ) + signed char type; + if ( !buffer->readNumber(&type) ) return Status( ErrorCodes::InvalidBSON, "invalid bson" ); if ( type == EOO ) { -- 1.8.1.6 debian/patches/0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch0000664000000000000000000004073012306036641023220 0ustar From f625b0737634fa96ddfcf18d8316863ee1cf6cfa Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Tue, 10 Dec 2013 12:57:01 +0000 Subject: [PATCH 1/3] SERVER-12064 Atomic operations for gcc non-Intel architectures Add support for non-Intel architectures by using gcc builtins where possible, but only on non-Intel builds. This permits builds to continue to work on Intel architectures even with older gcc versions that do not have the builtins. atomic_intrinsics_gcc.h contains non-portable Intel assembly, so move it to atomic_intrinsics_gcc_intel.h and add an atomic_intrinsics_gcc_generic.h equivalent that uses only modern gcc builtins. Adjust atomic_intrinsics.h to use atomic_intrinsics_gcc_intel.h in the Intel case, and atomic_instrinsics_gcc_generic.h in an additional "otherwise" case. This does not change behaviour or compatibility in the common IA-32 and x86_64 cases. The previously existing code will continue to be used in these cases. An older gcc without the modern gcc builtins will continue to be able to build on these architectures because the previously existing assembly will be used. This does make this code fully portable to any architecture supported by a modern gcc, since the new, generic code will be used in this case. (cherry picked from commit 5c26dfa8330bb048fb929f8332f1424c4e3b431d) --- src/mongo/platform/atomic_intrinsics.h | 6 +- src/mongo/platform/atomic_intrinsics_gcc.h | 166 --------------------- src/mongo/platform/atomic_intrinsics_gcc_generic.h | 70 +++++++++ src/mongo/platform/atomic_intrinsics_gcc_intel.h | 166 +++++++++++++++++++++ 4 files changed, 241 insertions(+), 167 deletions(-) delete mode 100644 src/mongo/platform/atomic_intrinsics_gcc.h create mode 100644 src/mongo/platform/atomic_intrinsics_gcc_generic.h create mode 100644 src/mongo/platform/atomic_intrinsics_gcc_intel.h diff --git a/src/mongo/platform/atomic_intrinsics.h b/src/mongo/platform/atomic_intrinsics.h index cee70db..23b7b6b 100644 --- a/src/mongo/platform/atomic_intrinsics.h +++ b/src/mongo/platform/atomic_intrinsics.h @@ -43,7 +43,11 @@ #if defined(_WIN32) #include "mongo/platform/atomic_intrinsics_win32.h" #elif defined(__GNUC__) -#include "mongo/platform/atomic_intrinsics_gcc.h" +#if defined(__i386__) || defined(__x86_64__) +#include "mongo/platform/atomic_intrinsics_gcc_intel.h" +#else +#include "mongo/platform/atomic_intrinsics_gcc_generic.h" +#endif #else #error "Unsupported os/compiler family" #endif diff --git a/src/mongo/platform/atomic_intrinsics_gcc.h b/src/mongo/platform/atomic_intrinsics_gcc.h deleted file mode 100644 index f8f96f0..0000000 --- a/src/mongo/platform/atomic_intrinsics_gcc.h +++ /dev/null @@ -1,166 +0,0 @@ -/* Copyright 2012 10gen Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Implementation of the AtomicIntrinsics::* operations for IA-32 and AMD64 systems using a - * GCC-compatible compiler toolchain. - */ - -#pragma once - -#include - -namespace mongo { - - /** - * Instantiation of AtomicIntrinsics<> for all word types T where sizeof <= sizeof(void *). - * - * On 32-bit systems, this handles 8-, 16- and 32-bit word types. On 64-bit systems, - * it handles 8-, 16, 32- and 64-bit types. - */ - template - class AtomicIntrinsics { - public: - - static T compareAndSwap(volatile T* dest, T expected, T newValue) { - - T result; - asm volatile ("lock cmpxchg %[src], %[dest]" - : [dest] "+m" (*dest), - "=a" (result) - : [src] "r" (newValue), - "a" (expected) - : "memory", "cc"); - return result; - } - - static T swap(volatile T* dest, T newValue) { - - T result = newValue; - // No need for "lock" prefix on "xchg". - asm volatile ("xchg %[r], %[dest]" - : [dest] "+m" (*dest), - [r] "+r" (result) - : - : "memory"); - return result; - } - - static T load(volatile const T* value) { - asm volatile ("mfence" ::: "memory"); - T result = *value; - asm volatile ("mfence" ::: "memory"); - return result; - } - - static T loadRelaxed(volatile const T* value) { - return *value; - } - - static void store(volatile T* dest, T newValue) { - asm volatile ("mfence" ::: "memory"); - *dest = newValue; - asm volatile ("mfence" ::: "memory"); - } - - static T fetchAndAdd(volatile T* dest, T increment) { - - T result = increment; - asm volatile ("lock xadd %[src], %[dest]" - : [dest] "+m" (*dest), - [src] "+r" (result) - : - : "memory", "cc"); - return result; - } - - private: - AtomicIntrinsics(); - ~AtomicIntrinsics(); - }; - - /** - * Instantiation of AtomicIntrinsics where sizeof exceeds sizeof(void*). - * - * On 32-bit systems, this handles the 64-bit word type. Not used on 64-bit systems. - * - * Note that the implementations of swap, store and fetchAndAdd spin until they succeed. This - * implementation is thread-safe, but may have poor performance in high-contention environments. - * However, no superior solution exists for IA-32 (32-bit x86) systems. - */ - template - class AtomicIntrinsics::type> { - public: - static T compareAndSwap(volatile T* dest, T expected, T newValue) { - T result = expected; - asm volatile ("push %%eax\n" - "push %%ebx\n" - "push %%ecx\n" - "push %%edx\n" - "mov (%%edx), %%ebx\n" - "mov 4(%%edx), %%ecx\n" - "mov (%%edi), %%eax\n" - "mov 4(%%edi), %%edx\n" - "lock cmpxchg8b (%%esi)\n" - "mov %%eax, (%%edi)\n" - "mov %%edx, 4(%%edi)\n" - "pop %%edx\n" - "pop %%ecx\n" - "pop %%ebx\n" - "pop %%eax\n" - : - : "S" (dest), - "D" (&result), - "d" (&newValue) - : "memory", "cc"); - return result; - } - - static T swap(volatile T* dest, T newValue) { - - T expected; - T actual; - do { - expected = *dest; - actual = compareAndSwap(dest, expected, newValue); - } while (actual != expected); - return actual; - } - - static T load(volatile const T* value) { - return compareAndSwap(const_cast(value), T(0), T(0)); - } - - static void store(volatile T* dest, T newValue) { - swap(dest, newValue); - } - - static T fetchAndAdd(volatile T* dest, T increment) { - - T expected; - T actual; - do { - expected = load(dest); - actual = compareAndSwap(dest, expected, expected + increment); - } while (actual != expected); - return actual; - } - - private: - AtomicIntrinsics(); - ~AtomicIntrinsics(); - }; - -} // namespace mongo diff --git a/src/mongo/platform/atomic_intrinsics_gcc_generic.h b/src/mongo/platform/atomic_intrinsics_gcc_generic.h new file mode 100644 index 0000000..64a2499 --- /dev/null +++ b/src/mongo/platform/atomic_intrinsics_gcc_generic.h @@ -0,0 +1,70 @@ +/* Copyright 2012 10gen Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Implementation of the AtomicIntrinsics::* operations for systems on any + * architecture using a new enough GCC-compatible compiler toolchain. + */ + +#pragma once + +#include + +namespace mongo { + + /** + * Instantiation of AtomicIntrinsics<> for all word types T. + */ + template + class AtomicIntrinsics { + public: + + static T compareAndSwap(volatile T* dest, T expected, T newValue) { + __atomic_compare_exchange(dest, &expected, &newValue, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); + return expected; + } + + static T swap(volatile T* dest, T newValue) { + T result; + __atomic_exchange(dest, &newValue, &result, __ATOMIC_SEQ_CST); + return result; + } + + static T load(volatile const T* value) { + T result; + __atomic_load(value, &result, __ATOMIC_SEQ_CST); + return result; + } + + static T loadRelaxed(volatile const T* value) { + T result; + __atomic_load(value, &result, __ATOMIC_RELAXED); + return result; + } + + static void store(volatile T* dest, T newValue) { + __atomic_store(dest, &newValue, __ATOMIC_SEQ_CST); + } + + static T fetchAndAdd(volatile T* dest, T increment) { + return __atomic_fetch_add(dest, increment, __ATOMIC_SEQ_CST); + } + + private: + AtomicIntrinsics(); + ~AtomicIntrinsics(); + }; + +} // namespace mongo diff --git a/src/mongo/platform/atomic_intrinsics_gcc_intel.h b/src/mongo/platform/atomic_intrinsics_gcc_intel.h new file mode 100644 index 0000000..f8f96f0 --- /dev/null +++ b/src/mongo/platform/atomic_intrinsics_gcc_intel.h @@ -0,0 +1,166 @@ +/* Copyright 2012 10gen Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Implementation of the AtomicIntrinsics::* operations for IA-32 and AMD64 systems using a + * GCC-compatible compiler toolchain. + */ + +#pragma once + +#include + +namespace mongo { + + /** + * Instantiation of AtomicIntrinsics<> for all word types T where sizeof <= sizeof(void *). + * + * On 32-bit systems, this handles 8-, 16- and 32-bit word types. On 64-bit systems, + * it handles 8-, 16, 32- and 64-bit types. + */ + template + class AtomicIntrinsics { + public: + + static T compareAndSwap(volatile T* dest, T expected, T newValue) { + + T result; + asm volatile ("lock cmpxchg %[src], %[dest]" + : [dest] "+m" (*dest), + "=a" (result) + : [src] "r" (newValue), + "a" (expected) + : "memory", "cc"); + return result; + } + + static T swap(volatile T* dest, T newValue) { + + T result = newValue; + // No need for "lock" prefix on "xchg". + asm volatile ("xchg %[r], %[dest]" + : [dest] "+m" (*dest), + [r] "+r" (result) + : + : "memory"); + return result; + } + + static T load(volatile const T* value) { + asm volatile ("mfence" ::: "memory"); + T result = *value; + asm volatile ("mfence" ::: "memory"); + return result; + } + + static T loadRelaxed(volatile const T* value) { + return *value; + } + + static void store(volatile T* dest, T newValue) { + asm volatile ("mfence" ::: "memory"); + *dest = newValue; + asm volatile ("mfence" ::: "memory"); + } + + static T fetchAndAdd(volatile T* dest, T increment) { + + T result = increment; + asm volatile ("lock xadd %[src], %[dest]" + : [dest] "+m" (*dest), + [src] "+r" (result) + : + : "memory", "cc"); + return result; + } + + private: + AtomicIntrinsics(); + ~AtomicIntrinsics(); + }; + + /** + * Instantiation of AtomicIntrinsics where sizeof exceeds sizeof(void*). + * + * On 32-bit systems, this handles the 64-bit word type. Not used on 64-bit systems. + * + * Note that the implementations of swap, store and fetchAndAdd spin until they succeed. This + * implementation is thread-safe, but may have poor performance in high-contention environments. + * However, no superior solution exists for IA-32 (32-bit x86) systems. + */ + template + class AtomicIntrinsics::type> { + public: + static T compareAndSwap(volatile T* dest, T expected, T newValue) { + T result = expected; + asm volatile ("push %%eax\n" + "push %%ebx\n" + "push %%ecx\n" + "push %%edx\n" + "mov (%%edx), %%ebx\n" + "mov 4(%%edx), %%ecx\n" + "mov (%%edi), %%eax\n" + "mov 4(%%edi), %%edx\n" + "lock cmpxchg8b (%%esi)\n" + "mov %%eax, (%%edi)\n" + "mov %%edx, 4(%%edi)\n" + "pop %%edx\n" + "pop %%ecx\n" + "pop %%ebx\n" + "pop %%eax\n" + : + : "S" (dest), + "D" (&result), + "d" (&newValue) + : "memory", "cc"); + return result; + } + + static T swap(volatile T* dest, T newValue) { + + T expected; + T actual; + do { + expected = *dest; + actual = compareAndSwap(dest, expected, newValue); + } while (actual != expected); + return actual; + } + + static T load(volatile const T* value) { + return compareAndSwap(const_cast(value), T(0), T(0)); + } + + static void store(volatile T* dest, T newValue) { + swap(dest, newValue); + } + + static T fetchAndAdd(volatile T* dest, T increment) { + + T expected; + T actual; + do { + expected = load(dest); + actual = compareAndSwap(dest, expected, expected + increment); + } while (actual != expected); + return actual; + } + + private: + AtomicIntrinsics(); + ~AtomicIntrinsics(); + }; + +} // namespace mongo -- 1.8.5.2 debian/patches/0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch0000664000000000000000000000206412306036641021140 0ustar From 2baec7b9f63ada09dcb1488290064685e83d9d16 Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Tue, 10 Dec 2013 14:05:01 +0000 Subject: [PATCH 2/3] SERVER-12065 Support ARM and AArch64 builds Detect platforms that define __arm__ and __aarch64__ as 32-bit and 64-bit platforms respectively. (cherry picked from commit c777d0f6a803d3d1b6390fc2cb85d7c13318f030) --- src/mongo/platform/bits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo/platform/bits.h b/src/mongo/platform/bits.h index 7afc428..860bfbd 100644 --- a/src/mongo/platform/bits.h +++ b/src/mongo/platform/bits.h @@ -19,9 +19,9 @@ // figure out if we're on a 64 or 32 bit system -#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) +#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) || defined(__aarch64__) #define MONGO_PLATFORM_64 -#elif defined(__i386__) || defined(_WIN32) +#elif defined(__i386__) || defined(_WIN32) || defined(__arm__) #define MONGO_PLATFORM_32 #else #error "unknown platform" -- 1.8.5.2 debian/patches/0004-Support-ppc64el-builds.patch0000664000000000000000000000110212306036641016423 0ustar Description: Add support for detection of powerpc64 platform Author: James Page Forwarded: no --- a/src/mongo/platform/bits.h +++ b/src/mongo/platform/bits.h @@ -19,7 +19,7 @@ // figure out if we're on a 64 or 32 bit system -#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) || defined(__aarch64__) || defined(__powerpc64__) #define MONGO_PLATFORM_64 #elif defined(__i386__) || defined(_WIN32) || defined(__arm__) #define MONGO_PLATFORM_32 debian/patches/0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch0000664000000000000000000000145512306036641022722 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:16:31 -0500 Subject: All platforms but Windows find hash in std::tr1 --- src/third_party/s2/hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/third_party/s2/hash.h b/src/third_party/s2/hash.h index a255f2c..d399bb8 100644 --- a/src/third_party/s2/hash.h +++ b/src/third_party/s2/hash.h @@ -7,10 +7,10 @@ #include "mongo/platform/unordered_set.h" #define hash_set mongo::unordered_set -#if defined OS_LINUX || defined OS_MACOSX || defined __sunos__ || defined __freebsd__ +#if ! defined OS_WINDOWS #define HASH_NAMESPACE_START namespace std { namespace tr1 { #define HASH_NAMESPACE_END }} -#elif defined OS_WINDOWS +#else #define HASH_NAMESPACE_START namespace std { #define HASH_NAMESPACE_END } #endif debian/patches/0007-Use-TIME_UTC_-macro.patch0000664000000000000000000000126512306036641015472 0ustar From: Antonin Kral Date: Wed, 17 Jul 2013 17:07:36 +0200 Subject: Use TIME_UTC_ macro --- src/mongo/util/time_support.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/mongo/util/time_support.h b/src/mongo/util/time_support.h index 47c7d87..9df70e1 100644 --- a/src/mongo/util/time_support.h +++ b/src/mongo/util/time_support.h @@ -96,10 +96,6 @@ namespace mongo { struct tm *gmtime(const time_t *timep); struct tm *localtime(const time_t *timep); -#if defined(MONGO_BOOST_TIME_UTC_HACK) || (BOOST_VERSION >= 105000) #define MONGO_BOOST_TIME_UTC boost::TIME_UTC_ -#else -#define MONGO_BOOST_TIME_UTC boost::TIME_UTC -#endif } // namespace mongo debian/patches/0002-kfreebsd-has-dev-urandom.patch0000664000000000000000000000131112306036641016771 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:16:19 -0500 Subject: kfreebsd has /dev/urandom --- src/mongo/platform/random.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongo/platform/random.cpp b/src/mongo/platform/random.cpp index d1a620d..04f2826 100644 --- a/src/mongo/platform/random.cpp +++ b/src/mongo/platform/random.cpp @@ -105,7 +105,7 @@ namespace mongo { return new WinSecureRandom(); } -#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) class InputStreamSecureRandom : public SecureRandom { public: debian/patches/series0000664000000000000000000000126212314750427012042 0ustar 0001-Create-kfreebsd-like-linux-in-most-respects.patch 0002-kfreebsd-has-dev-urandom.patch 0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch 0004-kfreebsd-does-not-have-sys-prctl.h.patch 0006-Fix-ARM-alignment-problems.patch 0007-Use-TIME_UTC_-macro.patch 0008-Use-system-libstemmer.patch 0009-ignore-unused-local-typedefs.patch 0010-fix-integer-signs.patch 0011-Use-a-signed-char-to-store-BSONType-enumerations.patch # Added for arm64 and ppc64el enablement 0001-Add-option-to-disable-javascript.patch 0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch 0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch 0004-Support-ppc64el-builds.patch 0099-Pagesize-hacks.patch debian/patches/0004-kfreebsd-does-not-have-sys-prctl.h.patch0000664000000000000000000000160512306036641020644 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:16:47 -0500 Subject: kfreebsd does not have MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change was reviewed by Pino Toscano in: https://github.com/rbrito/mongo-debian/pull/2/files#r3884772 and edited by Rogério Theodoro de Brito accordingly. --- src/third_party/v8/src/platform-linux.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/third_party/v8/src/platform-linux.cc b/src/third_party/v8/src/platform-linux.cc index 5da9000..61ed5de 100644 --- a/src/third_party/v8/src/platform-linux.cc +++ b/src/third_party/v8/src/platform-linux.cc @@ -31,7 +31,9 @@ #include #include #include +#ifdef __linux__ #include +#endif #include #include #include debian/patches/0010-fix-integer-signs.patch0000664000000000000000000000500512306036641015561 0ustar Description: make ints unsigned to match boost library argc should be unsigned everywhere, negative values have no sense Author: Laszlo Boszormenyi (GCS) Bug-Debian: http://bugs.debian.org/724100 Last-Update: 2013-10-13 --- --- mongodb-2.4.6.orig/src/mongo/db/auth/privilege_set.cpp +++ mongodb-2.4.6/src/mongo/db/auth/privilege_set.cpp @@ -79,7 +79,7 @@ namespace mongo { resourceSearchList[1] = nsToDatabaseSubstring(desiredPrivilege.getResource()); ActionSet unmetRequirements = desiredPrivilege.getActions(); - for (int i = 0; i < boost::size(resourceSearchList); ++i) { + for (unsigned int i = 0; i < boost::size(resourceSearchList); ++i) { ResourcePrivilegeCacheEntry* entry = _lookupEntry(resourceSearchList[i]); if (NULL == entry) continue; --- mongodb-2.4.6.orig/src/mongo/db/cmdline_test.cpp +++ mongodb-2.4.6/src/mongo/db/cmdline_test.cpp @@ -71,7 +71,7 @@ namespace { "KEEP", "--servicePasswordFake=KEEP" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); testCensoringArgv(argv, argv, argc); } @@ -88,7 +88,7 @@ namespace { "--servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first", @@ -120,7 +120,7 @@ namespace { "-servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first", @@ -152,7 +152,7 @@ namespace { "KEEP", "--servicePasswordFake=KEEP" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); testCensoringVector(argv, argv, argc); } @@ -169,7 +169,7 @@ namespace { "--servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first", @@ -201,7 +201,7 @@ namespace { "-servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first", debian/mongodb-server.postrm0000664000000000000000000000170212306036552013371 0ustar #!/bin/sh # postrm script for mongodb # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) rm -rf /var/run/mongodb ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/mongodb-server.prerm0000664000000000000000000000157612306036552013203 0ustar #!/bin/sh # prerm script for mongodb # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package echo "arg: $1" case "$1" in remove|upgrade|deconfigure) ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0