From ea92f7b1723b2eae947ae46cdf198457b16ff6e1 Mon Sep 17 00:00:00 2001 From: Joseph Dougherty Date: Wed, 14 Jul 2021 15:57:53 -0400 Subject: [PATCH] DOCS-17576 replaces links to mongosh with binary links --- source/administration/configuration.txt | 2 +- source/administration/monitoring.txt | 4 +- .../security/appendixA-openssl-ca.txt | 2 +- .../security/appendixC-openssl-client.txt | 2 +- source/changeStreams.txt | 6 +- source/core/authentication-mechanisms.txt | 2 +- source/core/capped-collections.txt | 2 +- source/core/databases-and-collections.txt | 4 +- source/core/gridfs.txt | 4 +- source/core/hashed-sharding.txt | 2 +- source/core/index-creation.txt | 2 +- source/core/index-hashed.txt | 4 +- source/core/index-hidden.txt | 4 +- source/core/index-sparse.txt | 2 +- source/core/index-ttl.txt | 2 +- source/core/index-unique.txt | 4 +- source/core/kerberos.txt | 2 +- source/core/query-optimization.txt | 2 +- .../read-isolation-consistency-recency.txt | 2 +- source/core/read-preference-hedge-option.txt | 4 +- source/core/read-preference.txt | 2 +- source/core/retryable-reads.txt | 2 +- source/core/retryable-writes.txt | 6 +- ...urity-automatic-client-side-encryption.txt | 10 +-- ...-client-side-encryption-key-management.txt | 12 ++-- .../core/security-client-side-encryption.txt | 10 +-- ...curity-explicit-client-side-encryption.txt | 12 ++-- source/core/security-ldap-external.txt | 4 +- source/core/server-side-javascript.txt | 8 +-- .../core/sharded-cluster-config-servers.txt | 2 +- source/core/sharded-cluster-query-router.txt | 2 +- source/core/sharded-cluster-shards.txt | 2 +- source/core/sharding-shard-a-collection.txt | 2 +- ...igrate-data-into-timeseries-collection.txt | 2 +- source/core/transactions-in-applications.txt | 4 +- source/core/transactions.txt | 2 +- source/core/zone-sharding.txt | 2 +- source/faq/sharding.txt | 2 +- source/faq/storage.txt | 4 +- .../includes/4.4-downgrade-clean-shutdown.rst | 2 +- .../driver-example-indexes-2.rst | 2 +- .../driver-example-query-intro.rst | 2 +- .../driver-list-database-indexes-tabs.rst | 4 +- source/includes/extracts-changestream.yaml | 2 +- ...ts-client-side-field-level-encryption.yaml | 2 +- ...racts-concurrency-consistency-recency.yaml | 2 +- .../extracts-gle-methods-behavior.yaml | 2 +- .../extracts-macos-prevent-from-launch.yaml | 2 +- ...-mongo-shell-deprecated-meta-operator.yaml | 4 +- source/includes/extracts-run-from-cmd.yaml | 2 +- source/includes/extracts-sessions.yaml | 4 +- source/includes/extracts-ssl-facts.yaml | 12 ++-- source/includes/extracts-tls-facts.yaml | 12 ++-- source/includes/extracts-transactions.yaml | 2 +- source/includes/fact-authenticate.rst | 4 +- .../includes/fact-change-database-context.rst | 4 +- source/includes/fact-collation-driver.rst | 2 +- source/includes/fact-create-text-index.rst | 2 +- .../includes/fact-createkey-returns-uuid.rst | 2 +- source/includes/fact-currentop.rst | 2 +- source/includes/fact-default-bind-ip.rst | 2 +- .../fact-execute-javascript-from-shell.rst | 8 +-- .../fact-explain-methods-differences.rst | 4 +- ...oup-map-reduce-where-limitations-in-24.rst | 2 +- .../includes/fact-group-sales-documents.rst | 2 +- source/includes/fact-mongo-prompt-size.rst | 2 +- .../fact-mongosh-shell-method-toc.rst | 4 +- source/includes/fact-mongosh-shell-method.rst | 4 +- .../fact-networkMessageCompressors.rst | 8 +-- .../fact-type-fidelity-loss-example.rst | 2 +- .../fact-update-example-docs-intro.rst | 2 +- source/includes/initiate-replica-set.rst | 2 +- .../list-mongodb-enterprise-packages.rst | 2 +- source/includes/list-mongodb-org-packages.rst | 2 +- ...th-methods-excluded-from-shell-history.rst | 2 +- .../note-method-does-not-return-json.rst | 2 +- ...go-shell-automatically-iterates-cursor.rst | 4 +- .../includes/steps-5.0-downgrade-mongod.yaml | 2 +- .../steps-5.0-downgrade-replica-set.yaml | 6 +- .../steps-5.0-downgrade-sharded-cluster.yaml | 20 +++--- .../steps-5.0-upgrade-replica-set.yaml | 2 +- .../steps-5.0-upgrade-sharded-cluster.yaml | 12 ++-- ...ps-adjust-replica-set-member-priority.yaml | 2 +- .../steps-authenticate-as-client.yaml | 2 +- .../steps-authenticate-through-ldap.yaml | 2 +- ...backup-sharded-cluster-with-snapshots.yaml | 14 ++--- .../steps-backup-sharded-clusters-dumps.yaml | 14 ++--- .../steps-backup-without-journaling.yaml | 4 +- ...e-own-password-and-custom-data-prereq.yaml | 2 +- ...s-change-own-password-and-custom-data.yaml | 2 +- .../steps-change-replica-set-wiredtiger.yaml | 2 +- .../steps-clear-jumbo-flag-command.yaml | 2 +- .../steps-clear-jumbo-flag-preferred.yaml | 2 +- .../steps-clear-jumbo-flag-refine-key.yaml | 2 +- source/includes/steps-clear-jumbo-flag.yaml | 4 +- .../steps-configure-ldap-mongodb.yaml | 2 +- ...p-sasl-activedirectory-authentication.yaml | 6 +- ...ps-configure-secondary-only-rs-member.yaml | 2 +- ...-windows-with-kerberos-authentication.yaml | 2 +- ...-mongodb-with-kerberos-authentication.yaml | 8 +-- ...eps-convert-replica-set-add-new-shard.yaml | 8 +-- ...steps-convert-replica-set-shard-aware.yaml | 4 +- ...plica-set-shard-deploy-infrastructure.yaml | 2 +- ...eate-admin-then-enable-authentication.yaml | 28 ++++----- .../steps-csfle-shell-aws-create-key.yaml | 12 ++-- .../steps-csfle-shell-azure-create-key.yaml | 12 ++-- .../steps-csfle-shell-gcp-create-key.yaml | 12 ++-- .../steps-csfle-shell-local-create-key.yaml | 12 ++-- ...cally-distributed-replica-set-5member.yaml | 2 +- .../steps-deploy-replica-set-with-auth.yaml | 10 +-- source/includes/steps-deploy-replica-set.yaml | 8 +-- ...-sharded-cluster-config-server-noauth.yaml | 4 +- .../steps-deploy-sharded-cluster-connect.yaml | 4 +- ...-sharded-cluster-shard-replica-noauth.yaml | 2 +- ...entication-in-replica-set-no-downtime.yaml | 14 ++--- ...-enable-authentication-in-replica-set.yaml | 8 +-- ...cation-in-shardcluster-nodowntime-uac.yaml | 2 +- ...ble-authentication-in-sharded-cluster.yaml | 16 ++--- ...s-kerberos-auth-activedirectory-authz.yaml | 12 ++-- source/includes/steps-log-rotate-rename.yaml | 2 +- .../steps-modify-psa-replica-set-safely.yaml | 2 +- ...intenance-task-on-replica-set-members.yaml | 12 ++-- .../steps-replace-disabled-config-server.yaml | 4 +- .../steps-restore-primary-from-backup.yaml | 4 +- ...estore-secondary-from-backup-directly.yaml | 2 +- .../steps-run-mongodb-on-linux-tarball.yaml | 8 +-- .../includes/steps-run-mongodb-on-linux.yaml | 8 +-- source/includes/steps-run-mongodb-on-osx.yaml | 8 +-- .../steps-schedule-balancer-window.yaml | 2 +- .../steps-shard-a-collection-ranged.yaml | 2 +- ...teps-test-generate-multiple-documents.yaml | 6 +- .../steps-upgrade-enterprise-replica-set.yaml | 2 +- ...ps-upgrade-enterprise-sharded-cluster.yaml | 12 ++-- source/reference.txt | 2 +- source/reference/bson-types.txt | 6 +- source/reference/command.txt | 2 +- .../command/abortReshardCollection.txt | 2 +- source/reference/command/abortTransaction.txt | 2 +- source/reference/command/addShardToZone.txt | 2 +- source/reference/command/aggregate.txt | 6 +- source/reference/command/authenticate.txt | 2 +- .../command/balancerCollectionStatus.txt | 2 +- source/reference/command/buildInfo.txt | 2 +- .../command/commitReshardCollection.txt | 2 +- .../reference/command/commitTransaction.txt | 2 +- source/reference/command/count.txt | 2 +- source/reference/command/createIndexes.txt | 6 +- source/reference/command/currentOp.txt | 4 +- source/reference/command/dbStats.txt | 2 +- source/reference/command/delete.txt | 2 +- source/reference/command/drop.txt | 2 +- .../command/dropAllUsersFromDatabase.txt | 2 +- source/reference/command/dropDatabase.txt | 4 +- source/reference/command/dropIndexes.txt | 2 +- source/reference/command/dropUser.txt | 2 +- source/reference/command/enableSharding.txt | 2 +- source/reference/command/find.txt | 6 +- source/reference/command/findAndModify.txt | 4 +- source/reference/command/fsync.txt | 4 +- source/reference/command/fsyncUnlock.txt | 2 +- .../command/getFreeMonitoringStatus.txt | 2 +- source/reference/command/getLog.txt | 8 +-- source/reference/command/hello.txt | 2 +- source/reference/command/hostInfo.txt | 2 +- source/reference/command/killOp.txt | 2 +- source/reference/command/listCollections.txt | 2 +- source/reference/command/listDatabases.txt | 2 +- source/reference/command/listIndexes.txt | 2 +- source/reference/command/mapReduce.txt | 2 +- source/reference/command/reIndex.txt | 2 +- source/reference/command/removeShard.txt | 2 +- .../reference/command/removeShardFromZone.txt | 2 +- source/reference/command/renameCollection.txt | 2 +- source/reference/command/replSetGetConfig.txt | 4 +- source/reference/command/replSetGetStatus.txt | 4 +- .../reference/command/replSetResizeOplog.txt | 4 +- .../reference/command/reshardCollection.txt | 2 +- source/reference/command/serverStatus.txt | 2 +- .../reference/command/setFreeMonitoring.txt | 2 +- source/reference/command/shutdown.txt | 2 +- source/reference/command/splitChunk.txt | 2 +- source/reference/command/top.txt | 2 +- source/reference/command/update.txt | 2 +- .../reference/command/updateZoneKeyRange.txt | 2 +- source/reference/command/usersInfo.txt | 4 +- source/reference/command/validate.txt | 2 +- source/reference/config-database.txt | 4 +- source/reference/configuration-options.txt | 8 +-- source/reference/connection-string.txt | 22 +++---- source/reference/glossary.txt | 6 +- source/reference/limits.txt | 4 +- source/reference/local-database.txt | 2 +- source/reference/log-messages.txt | 10 +-- source/reference/method.txt | 14 ++--- source/reference/method/Date.txt | 6 +- source/reference/method/Mongo.getDB.txt | 2 +- .../method/Mongo.setCausalConsistency.txt | 4 +- .../reference/method/Mongo.startSession.txt | 6 +- source/reference/method/Mongo.txt | 16 ++--- source/reference/method/Mongo.watch.txt | 2 +- source/reference/method/ObjectId.toString.txt | 2 +- source/reference/method/Session.txt | 8 +-- source/reference/method/SessionOptions.txt | 10 +-- source/reference/method/UUID.txt | 4 +- .../WriteResult.hasWriteConcernError.txt | 2 +- .../method/WriteResult.hasWriteError.txt | 2 +- source/reference/method/WriteResult.txt | 2 +- source/reference/method/cd.txt | 4 +- source/reference/method/cursor.addOption.txt | 4 +- source/reference/method/cursor.batchSize.txt | 4 +- source/reference/method/db.auth.txt | 6 +- .../method/db.changeUserPassword.txt | 2 +- .../method/db.collection.aggregate.txt | 6 +- .../method/db.collection.createIndex.txt | 2 +- .../method/db.collection.createIndexes.txt | 2 +- .../method/db.collection.deleteMany.txt | 2 +- .../method/db.collection.deleteOne.txt | 2 +- .../method/db.collection.explain.txt | 4 +- .../reference/method/db.collection.find.txt | 6 +- .../method/db.collection.latencyStats.txt | 2 +- .../reference/method/db.collection.update.txt | 10 +-- source/reference/method/db.copyDatabase.txt | 2 +- .../method/db.disableFreeMonitoring.txt | 2 +- source/reference/method/db.dropDatabase.txt | 2 +- .../method/db.enableFreeMonitoring.txt | 2 +- source/reference/method/db.getCollection.txt | 2 +- .../method/db.getFreeMonitoringStatus.txt | 2 +- source/reference/method/db.getMongo.txt | 4 +- source/reference/method/db.getSiblingDB.txt | 2 +- source/reference/method/db.hostInfo.txt | 2 +- source/reference/method/db.shutdownServer.txt | 2 +- source/reference/method/db.watch.txt | 2 +- source/reference/method/getHostName.txt | 2 +- source/reference/method/hostname.txt | 2 +- source/reference/method/isInteractive.txt | 16 ++--- source/reference/method/isWindows.txt | 2 +- .../js-client-side-field-level-encryption.txt | 2 +- source/reference/method/js-database.txt | 2 +- source/reference/method/js-native.txt | 10 +-- .../reference/method/js-user-management.txt | 2 +- source/reference/method/listFiles.txt | 2 +- source/reference/method/load.txt | 2 +- source/reference/method/md5sumFile.txt | 2 +- source/reference/method/mkdir.txt | 2 +- source/reference/method/passwordPrompt.txt | 2 +- source/reference/method/rs.add.txt | 4 +- source/reference/method/rs.initiate.txt | 2 +- source/reference/method/rs.reconfig.txt | 2 +- .../reference/method/rs.reconfigForPSASet.txt | 2 +- source/reference/method/rs.status.txt | 4 +- source/reference/method/rs.syncFrom.txt | 2 +- source/reference/method/setVerboseShell.txt | 6 +- .../method/sh.abortReshardCollection.txt | 2 +- .../method/sh.balancerCollectionStatus.txt | 2 +- .../method/sh.commitReshardCollection.txt | 2 +- .../reference/method/sh.disableAutoSplit.txt | 2 +- .../reference/method/sh.enableAutoSplit.txt | 2 +- source/reference/method/sh.enableSharding.txt | 2 +- .../reference/method/sh.shardCollection.txt | 2 +- source/reference/method/sleep.txt | 2 +- source/reference/method/version.txt | 2 +- source/reference/mongo.txt | 4 +- source/reference/mongodb-extended-json.txt | 2 +- .../operator/aggregation/accumulator.txt | 6 +- .../operator/aggregation/binarySize.txt | 2 +- .../operator/aggregation/bsonSize.txt | 2 +- .../reference/operator/aggregation/bucket.txt | 4 +- .../operator/aggregation/currentOp.txt | 4 +- .../aggregation/first-array-element.txt | 2 +- .../reference/operator/aggregation/group.txt | 2 +- .../aggregation/last-array-element.txt | 2 +- source/reference/operator/aggregation/map.txt | 6 +- .../reference/operator/aggregation/redact.txt | 2 +- .../reference/operator/aggregation/unwind.txt | 8 +-- source/reference/operator/meta/explain.txt | 2 +- source/reference/operator/meta/hint.txt | 2 +- source/reference/operator/meta/max.txt | 4 +- source/reference/operator/meta/maxTimeMS.txt | 2 +- source/reference/operator/meta/min.txt | 4 +- source/reference/operator/meta/orderby.txt | 2 +- source/reference/operator/meta/query.txt | 2 +- .../reference/operator/meta/showDiskLoc.txt | 2 +- source/reference/operator/update/bit.txt | 4 +- source/reference/parameters.txt | 18 +++--- source/reference/program.txt | 2 +- source/reference/program/mongo.txt | 2 +- source/reference/program/mongod.txt | 2 +- source/reference/program/mongokerberos.txt | 4 +- source/reference/program/mongos.txt | 2 +- source/reference/read-concern.txt | 2 +- .../replica-set-protocol-versions.txt | 4 +- ...rity-client-side-automatic-json-schema.txt | 6 +- ...curity-client-side-encryption-appendix.txt | 2 +- source/reference/security.txt | 4 +- source/reference/sql-comparison.txt | 2 +- source/release-notes/5.0-compatibility.txt | 4 +- source/release-notes/5.0.txt | 4 +- source/sharding.txt | 2 +- .../tutorial/add-shards-to-shard-cluster.txt | 2 +- .../aggregation-zip-code-data-set.txt | 4 +- .../build-indexes-on-replica-sets.txt | 4 +- .../build-indexes-on-sharded-clusters.txt | 10 +-- .../change-hostnames-in-a-replica-set.txt | 14 ++--- source/tutorial/change-oplog-size.txt | 2 +- .../change-replica-set-wiredtiger.txt | 2 +- .../change-sharded-cluster-wiredtiger.txt | 2 +- ...configure-a-delayed-replica-set-member.txt | 2 +- .../configure-a-hidden-replica-set-member.txt | 2 +- ...figure-a-non-voting-replica-set-member.txt | 4 +- ...gure-replica-set-secondary-sync-target.txt | 6 +- .../configure-replica-set-tag-sets.txt | 4 +- source/tutorial/configure-ssl-clients.txt | 62 +++++++++---------- .../configure-x509-client-authentication.txt | 8 +-- ...o-mongodb-with-kerberos-authentication.txt | 2 +- .../convert-secondary-into-arbiter.txt | 16 ++--- ...-shard-standalone-to-shard-replica-set.txt | 4 +- .../convert-standalone-to-replica-set.txt | 2 +- .../create-chunks-in-sharded-cluster.txt | 2 +- .../deploy-replica-set-for-testing.txt | 6 +- ...eplica-set-with-keyfile-access-control.txt | 2 +- source/tutorial/deploy-shard-cluster.txt | 14 ++--- ...ed-cluster-with-keyfile-access-control.txt | 2 +- ...access-control-in-existing-replica-set.txt | 2 +- ...ss-control-in-existing-sharded-cluster.txt | 2 +- .../evaluate-operation-performance.txt | 2 +- .../tutorial/force-member-to-be-primary.txt | 8 +-- source/tutorial/geospatial-tutorial.txt | 6 +- source/tutorial/install-mongodb-on-os-x.txt | 4 +- source/tutorial/iterate-a-cursor.txt | 8 +-- ...anage-client-side-encryption-data-keys.txt | 16 ++--- source/tutorial/manage-journaling.txt | 6 +- source/tutorial/manage-mongodb-processes.txt | 6 +- .../tutorial/manage-the-database-profiler.txt | 14 ++--- source/tutorial/map-reduce-examples.txt | 2 +- .../merge-chunks-in-sharded-cluster.txt | 2 +- .../migrate-chunks-in-sharded-cluster.txt | 2 +- source/tutorial/model-monetary-data.txt | 2 +- .../modify-chunk-size-in-sharded-cluster.txt | 2 +- .../perform-incremental-map-reduce.txt | 2 +- source/tutorial/remove-documents.txt | 2 +- source/tutorial/remove-replica-set-member.txt | 4 +- .../tutorial/remove-shards-from-cluster.txt | 6 +- source/tutorial/resync-replica-set-member.txt | 2 +- source/tutorial/rotate-encryption-key.txt | 4 +- source/tutorial/rotate-key-replica-set.txt | 8 +-- .../tutorial/rotate-key-sharded-cluster.txt | 20 +++--- .../rotate-x509-membership-certificates.txt | 6 +- .../split-chunks-in-sharded-cluster.txt | 2 +- .../tutorial/terminate-running-operations.txt | 2 +- source/tutorial/troubleshoot-kerberos.txt | 2 +- source/tutorial/troubleshoot-map-function.txt | 2 +- .../tutorial/troubleshoot-reduce-function.txt | 2 +- source/tutorial/troubleshoot-replica-sets.txt | 6 +- source/tutorial/update-documents.txt | 2 +- source/tutorial/upgrade-revision.txt | 6 +- source/tutorial/use-database-commands.txt | 8 +-- .../view-sharded-cluster-configuration.txt | 2 +- 357 files changed, 782 insertions(+), 782 deletions(-) diff --git a/source/administration/configuration.txt b/source/administration/configuration.txt index b85db464e21..9f66e3dea2c 100644 --- a/source/administration/configuration.txt +++ b/source/administration/configuration.txt @@ -236,7 +236,7 @@ among all members of the set. Consider the following: replSetName: set0 Use descriptive names for sets. Once configured, use -:mongosh:`mongosh ` to add hosts to the replica set. +:binary:`~bin.mongosh` to add hosts to the replica set. .. seealso:: diff --git a/source/administration/monitoring.txt b/source/administration/monitoring.txt index 56119a13220..159b15cda52 100644 --- a/source/administration/monitoring.txt +++ b/source/administration/monitoring.txt @@ -499,7 +499,7 @@ has a background :term:`balancer` process that distributes data to ensure that chunks are always optimally distributed among the :term:`shards `. Issue the :method:`db.printShardingStatus()` or :method:`sh.status()` -command to the :binary:`~bin.mongos` from within :mongosh:`mongosh `. +command to the :binary:`~bin.mongos` from within :binary:`~bin.mongosh`. This returns an overview of the entire cluster including the database name, and a list of the chunks. @@ -507,7 +507,7 @@ Stale Locks ~~~~~~~~~~~ To check the lock status of the database, connect to a -:binary:`~bin.mongos` instance using :mongosh:`mongosh `. Issue the +:binary:`~bin.mongos` instance using :binary:`~bin.mongosh`. Issue the following command sequence to switch to the ``config`` database and display all outstanding locks on the shard database: diff --git a/source/appendix/security/appendixA-openssl-ca.txt b/source/appendix/security/appendixA-openssl-ca.txt index 30e8ea97765..57fc14ea1f5 100644 --- a/source/appendix/security/appendixA-openssl-ca.txt +++ b/source/appendix/security/appendixA-openssl-ca.txt @@ -159,7 +159,7 @@ B. Generate the Test CA PEM File cat mongodb-test-ca.crt mongodb-test-ia.crt > test-ca.pem You can use the :red:`test` PEM file when configuring :binary:`~bin.mongod`, -:binary:`~bin.mongos`, or :mongosh:`mongosh ` for TLS/SSL :red:`testing`. +:binary:`~bin.mongos`, or :binary:`~bin.mongosh` for TLS/SSL :red:`testing`. You can use the :red:`test` intermediate authority to sign the :red:`test` certificates for both the server(s) and client(s). A single authority diff --git a/source/appendix/security/appendixC-openssl-client.txt b/source/appendix/security/appendixC-openssl-client.txt index faa5531d561..6fa872625b6 100644 --- a/source/appendix/security/appendixC-openssl-client.txt +++ b/source/appendix/security/appendixC-openssl-client.txt @@ -133,7 +133,7 @@ B. Generate the Test PEM File for Client cat mongodb-test-client.crt mongodb-test-client.key > test-client.pem You can use the :red:`test` PEM file to configure - :mongosh:`mongosh ` for TLS/SSL :red:`testing`. For example, to + :binary:`~bin.mongosh` for TLS/SSL :red:`testing`. For example, to connect to a :binary:`~bin.mongod` or a :binary:`~bin.mongos`: .. example:: diff --git a/source/changeStreams.txt b/source/changeStreams.txt index 147c6795f7a..f55a0a657db 100644 --- a/source/changeStreams.txt +++ b/source/changeStreams.txt @@ -69,7 +69,7 @@ You can open change streams against: The examples on this page use the MongoDB drivers to open and work with a change stream cursor for a single collection. See - also the :mongosh:`mongosh ` method + also the :binary:`~bin.mongosh` method :method:`db.collection.watch()`. * - A database @@ -80,7 +80,7 @@ You can open change streams against: collections. For the MongoDB driver method, refer to your driver - documentation. See also the :mongosh:`mongosh ` method + documentation. See also the :binary:`~bin.mongosh` method :method:`db.watch()`. @@ -92,7 +92,7 @@ You can open change streams against: databases except for ``admin``, ``local``, and ``config``. For the MongoDB driver method, refer to your driver - documentation. See also the :mongosh:`mongosh ` method + documentation. See also the :binary:`~bin.mongosh` method :method:`Mongo.watch()`. .. note:: Change Stream Examples diff --git a/source/core/authentication-mechanisms.txt b/source/core/authentication-mechanisms.txt index 245c0e7cb8c..2a58a277451 100644 --- a/source/core/authentication-mechanisms.txt +++ b/source/core/authentication-mechanisms.txt @@ -46,7 +46,7 @@ To specify the authentication mechanism to use, set the :binary:`~bin.mongos`. Clients specify the authentication mechanism in the :method:`db.auth()` method. -For :mongosh:`mongosh ` and the MongoDB tools, you can also specify the +For :binary:`~bin.mongosh` and the MongoDB tools, you can also specify the authentication mechanism from the command line. .. toctree:: diff --git a/source/core/capped-collections.txt b/source/core/capped-collections.txt index 5f079b49cc0..97af39f65a1 100644 --- a/source/core/capped-collections.txt +++ b/source/core/capped-collections.txt @@ -145,7 +145,7 @@ Create a Capped Collection You must create capped collections explicitly using the :method:`db.createCollection()` method, which is a -:mongosh:`mongosh ` helper for the :dbcommand:`create` command. +:binary:`~bin.mongosh` helper for the :dbcommand:`create` command. When creating a capped collection you must specify the maximum size of the collection in bytes, which MongoDB will pre-allocate for the collection. The size of the capped collection includes a small amount of diff --git a/source/core/databases-and-collections.txt b/source/core/databases-and-collections.txt index 46a7daffe2a..a835f0c642f 100644 --- a/source/core/databases-and-collections.txt +++ b/source/core/databases-and-collections.txt @@ -21,7 +21,7 @@ gathered together in :term:`collections `. A Databases --------- In MongoDB, databases hold one or more collections of documents. To -select a database to use, in :mongosh:`mongosh `, issue the +select a database to use, in :binary:`~bin.mongosh`, issue the ``use `` statement, as in the following example: .. code-block:: javascript @@ -34,7 +34,7 @@ Create a Database If a database does not exist, MongoDB creates the database when you first store data for that database. As such, you can switch to a non-existent database and perform the following operation in -:mongosh:`mongosh `: +:binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/core/gridfs.txt b/source/core/gridfs.txt index fa1b4d1e64c..0f513c1019b 100644 --- a/source/core/gridfs.txt +++ b/source/core/gridfs.txt @@ -287,7 +287,7 @@ exists before read and write operations. See the relevant driver documentation for the specific behavior of your GridFS application. If this index does not exist, you can issue the following operation to -create it using :mongosh:`mongosh `: +create it using :binary:`~bin.mongosh`: .. code-block:: javascript @@ -312,7 +312,7 @@ read and write operations. See the relevant driver documentation for the specific behavior of your GridFS application. If this index does not exist, you can issue the following operation to -create it using :mongosh:`mongosh `: +create it using :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/core/hashed-sharding.txt b/source/core/hashed-sharding.txt index 838c8537f99..adb2004a32a 100644 --- a/source/core/hashed-sharding.txt +++ b/source/core/hashed-sharding.txt @@ -50,7 +50,7 @@ Sharding on a Compound Hashed Index .. include:: /includes/warning-hashed-index-floating-point.rst .. [#hashvalue] - Starting in version 4.0, :mongosh:`mongosh ` provides the + Starting in version 4.0, :binary:`~bin.mongosh` provides the method :method:`convertShardKeyToHashed()`. This method uses the same hashing function as the hashed index and can be used to see what the hashed value would be for a key. diff --git a/source/core/index-creation.txt b/source/core/index-creation.txt index 9787647de6f..ce1e445ad6e 100644 --- a/source/core/index-creation.txt +++ b/source/core/index-creation.txt @@ -352,7 +352,7 @@ Monitor In Progress Index Builds -------------------------------- To see the status of an index build operation, you can use the -:method:`db.currentOp()` method in :mongosh:`mongosh `. To +:method:`db.currentOp()` method in :binary:`~bin.mongosh`. To filter the current operations for index creation operations, see :ref:`currentOp-index-creation` for an example. diff --git a/source/core/index-hashed.txt b/source/core/index-hashed.txt index b3e976c362b..3d54ec960f7 100644 --- a/source/core/index-hashed.txt +++ b/source/core/index-hashed.txt @@ -39,7 +39,7 @@ an array into a hashed indexed field returns an error. .. include:: /includes/tip-applications-do-not-need-to-compute-hashes.rst .. [#hashvalue] - Starting in version 4.0, :mongosh:`mongosh ` provides the + Starting in version 4.0, :binary:`~bin.mongosh` provides the method :method:`convertShardKeyToHashed()`. This method uses the same hashing function as the hashed index and can be used to see what the hashed value would be for a key. @@ -121,7 +121,7 @@ indexed field has the value 2\ :sup:`63`. To list all ``hashed`` indexes for all collections in your deployment, you can use the following -operation in :mongosh:`mongosh `: +operation in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/core/index-hidden.txt b/source/core/index-hidden.txt index 8e3dd49895f..fc8f13df4f3 100644 --- a/source/core/index-hidden.txt +++ b/source/core/index-hidden.txt @@ -134,7 +134,7 @@ Hide an Existing Index - You cannot hide the ``_id`` index. To hide an existing index, you can use the :dbcommand:`collMod` command -or :mongosh:`mongosh ` helper +or :binary:`~bin.mongosh` helper :method:`db.collection.hideIndex()`. For example, create an index without hiding: @@ -196,7 +196,7 @@ Unhide an Existing Index ~~~~~~~~~~~~~~~~~~~~~~~~ To unhide a hidden index, you can use the :dbcommand:`collMod` command -or :mongosh:`mongosh ` helper +or :binary:`~bin.mongosh` helper :method:`db.collection.unhideIndex()`. You can specify either: - the index key specification document to the diff --git a/source/core/index-sparse.txt b/source/core/index-sparse.txt index 01ea6ee66e9..6f2a7dd3fb5 100644 --- a/source/core/index-sparse.txt +++ b/source/core/index-sparse.txt @@ -37,7 +37,7 @@ Create a Sparse Index To create a ``sparse`` index, use the :method:`db.collection.createIndex()` method with the ``sparse`` option set to ``true``. For example, the following operation in -:mongosh:`mongosh ` creates a sparse index on the ``xmpp_id`` field +:binary:`~bin.mongosh` creates a sparse index on the ``xmpp_id`` field of the ``addresses`` collection: .. code-block:: javascript diff --git a/source/core/index-ttl.txt b/source/core/index-ttl.txt index c5fcacdd6aa..b636a818af6 100644 --- a/source/core/index-ttl.txt +++ b/source/core/index-ttl.txt @@ -37,7 +37,7 @@ option with the desired TTL value in seconds. For example, to create a TTL index on the ``lastModifiedDate`` field of the ``eventlog`` collection, with a TTL value of ``3600`` seconds, use -the following operation in :mongosh:`mongosh `: +the following operation in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/core/index-unique.txt b/source/core/index-unique.txt index 1461e8a4ae5..ea9f11863ec 100644 --- a/source/core/index-unique.txt +++ b/source/core/index-unique.txt @@ -47,7 +47,7 @@ Unique Index on a Single Field For example, to create a unique index on the ``user_id`` field of the ``members`` collection, use the following operation in -:mongosh:`mongosh `: +:binary:`~bin.mongosh`: .. code-block:: javascript @@ -65,7 +65,7 @@ uniqueness on the *combination* of the index key values. For example, to create a unique index on ``groupNumber``, ``lastname``, and ``firstname`` fields of the ``members`` collection, use the -following operation in :mongosh:`mongosh `: +following operation in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/core/kerberos.txt b/source/core/kerberos.txt index 2fe71bb3bff..72ebece6f2f 100644 --- a/source/core/kerberos.txt +++ b/source/core/kerberos.txt @@ -100,7 +100,7 @@ principal name ``mongodb/m1.example.com@EXAMPLE.COM``. To specify a different value for ````, use :setting:`~security.sasl.serviceName` during the start up of :binary:`~bin.mongod` or :binary:`~bin.mongos` (or :binary:`~bin.mongod.exe` or :binary:`~bin.mongos.exe`). -:mongosh:`mongosh ` or other clients may also specify a different +:binary:`~bin.mongosh` or other clients may also specify a different service principal name using :setting:`~security.sasl.serviceName`. Service principal names must be reachable over the network using the diff --git a/source/core/query-optimization.txt b/source/core/query-optimization.txt index e7f1d8ea1ae..a64ae433cc8 100644 --- a/source/core/query-optimization.txt +++ b/source/core/query-optimization.txt @@ -36,7 +36,7 @@ indexes in MongoDB `. To improve the performance of this query, add an ascending or a descending index to the ``inventory`` collection on the ``type`` - field. [#ensureIndexOrder]_ In :mongosh:`mongosh `, you can + field. [#ensureIndexOrder]_ In :binary:`~bin.mongosh`, you can create indexes using the :method:`db.collection.createIndex()` method: diff --git a/source/core/read-isolation-consistency-recency.txt b/source/core/read-isolation-consistency-recency.txt index 483a4cf7267..1a10b86971a 100644 --- a/source/core/read-isolation-consistency-recency.txt +++ b/source/core/read-isolation-consistency-recency.txt @@ -155,7 +155,7 @@ For causally related operations: .. note:: Operations can be causally consistent across different sessions. - MongoDB drivers and :mongosh:`mongosh ` provide the + MongoDB drivers and :binary:`~bin.mongosh` provide the methods to advance the operation time and the cluster time for a client session. So, a client can advance the cluster time and the operation time of one client session to be consistent with the diff --git a/source/core/read-preference-hedge-option.txt b/source/core/read-preference-hedge-option.txt index 30cd9db3fe7..22f50aa5690 100644 --- a/source/core/read-preference-hedge-option.txt +++ b/source/core/read-preference-hedge-option.txt @@ -29,7 +29,7 @@ read by default. - When using the drivers, refer to the :driver:`drivers' read preference API `. -- When using :mongosh:`mongosh `, you can use the helper +- When using :binary:`~bin.mongosh`, you can use the helper methods :method:`cursor.readPref()` and :method:`Mongo.setReadPref()`. Additional Information @@ -47,5 +47,5 @@ Hedged Reads Diagnostics ~~~~~~~~~~~~~~~~~~~~~~~~ The command :dbcommand:`serverStatus` and its corresponding -:mongosh:`mongosh ` method :method:`db.serverStatus()` return +:binary:`~bin.mongosh` method :method:`db.serverStatus()` return :serverstatus:`hedgingMetrics`. diff --git a/source/core/read-preference.txt b/source/core/read-preference.txt index 96c0248eacf..25318862d49 100644 --- a/source/core/read-preference.txt +++ b/source/core/read-preference.txt @@ -218,7 +218,7 @@ For a given read preference, the MongoDB drivers use the same :ref:`member selection logic `. -When using :mongosh:`mongosh `, see +When using :binary:`~bin.mongosh`, see :method:`cursor.readPref()` and :method:`Mongo.setReadPref()`. Read Preference and Transactions diff --git a/source/core/retryable-reads.txt b/source/core/retryable-reads.txt index ceb0609f194..3e509d2c348 100644 --- a/source/core/retryable-reads.txt +++ b/source/core/retryable-reads.txt @@ -38,7 +38,7 @@ enable retryable reads by default. To explicitly disable retryable reads, specify :urioption:`retryReads=false ` in the :ref:`connection string ` for the deployment. -:mongosh:`mongosh ` does not support retryable reads. +:binary:`~bin.mongosh` does not support retryable reads. .. _retryable-read-ops: diff --git a/source/core/retryable-writes.txt b/source/core/retryable-writes.txt index 3a0a09ea5a8..fdad52c5506 100644 --- a/source/core/retryable-writes.txt +++ b/source/core/retryable-writes.txt @@ -73,8 +73,8 @@ Enabling Retryable Writes MongoDB Drivers .. include:: /includes/extracts/4.2-changes-drivers-retryWrites-default.rst -:mongosh:`mongosh ` - To enable retryable writes in :mongosh:`mongosh `, use +:binary:`~bin.mongosh` + To enable retryable writes in :binary:`~bin.mongosh`, use the :option:`--retryWrites ` command line option: .. code-block:: bash @@ -363,7 +363,7 @@ Diagnostics .. versionadded:: 3.6.3 -The :dbcommand:`serverStatus` command, and its :mongosh:`mongosh ` +The :dbcommand:`serverStatus` command, and its :binary:`~bin.mongosh` shell helper :method:`db.serverStatus()` includes statistics on retryable writes in the :serverstatus:`transactions` section. diff --git a/source/core/security-automatic-client-side-encryption.txt b/source/core/security-automatic-client-side-encryption.txt index 72fa331bec0..be4586cf7c2 100644 --- a/source/core/security-automatic-client-side-encryption.txt +++ b/source/core/security-automatic-client-side-encryption.txt @@ -17,7 +17,7 @@ Automatic Client-Side Field Level Encryption Overview -------- -Official MongoDB 4.2+ compatible drivers, :mongosh:`mongosh `, and +Official MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell support automatically encrypting fields in read and write operations. For a complete list of official 4.2+ compatible drivers with support for @@ -34,7 +34,7 @@ code associated with constructing the read/write operation. See :ref:`field-level-encryption-json-schema` for complete documentation on automatic encryption rules. -The official MongoDB 4.2+ compatible drivers, :mongosh:`mongosh `, +The official MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell use the Enterprise-only :ref:`field-level-encryption-mongocryptd` process to parse the automatic encryption rules and apply the encryption rules when @@ -61,7 +61,7 @@ key management. Defer to your preferred :ref:`driver's documentation ` for language-specific instructions on implementing automatic client-side field level encryption. -:mongosh:`mongosh ` adds an additional option +:binary:`~bin.mongosh` adds an additional option to the :method:`Mongo()` method for instantiating a database connection with automatic client-side field level encryption. For a complete example, see @@ -72,7 +72,7 @@ Automatic client-side field level encryption requires access to the :ref:`mongocryptd` for complete documentation on installation. The official MongoDB 4.2+ compatible drivers have additional options for managing the ``mongocryptd`` process. Generally, the 4.2+ compatible -drivers and :mongosh:`mongosh ` can access the +drivers and :binary:`~bin.mongosh` can access the ``mongocryptd`` process if it is in the system ``PATH``. Applications must specify the following components when instantiating @@ -89,7 +89,7 @@ encryption: specified CMK *prior* to storing them in the key vault, leaving only metadata unencrypted. - 4.2+ compatible drivers, :mongosh:`mongosh `, and the MongoDB 4.2 + 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell need access to the KMS to encrypt and decrypt protected fields *or* to create new data encryption keys. diff --git a/source/core/security-client-side-encryption-key-management.txt b/source/core/security-client-side-encryption-key-management.txt index 996815173b2..21f6473c9b5 100644 --- a/source/core/security-client-side-encryption-key-management.txt +++ b/source/core/security-client-side-encryption-key-management.txt @@ -49,7 +49,7 @@ transmits the data encryption key to AWS KMS for encrypting or decrypting using the specified Customer Master Key (CMK). The CMK never leaves the AWS KMS. -:mongosh:`mongosh ` supports two methods for configuring +:binary:`~bin.mongosh` supports two methods for configuring access to an AWS KMS: - Use the client-side field level encryption :ref:`command-line options @@ -113,7 +113,7 @@ transmits the data encryption key to Azure Key Vault for encrypting or decrypting using the specified Customer Master Key (CMK). The CMK never leaves the Azure Key Vault. -:mongosh:`mongosh ` supports specifying Azure Key Vault +:binary:`~bin.mongosh` supports specifying Azure Key Vault as a KMS using the :method:`Mongo()` constructor using the :ref:`KMS configuration options `. @@ -152,7 +152,7 @@ transmits the data encryption key to Google Cloud KMS for encrypting or decrypting using the specified Customer Master Key (CMK). The CMK never leaves the Google Cloud KMS. -:mongosh:`mongosh ` supports specifying Google Cloud KMS +:binary:`~bin.mongosh` supports specifying Google Cloud KMS as a KMS using the :method:`Mongo()` constructor using the :ref:`KMS configuration options `. @@ -182,7 +182,7 @@ Google Cloud KMS, see Locally Managed Key ~~~~~~~~~~~~~~~~~~~ -:mongosh:`mongosh ` supports specifying a locally managed key +:binary:`~bin.mongosh` supports specifying a locally managed key as a KMS using the :method:`Mongo()` constructor. The local key *must* be a 96-byte long string. @@ -201,7 +201,7 @@ with client-side field level encryption. Data encryption keys are encrypted using a Customer Master Key (CMK) managed through a supported :ref:`Key Management System (KMS) `. -:mongosh:`mongosh ` provides helper methods for data +:binary:`~bin.mongosh` provides helper methods for data encryption key management: .. list-table:: @@ -264,7 +264,7 @@ Data encryption keys have the following structure: } Client-side field level encryption depends on uniqueness of -``keyAltNames`` values. The :mongosh:`mongosh ` +``keyAltNames`` values. The :binary:`~bin.mongosh` :method:`KeyVault.createKey()` method creates a :ref:`unique index ` on ``keyAltNames`` if one does not exist. Applications can use the :dbcommand:`listIndexes` command against the diff --git a/source/core/security-client-side-encryption.txt b/source/core/security-client-side-encryption.txt index 215435a10af..fb9ba2e4ab1 100644 --- a/source/core/security-client-side-encryption.txt +++ b/source/core/security-client-side-encryption.txt @@ -99,7 +99,7 @@ the official MongoDB 4.2+ compatible drivers: Explicit (manual) encryption of fields Official :ref:`MongoDB 4.2+ compatible drivers - `, :mongosh:`mongosh `, and + `, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell support explicitly encrypting or decrypting fields with a specific data encryption key and encryption algorithm. @@ -117,7 +117,7 @@ Automatic encryption of fields .. include:: /includes/extracts/csfle-enterprise-atlas-only.rst Official :ref:`MongoDB 4.2+ compatible drivers - `, :mongosh:`mongosh `, and + `, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell support automatically encrypting fields in read and write operations. @@ -134,7 +134,7 @@ Automatic encryption of fields For more information, see :doc:`/core/security-automatic-client-side-encryption`. -MongoDB 4.2+ compatible drivers, :mongosh:`mongosh `, and the MongoDB +MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell automatically decrypt :bsontype:`Binary` subtype 6 objects created using client-side field level encryption. For more information on automatic decryption, see @@ -161,7 +161,7 @@ driver and each encryption component: - ``libmongocrypt`` is the `Apache-licensed open-source `__ core cryptography library used by the official MongoDB 4.2+ compatible drivers, - :mongosh:`mongosh `, and the MongoDB 4.2 or later legacy + :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell for powering client-side field level encryption. Some drivers may require specific integration steps to install or link the library. Defer to driver documentation for more @@ -259,7 +259,7 @@ Automatic Field Decryption The :bsontype:`BinData ` blob metadata includes the data encryption key ``_id`` and encryption algorithm used to encrypt the -binary data. The 4.2+ compatible drivers, :mongosh:`mongosh `, and +binary data. The 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell use this metadata to attempt automatic decryption of :bsontype:`BinData ` subtype 6 objects. The automatic decryption process works as follows: diff --git a/source/core/security-explicit-client-side-encryption.txt b/source/core/security-explicit-client-side-encryption.txt index 7290d8aba45..56aded634fb 100644 --- a/source/core/security-explicit-client-side-encryption.txt +++ b/source/core/security-explicit-client-side-encryption.txt @@ -13,7 +13,7 @@ Explicit (Manual) Client-Side Field Level Encryption Overview -------- -MongoDB 4.2+ compatible drivers, :mongosh:`mongosh `, and the MongoDB +MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell support explicitly encrypting or decrypting fields with a specific data encryption key and encryption algorithm. @@ -24,7 +24,7 @@ encryption library. Applications are responsible for selecting the appropriate data encryption key for encryption/decryption on a per-operation basis. -:mongosh:`mongosh ` provides the following methods for +:binary:`~bin.mongosh` provides the following methods for performing explicit encryption and decryption: - :method:`getClientEncryption()` @@ -39,7 +39,7 @@ level encryption. Defer to the documentation for your preferred driver for specific instructions on performing client-side field level encryption. -The following operation issued from :mongosh:`mongosh ` +The following operation issued from :binary:`~bin.mongosh` explicitly encrypts the ``taxid`` field as part of a write operation. .. code-block:: javascript @@ -56,7 +56,7 @@ explicitly encrypts the ``taxid`` field as part of a write operation. ) }) -The following operation issued from :mongosh:`mongosh ` +The following operation issued from :binary:`~bin.mongosh` explicitly encrypts the ``taxid`` field as part of a read operation: .. code-block:: javascript @@ -93,7 +93,7 @@ encryption key management. Defer to your preferred language-specific instructions on implementing explicit client-side field level encryption. -:mongosh:`mongosh ` adds an additional +:binary:`~bin.mongosh` adds an additional option to the :method:`Mongo()` method for instantiating a database connection with explicit client-side field level encryption. For a complete example, see @@ -113,7 +113,7 @@ encryption: specified CMK *prior* to storing them in the key vault, leaving only metadata unencrypted. - 4.2+ compatible drivers, :mongosh:`mongosh `, and the MongoDB 4.2 + 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell need access to the KMS to encrypt and decrypt protected fields *or* to create new data encryption keys. diff --git a/source/core/security-ldap-external.txt b/source/core/security-ldap-external.txt index a71c181c60b..2efd8ad8d72 100644 --- a/source/core/security-ldap-external.txt +++ b/source/core/security-ldap-external.txt @@ -403,7 +403,7 @@ Connecting to a MongoDB server using LDAP Authorization ------------------------------------------------------- When using LDAP for authorization, users connecting via -:mongosh:`mongosh ` must: +:binary:`~bin.mongosh` must: - set :option:`--authenticationDatabase ` to ``$external``. @@ -434,7 +434,7 @@ with LDAP authentication and authorization: mongosh --username alice@dba.example.com --password --authenticationDatabase '$external' --authenticationMechanism "PLAIN" --host "mongodb.example.com" --port 27017 If you do not specify the password to the :option:`-password ` command-line option, :mongosh:`mongosh ` +--password>` command-line option, :binary:`~bin.mongosh` prompts for the password. .. important:: diff --git a/source/core/server-side-javascript.txt b/source/core/server-side-javascript.txt index a49b1dec527..01aeb9494e7 100644 --- a/source/core/server-side-javascript.txt +++ b/source/core/server-side-javascript.txt @@ -20,7 +20,7 @@ Overview MongoDB provides the following commands, methods, and operator that perform server-side execution of JavaScript code: -- :dbcommand:`mapReduce` and the corresponding :mongosh:`mongosh ` +- :dbcommand:`mapReduce` and the corresponding :binary:`~bin.mongosh` method :method:`db.collection.mapReduce()`. For more information, see :doc:`/core/map-reduce`. @@ -30,7 +30,7 @@ perform server-side execution of JavaScript code: - :group:`$accumulator` and :expression:`$function` aggregation operations that allows users to define custom aggregation expressions. -You can also specify a JavaScript file to :mongosh:`mongosh ` to +You can also specify a JavaScript file to :binary:`~bin.mongosh` to run on the server. For more information, see :ref:`running-js-scripts-in-mongo-on-mongod-host` @@ -46,10 +46,10 @@ see :ref:`disable-server-side-js`. Running ``.js`` files via a ``mongosh`` Instance on the Server -------------------------------------------------------------- -You can specify a JavaScript (``.js``) file to :mongosh:`mongosh ` +You can specify a JavaScript (``.js``) file to :binary:`~bin.mongosh` to execute the file on the server. This is a good technique for performing batch administrative work. When you run -:mongosh:`mongosh ` on the server, connecting via the localhost +:binary:`~bin.mongosh` on the server, connecting via the localhost interface, the connection is fast with low latency. Concurrency diff --git a/source/core/sharded-cluster-config-servers.txt b/source/core/sharded-cluster-config-servers.txt index 9f66e4cc619..53feaed7774 100644 --- a/source/core/sharded-cluster-config-servers.txt +++ b/source/core/sharded-cluster-config-servers.txt @@ -147,7 +147,7 @@ Config servers store metadata in the :doc:`/reference/config-database`. maintenance on the config server. To access the ``config`` database, issue the following command in -:mongosh:`mongosh `: +:binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/core/sharded-cluster-query-router.txt b/source/core/sharded-cluster-query-router.txt index afbd0f30240..17425db9d9b 100644 --- a/source/core/sharded-cluster-query-router.txt +++ b/source/core/sharded-cluster-query-router.txt @@ -198,7 +198,7 @@ Hedged Reads Diagnostics ```````````````````````` The command :dbcommand:`serverStatus` and its corresponding -:mongosh:`mongosh ` method :method:`db.serverStatus()` return +:binary:`~bin.mongosh` method :method:`db.serverStatus()` return :serverstatus:`hedgingMetrics`. Confirm Connection to ``mongos`` Instances diff --git a/source/core/sharded-cluster-shards.txt b/source/core/sharded-cluster-shards.txt index a9ad06fdcf9..d241af54904 100644 --- a/source/core/sharded-cluster-shards.txt +++ b/source/core/sharded-cluster-shards.txt @@ -62,7 +62,7 @@ subsequently may reside on any shard in the cluster. Shard Status ------------ -Use the :method:`sh.status()` method in :mongosh:`mongosh ` to +Use the :method:`sh.status()` method in :binary:`~bin.mongosh` to see an overview of the cluster. This reports includes which shard is primary for the database and the :term:`chunk` distribution across the shards. See :method:`sh.status()` method for more details. diff --git a/source/core/sharding-shard-a-collection.txt b/source/core/sharding-shard-a-collection.txt index e80b51eaaad..662a6ea2997 100644 --- a/source/core/sharding-shard-a-collection.txt +++ b/source/core/sharding-shard-a-collection.txt @@ -19,7 +19,7 @@ Shard a Collection To shard a collection, you must specify the full namespace of the collection that you want to shard and the shard key. You can use the -:mongosh:`MongoDB Shell ` method :method:`sh.shardCollection()` to +:binary:`~bin.mongosh` method :method:`sh.shardCollection()` to shard a collection: .. code-block:: javascript diff --git a/source/core/timeseries/timeseries-migrate-data-into-timeseries-collection.txt b/source/core/timeseries/timeseries-migrate-data-into-timeseries-collection.txt index 5403d05bc4f..f34a6126913 100644 --- a/source/core/timeseries/timeseries-migrate-data-into-timeseries-collection.txt +++ b/source/core/timeseries/timeseries-migrate-data-into-timeseries-collection.txt @@ -30,7 +30,7 @@ Create a New Time Series Collection To create a new :ref:`time series collection `, issue the following command in the -:mongosh:`MongoDB Shell `: +:binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/core/transactions-in-applications.txt b/source/core/transactions-in-applications.txt index a91777c52ec..431f0867ab9 100644 --- a/source/core/transactions-in-applications.txt +++ b/source/core/transactions-in-applications.txt @@ -456,7 +456,7 @@ Additional Information ``mongosh`` Example ~~~~~~~~~~~~~~~~~~~ -The following :mongosh:`mongosh ` methods are available for +The following :binary:`~bin.mongosh` methods are available for transactions: - :method:`Session.startTransaction()` @@ -467,7 +467,7 @@ transactions: .. note:: - The :mongosh:`mongosh ` example omits retry logic + The :binary:`~bin.mongosh` example omits retry logic and robust error handling for simplicity's sake. For a more practical example of incorporating transactions in applications, see :ref:`transactions-retry` instead. diff --git a/source/core/transactions.txt b/source/core/transactions.txt index 94696325a75..e8a67974f27 100644 --- a/source/core/transactions.txt +++ b/source/core/transactions.txt @@ -317,7 +317,7 @@ This example highlights the key components of the transactions API. .. seealso:: - For an example in :mongosh:`mongosh `, see + For an example in :binary:`~bin.mongosh`, see :ref:`txn-mongo-shell-example`. .. _transactions-atomicity: diff --git a/source/core/zone-sharding.txt b/source/core/zone-sharding.txt index 3780ebcb22c..07ae502c934 100644 --- a/source/core/zone-sharding.txt +++ b/source/core/zone-sharding.txt @@ -94,7 +94,7 @@ range represents the *hashed* range between ``5`` and ``10``: Zone A since the *hashed* value of ``8`` does not fall into the defined range. -:mongosh:`mongosh ` provides the +:binary:`~bin.mongosh` provides the :method:`convertShardKeyToHashed()` for computing the post-hash value of the specified parameter. diff --git a/source/faq/sharding.txt b/source/faq/sharding.txt index 3dd90350fd8..07d24b9276d 100644 --- a/source/faq/sharding.txt +++ b/source/faq/sharding.txt @@ -119,7 +119,7 @@ in use, it is safe to restart the process to close existing connections. To return aggregated statistics related to all of the outgoing connection pools used by the :binary:`~bin.mongos`, connect -:mongosh:`mongosh ` to the :binary:`~bin.mongos`, and run the +:binary:`~bin.mongosh` to the :binary:`~bin.mongos`, and run the :dbcommand:`connPoolStats` command: .. code-block:: bash diff --git a/source/faq/storage.txt b/source/faq/storage.txt index 44607096aa1..43dc41c49cd 100644 --- a/source/faq/storage.txt +++ b/source/faq/storage.txt @@ -108,7 +108,7 @@ How can I check the size of a collection? To view the statistics for a collection, including the data size, use the :method:`db.collection.stats()` method from within -:mongosh:`mongosh `. The following example issues +:binary:`~bin.mongosh`. The following example issues :method:`db.collection.stats()` for the ``orders`` collection: .. code-block:: javascript @@ -172,6 +172,6 @@ size for that index reflects the compressed size. How can I get information on the storage use of a database? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The :method:`db.stats()` method in :mongosh:`mongosh ` returns +The :method:`db.stats()` method in :binary:`~bin.mongosh` returns the current state of the "active" database. For the description of the returned fields, see :ref:`dbStats Output `. diff --git a/source/includes/4.4-downgrade-clean-shutdown.rst b/source/includes/4.4-downgrade-clean-shutdown.rst index 830fc06bb72..fa13d1b2692 100644 --- a/source/includes/4.4-downgrade-clean-shutdown.rst +++ b/source/includes/4.4-downgrade-clean-shutdown.rst @@ -1,4 +1,4 @@ -Run the following command in :mongosh:`mongosh ` to +Run the following command in :binary:`~bin.mongosh` to perform a clean shutdown, or refer to :ref:`terminate-mongod-processes` for additional ways to safely terminate the :binary:`~bin.mongod` process: diff --git a/source/includes/driver-examples/driver-example-indexes-2.rst b/source/includes/driver-examples/driver-example-indexes-2.rst index 5c8084b920b..65944a0d418 100644 --- a/source/includes/driver-examples/driver-example-indexes-2.rst +++ b/source/includes/driver-examples/driver-example-indexes-2.rst @@ -11,7 +11,7 @@ .. note:: The following examples illustrate indexes and collation in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. Refer to the :compass:`MongoDB Compass Documentation diff --git a/source/includes/driver-examples/driver-example-query-intro.rst b/source/includes/driver-examples/driver-example-query-intro.rst index 87ffce231de..b7653e32547 100644 --- a/source/includes/driver-examples/driver-example-query-intro.rst +++ b/source/includes/driver-examples/driver-example-query-intro.rst @@ -5,7 +5,7 @@ content: | This page provides examples of |query_operations| using the :method:`db.collection.find()` method in - :mongosh:`mongosh `. The examples on this page use the + :binary:`~bin.mongosh`. The examples on this page use the ``inventory`` collection. To populate the ``inventory`` collection, run the following: diff --git a/source/includes/driver-list-database-indexes-tabs.rst b/source/includes/driver-list-database-indexes-tabs.rst index c58aea2c473..b7dc2fb74b7 100644 --- a/source/includes/driver-list-database-indexes-tabs.rst +++ b/source/includes/driver-list-database-indexes-tabs.rst @@ -7,7 +7,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To list all the collection indexes in a database, you can use the - following operation in :mongosh:`mongosh `: + following operation in :binary:`~bin.mongosh`: .. code-block:: javascript @@ -29,7 +29,7 @@ To list all indexes of a certain type (e.g. :doc:`hashed `, :doc:`text `) for all collections in all database, you can use the following - operation in :mongosh:`mongosh `: + operation in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/includes/extracts-changestream.yaml b/source/includes/extracts-changestream.yaml index f97b1a4b5d9..4ff3a4fe166 100644 --- a/source/includes/extracts-changestream.yaml +++ b/source/includes/extracts-changestream.yaml @@ -1,7 +1,7 @@ ref: changestream-resume content: | - Unlike the MongoDB :driver:`Drivers `, :mongosh:`mongosh ` does + Unlike the MongoDB :driver:`Drivers `, :binary:`~bin.mongosh` does not automatically attempt to resume a change stream cursor after an error. The MongoDB drivers make *one* attempt to automatically resume a change stream cursor after certain errors. diff --git a/source/includes/extracts-client-side-field-level-encryption.yaml b/source/includes/extracts-client-side-field-level-encryption.yaml index 3120d8de66c..3a01c458fce 100644 --- a/source/includes/extracts-client-side-field-level-encryption.yaml +++ b/source/includes/extracts-client-side-field-level-encryption.yaml @@ -126,7 +126,7 @@ content: | .. important:: - For AWS KMS support, use :mongosh:`mongosh `, or the MongoDB + For AWS KMS support, use :binary:`~bin.mongosh`, or the MongoDB 4.2.2 or later legacy :binary:`~bin.mongo` shell. The 4.2.0 and 4.2.1 legacy :binary:`~bin.mongo` shell do not support the AWS KMS service due to an unexpected change in the KMS response object. diff --git a/source/includes/extracts-concurrency-consistency-recency.yaml b/source/includes/extracts-concurrency-consistency-recency.yaml index 7eff447835e..078dd6670ae 100644 --- a/source/includes/extracts-concurrency-consistency-recency.yaml +++ b/source/includes/extracts-concurrency-consistency-recency.yaml @@ -132,7 +132,7 @@ content: | :writeconcern:`"majority"` write operations may fail. These include operations that inherently use :writeconcern:`"majority"` write concern, such as the :dbcommand:`replSetStepDown` command, or - various :mongosh:`mongosh ` methods that by default use + various :binary:`~bin.mongosh` methods that by default use :writeconcern:`"majority"` write concern, such as :doc:`user management methods ` and :doc:`role management methods diff --git a/source/includes/extracts-gle-methods-behavior.yaml b/source/includes/extracts-gle-methods-behavior.yaml index 720eb8c2efc..42be20d7053 100644 --- a/source/includes/extracts-gle-methods-behavior.yaml +++ b/source/includes/extracts-gle-methods-behavior.yaml @@ -19,7 +19,7 @@ inherit: ref: _gle-method-definition file: extracts-gle-methods-behavior-base.yaml post: | - The :method:`db.getLastErrorObj()` is a :mongosh:`mongosh ` + The :method:`db.getLastErrorObj()` is a :binary:`~bin.mongosh` wrapper around the :dbcommand:`getLastError` command. replacement: gle: ":method:`db.getLastErrorObj()`" diff --git a/source/includes/extracts-macos-prevent-from-launch.yaml b/source/includes/extracts-macos-prevent-from-launch.yaml index 67dd3ba35a5..a8805cad225 100644 --- a/source/includes/extracts-macos-prevent-from-launch.yaml +++ b/source/includes/extracts-macos-prevent-from-launch.yaml @@ -10,5 +10,5 @@ source: ref: _macos-prevent-launch file: extracts-macos-prevent-launch-base.yaml replacement: - binary_name: ":mongosh:`mongosh `" + binary_name: ":binary:`~bin.mongosh`" ... diff --git a/source/includes/extracts-mongo-shell-deprecated-meta-operator.yaml b/source/includes/extracts-mongo-shell-deprecated-meta-operator.yaml index 0db2c098e31..39426d2cc97 100644 --- a/source/includes/extracts-mongo-shell-deprecated-meta-operator.yaml +++ b/source/includes/extracts-mongo-shell-deprecated-meta-operator.yaml @@ -5,7 +5,7 @@ content: | Starting in v3.2, the {{op}} operator is deprecated in - :mongosh:`mongosh `. In :mongosh:`mongosh `, + :binary:`~bin.mongosh`. In :binary:`~bin.mongosh`, use {{alternative}} instead. --- @@ -115,7 +115,7 @@ content: | Deprecated in the ``mongo`` Shell since v3.2 Starting in v3.2, the query "meta" operators are deprecated in - :mongosh:`mongosh `. In :mongosh:`mongosh `, use + :binary:`~bin.mongosh`. In :binary:`~bin.mongosh`, use the :doc:`cursor methods ` instead. diff --git a/source/includes/extracts-run-from-cmd.yaml b/source/includes/extracts-run-from-cmd.yaml index 18966168258..6c14c744324 100644 --- a/source/includes/extracts-run-from-cmd.yaml +++ b/source/includes/extracts-run-from-cmd.yaml @@ -1,7 +1,7 @@ ref: _require-cmd-line content: | Run {{command}} from the system command line, not in the - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. --- ref: require-cmd-line-mongoldap inherit: diff --git a/source/includes/extracts-sessions.yaml b/source/includes/extracts-sessions.yaml index 965d665ac17..c5b7ec20130 100644 --- a/source/includes/extracts-sessions.yaml +++ b/source/includes/extracts-sessions.yaml @@ -8,7 +8,7 @@ content: | .. important:: - :mongosh:`mongosh ` and the drivers assign these options + :binary:`~bin.mongosh` and the drivers assign these options to the commands in the session. .. list-table:: @@ -110,7 +110,7 @@ content: | ref: sessions-cursor-timeout content: | - Starting in MongoDB 3.6, MongoDB drivers and :mongosh:`mongosh ` + Starting in MongoDB 3.6, MongoDB drivers and :binary:`~bin.mongosh` associate all operations with a :doc:`server session `, with the exception of unacknowledged write operations. For operations not explicitly associated with a diff --git a/source/includes/extracts-ssl-facts.yaml b/source/includes/extracts-ssl-facts.yaml index 8bf237c88b5..22bc149360e 100644 --- a/source/includes/extracts-ssl-facts.yaml +++ b/source/includes/extracts-ssl-facts.yaml @@ -48,7 +48,7 @@ content: | (or their aliases ``--sslCAFile`` or ``ssl.CAFile``) is not specified, the system-wide CA certificate store will be used when connecting to an TLS/SSL-enabled server. In previous versions of - MongoDB, :mongosh:`mongosh ` exited with an error that it + MongoDB, :binary:`~bin.mongosh` exited with an error that it could not validate the certificate. .. include:: /includes/extracts/ssl-facts-x509-ca-file.rst @@ -65,10 +65,10 @@ content: | ``--sslAllowInvalidCertificates`` is necessary, only use the option on systems where intrusion is not possible. - If :mongosh:`mongosh ` (and other + If :binary:`~bin.mongosh` (and other :ref:`mongodb-tools-support-ssl`) runs with the ``--sslAllowInvalidCertificates`` option, - :mongosh:`mongosh ` (and other + :binary:`~bin.mongosh` (and other :ref:`mongodb-tools-support-ssl`) will not attempt to validate the server certificates. This creates a vulnerability to expired :binary:`~bin.mongod` and :binary:`~bin.mongos` certificates as @@ -81,13 +81,13 @@ content: | ref: ssl-facts-mongo-ssl-hostname-verification content: | - :mongosh:`mongosh ` verifies that the hostname (specified + :binary:`~bin.mongosh` verifies that the hostname (specified in :option:`--host ` option or the connection string) matches the ``SAN`` (or, if ``SAN`` is not present, the ``CN``) in the certificate presented by the :binary:`~bin.mongod` or - :binary:`~bin.mongos`. If ``SAN`` is present, :mongosh:`mongosh ` + :binary:`~bin.mongos`. If ``SAN`` is present, :binary:`~bin.mongosh` does not match against the ``CN``. If the hostname does not match - the ``SAN`` (or ``CN``), :mongosh:`mongosh ` will fail to + the ``SAN`` (or ``CN``), :binary:`~bin.mongosh` will fail to connect. .. include:: /includes/extracts/4.2-changes-SAN-matching.rst diff --git a/source/includes/extracts-tls-facts.yaml b/source/includes/extracts-tls-facts.yaml index f8b44b5875f..2bcec88b450 100644 --- a/source/includes/extracts-tls-facts.yaml +++ b/source/includes/extracts-tls-facts.yaml @@ -40,7 +40,7 @@ content: | If ``--tlsCAFile`` or ``tls.CAFile`` is not specified, the system-wide CA certificate store will be used when connecting to an TLS-enabled server. In previous versions - of MongoDB, :mongosh:`mongosh ` exited with an error that + of MongoDB, :binary:`~bin.mongosh` exited with an error that it could not validate the certificate. .. include:: /includes/extracts/tls-facts-x509-ca-file.rst @@ -56,10 +56,10 @@ content: | ``--tlsAllowInvalidCertificates`` on systems where intrusion is not possible. - If :mongosh:`mongosh ` (and other + If :binary:`~bin.mongosh` (and other :ref:`mongodb-tools-support-tls`) runs with the ``--tlsAllowInvalidCertificates`` option, - :mongosh:`mongosh ` (and other + :binary:`~bin.mongosh` (and other :ref:`mongodb-tools-support-tls`) will not attempt to validate the server certificates. This creates a vulnerability to expired :binary:`~bin.mongod` and :binary:`~bin.mongos` certificates as @@ -74,12 +74,12 @@ content: | To connect to a :binary:`~bin.mongod` or :binary:`~bin.mongos` that uses TLS, you must also specify the ``--host`` option to - :mongosh:`mongosh ` if you haven't specified a connect - string. :mongosh:`mongosh ` verifies that the hostname of + :binary:`~bin.mongosh` if you haven't specified a connect + string. :binary:`~bin.mongosh` verifies that the hostname of the :binary:`~bin.mongod` or :binary:`~bin.mongos` matches the CN or SAN of ``--tlsCertificateKeyFile`` certificate presented by the :binary:`~bin.mongod` or :binary:`~bin.mongos`. If the hostname does - not match the CN/SAN, :mongosh:`mongosh ` will fail to connect. + not match the CN/SAN, :binary:`~bin.mongosh` will fail to connect. .. include:: /includes/extracts/4.2-changes-SAN-matching.rst diff --git a/source/includes/extracts-transactions.yaml b/source/includes/extracts-transactions.yaml index 86e93717498..780250bf143 100644 --- a/source/includes/extracts-transactions.yaml +++ b/source/includes/extracts-transactions.yaml @@ -344,7 +344,7 @@ content: | method that uses the :pipeline:`$group` with a :group:`$sum` expression to perform a count. The 4.0 drivers have deprecated the ``count()`` API. - Starting in MongoDB 4.0.3, :mongosh:`mongosh ` provides the + Starting in MongoDB 4.0.3, :binary:`~bin.mongosh` provides the :method:`db.collection.countDocuments()` helper method that uses the :pipeline:`$group` with a :group:`$sum` expression to perform a count. diff --git a/source/includes/fact-authenticate.rst b/source/includes/fact-authenticate.rst index 23c4a23bad6..1cb3cf469f5 100644 --- a/source/includes/fact-authenticate.rst +++ b/source/includes/fact-authenticate.rst @@ -2,9 +2,9 @@ To authenticate as a user, you must provide a username, password, and the :ref:`authentication database ` associated with that user. -To authenticate using :mongosh:`mongosh `, either: +To authenticate using :binary:`~bin.mongosh`, either: -- Use the :mongosh:`mongosh ` command-line authentication options +- Use the :binary:`~bin.mongosh` command-line authentication options (:option:`--username `, :option:`--password `, and :option:`--authenticationDatabase `) diff --git a/source/includes/fact-change-database-context.rst b/source/includes/fact-change-database-context.rst index 18de70da3a8..3717e0fa32f 100644 --- a/source/includes/fact-change-database-context.rst +++ b/source/includes/fact-change-database-context.rst @@ -1,6 +1,6 @@ -Use the ``use `` helper in :mongosh:`mongosh `, or the +Use the ``use `` helper in :binary:`~bin.mongosh`, or the following :method:`db.getSiblingDB()` method in an interactive -:mongosh:`mongosh ` session or in :mongosh:`mongosh ` shell +:binary:`~bin.mongosh` session or in :binary:`~bin.mongosh` shell scripts to change the ``db`` object: .. code-block:: javascript diff --git a/source/includes/fact-collation-driver.rst b/source/includes/fact-collation-driver.rst index 4eb15751f37..d666555e4f6 100644 --- a/source/includes/fact-collation-driver.rst +++ b/source/includes/fact-collation-driver.rst @@ -1,7 +1,7 @@ .. note:: The following examples illustrate indexes and collation in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. Refer to your :api:`driver documentation <>` for instructions on creating indexes with collation in your specific diff --git a/source/includes/fact-create-text-index.rst b/source/includes/fact-create-text-index.rst index f870c3ce3a9..59d75331f22 100644 --- a/source/includes/fact-create-text-index.rst +++ b/source/includes/fact-create-text-index.rst @@ -2,7 +2,7 @@ To perform text search queries, you must have a ``text`` index on your collection. A collection can only have **one** text search index, but that index can cover multiple fields. -For example you can run the following in :mongosh:`mongosh ` to +For example you can run the following in :binary:`~bin.mongosh` to allow text search over the ``name`` and ``description`` fields: .. code-block:: javascript diff --git a/source/includes/fact-createkey-returns-uuid.rst b/source/includes/fact-createkey-returns-uuid.rst index f25bd454bc6..411661154a1 100644 --- a/source/includes/fact-createkey-returns-uuid.rst +++ b/source/includes/fact-createkey-returns-uuid.rst @@ -11,7 +11,7 @@ compatible driver in order to configure `, you must use the ``base64`` representation of the ``UUID`` string. -You can run the following operation in :mongosh:`mongosh ` to convert +You can run the following operation in :binary:`~bin.mongosh` to convert a ``UUID`` hexadecimal string to its ``base64`` representation: .. code-block:: javascript diff --git a/source/includes/fact-currentop.rst b/source/includes/fact-currentop.rst index b7546e75d61..93644d420d6 100644 --- a/source/includes/fact-currentop.rst +++ b/source/includes/fact-currentop.rst @@ -12,4 +12,4 @@ limit on the overall size of the result set. For this reason, the :pipeline:`$currentOp` aggregation stage is preferred over the :dbcommand:`currentOp` command and its -:mongosh:`mongosh ` helper :method:`db.currentOp()`. \ No newline at end of file +:binary:`~bin.mongosh` helper :method:`db.currentOp()`. \ No newline at end of file diff --git a/source/includes/fact-default-bind-ip.rst b/source/includes/fact-default-bind-ip.rst index e137a6c39d3..8ee7796e5ef 100644 --- a/source/includes/fact-default-bind-ip.rst +++ b/source/includes/fact-default-bind-ip.rst @@ -14,7 +14,7 @@ and DEB (Debian, Ubuntu, and derivatives) packages bind to localhost by default. When bound only to the localhost, these MongoDB 3.6 binaries can only -accept connections from clients (including :mongosh:`mongosh ` and +accept connections from clients (including :binary:`~bin.mongosh` and other members of your deployment in replica sets and sharded clusters) that are running on the same machine. Remote clients cannot connect to the binaries bound only to localhost. diff --git a/source/includes/fact-execute-javascript-from-shell.rst b/source/includes/fact-execute-javascript-from-shell.rst index e65fd2c1908..836a00fb2f8 100644 --- a/source/includes/fact-execute-javascript-from-shell.rst +++ b/source/includes/fact-execute-javascript-from-shell.rst @@ -1,4 +1,4 @@ -You can execute a ``.js`` file from within :mongosh:`mongosh `, +You can execute a ``.js`` file from within :binary:`~bin.mongosh`, using the :method:`load()` function, as in the following: .. code-block:: javascript @@ -8,10 +8,10 @@ using the :method:`load()` function, as in the following: This function loads and executes the :file:`myjstest.js` file. The :method:`load()` method accepts relative and absolute paths. -If the current working directory of :mongosh:`mongosh ` +If the current working directory of :binary:`~bin.mongosh` is :file:`/data/db`, and the :file:`myjstest.js` resides in the :file:`/data/db/scripts` directory, then the following calls within -:mongosh:`mongosh ` would be equivalent: +:binary:`~bin.mongosh` would be equivalent: .. code-block:: javascript @@ -20,5 +20,5 @@ is :file:`/data/db`, and the :file:`myjstest.js` resides in the .. note:: There is no search path for the :method:`load()` function. If the desired script is not in the current working - directory or the full specified path, :mongosh:`mongosh ` will not be + directory or the full specified path, :binary:`~bin.mongosh` will not be able to access the file. diff --git a/source/includes/fact-explain-methods-differences.rst b/source/includes/fact-explain-methods-differences.rst index d53736cf3a3..a866abde099 100644 --- a/source/includes/fact-explain-methods-differences.rst +++ b/source/includes/fact-explain-methods-differences.rst @@ -9,8 +9,8 @@ following key differences: - The :method:`db.collection.explain().find() ` returns a cursor, which requires a call to ``.next()``, or its alias ``.finish()``, to return the ``explain()`` results. - If run interactively in :mongosh:`mongosh `, - :mongosh:`mongosh ` automatically calls ``.finish()`` to return + If run interactively in :binary:`~bin.mongosh`, + :binary:`~bin.mongosh` automatically calls ``.finish()`` to return the results. For scripts, however, you must explicitly call ``.next()``, or ``.finish()``, to return the results. For list of cursor-related methods, see diff --git a/source/includes/fact-group-map-reduce-where-limitations-in-24.rst b/source/includes/fact-group-map-reduce-where-limitations-in-24.rst index 2a03f6bda61..44aef823199 100644 --- a/source/includes/fact-group-map-reduce-where-limitations-in-24.rst +++ b/source/includes/fact-group-map-reduce-where-limitations-in-24.rst @@ -1,7 +1,7 @@ :dbcommand:`map-reduce operations ` and :query:`$where` operator expressions **cannot** access certain global functions or properties, such as ``db``, that are available in -:mongosh:`mongosh `. +:binary:`~bin.mongosh`. The following JavaScript functions and properties **are available** to :dbcommand:`map-reduce operations ` and :query:`$where` diff --git a/source/includes/fact-group-sales-documents.rst b/source/includes/fact-group-sales-documents.rst index 8a04cad3970..b03c2dbd9e0 100644 --- a/source/includes/fact-group-sales-documents.rst +++ b/source/includes/fact-group-sales-documents.rst @@ -1,4 +1,4 @@ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``sales`` with the following documents: .. code-block:: javascript diff --git a/source/includes/fact-mongo-prompt-size.rst b/source/includes/fact-mongo-prompt-size.rst index 6d4d9aa133a..c2458170576 100644 --- a/source/includes/fact-mongo-prompt-size.rst +++ b/source/includes/fact-mongo-prompt-size.rst @@ -1,3 +1,3 @@ -:mongosh:`mongosh ` prompt has a limit of 4095 codepoints for +:binary:`~bin.mongosh` prompt has a limit of 4095 codepoints for each line. If you enter a line with more than 4095 codepoints, the shell will truncate it. diff --git a/source/includes/fact-mongosh-shell-method-toc.rst b/source/includes/fact-mongosh-shell-method-toc.rst index 4cf86abd736..97441c92772 100644 --- a/source/includes/fact-mongosh-shell-method-toc.rst +++ b/source/includes/fact-mongosh-shell-method-toc.rst @@ -1,8 +1,8 @@ The methods listed on this table of contents page are -:mongosh:`mongosh ` methods. This is *not* the documentation for +:binary:`~bin.mongosh` methods. This is *not* the documentation for ``Node.js`` or other programming language specific driver methods. -In most cases, :mongosh:`mongosh ` methods work the same way as the +In most cases, :binary:`~bin.mongosh` methods work the same way as the legacy :binary:`~bin.mongo` shell methods. However, some legacy methods are unavailable in ``mongosh``. diff --git a/source/includes/fact-mongosh-shell-method.rst b/source/includes/fact-mongosh-shell-method.rst index c516e25ceb1..2f310bae8fe 100644 --- a/source/includes/fact-mongosh-shell-method.rst +++ b/source/includes/fact-mongosh-shell-method.rst @@ -1,10 +1,10 @@ .. important:: ``mongosh`` Method - This is a :mongosh:`mongosh ` method. This is *not* the + This is a :binary:`~bin.mongosh` method. This is *not* the documentation for ``Node.js`` or other programming language specific driver methods. - In most cases, :mongosh:`mongosh ` methods work the same way as + In most cases, :binary:`~bin.mongosh` methods work the same way as the legacy :binary:`~bin.mongo` shell methods. However, some legacy methods are unavailable in ``mongosh``. diff --git a/source/includes/fact-networkMessageCompressors.rst b/source/includes/fact-networkMessageCompressors.rst index 431c3ea5d34..568e5009ed2 100644 --- a/source/includes/fact-networkMessageCompressors.rst +++ b/source/includes/fact-networkMessageCompressors.rst @@ -6,14 +6,14 @@ If you specify multiple compressors, then the order in which you list the compressors matter as well as the communication initiator. For -example, if :mongosh:`mongosh ` specifies the following network +example, if :binary:`~bin.mongosh` specifies the following network compressors ``zlib,snappy`` and the :binary:`~bin.mongod` specifies -``snappy,zlib``, messages between :mongosh:`mongosh ` and +``snappy,zlib``, messages between :binary:`~bin.mongosh` and :binary:`~bin.mongod` uses ``zlib``. If the parties do not share at least one common compressor, messages between the parties are uncompressed. For example, if -:mongosh:`mongosh ` specifies the network compressor +:binary:`~bin.mongosh` specifies the network compressor ``zlib`` and :binary:`~bin.mongod` specifies ``snappy``, messages -between :mongosh:`mongosh ` and :binary:`~bin.mongod` are not +between :binary:`~bin.mongosh` and :binary:`~bin.mongod` are not compressed. diff --git a/source/includes/fact-type-fidelity-loss-example.rst b/source/includes/fact-type-fidelity-loss-example.rst index d389f2b4585..0fd35d9fe1c 100644 --- a/source/includes/fact-type-fidelity-loss-example.rst +++ b/source/includes/fact-type-fidelity-loss-example.rst @@ -1,4 +1,4 @@ -For example, the following insert operation in :mongosh:`mongosh ` +For example, the following insert operation in :binary:`~bin.mongosh` uses the various :doc:`shell helpers ` for the BSON types :doc:`Date ` and :doc:`64-bit integer `: diff --git a/source/includes/fact-update-example-docs-intro.rst b/source/includes/fact-update-example-docs-intro.rst index 0d02456d7d3..4848f7919d4 100644 --- a/source/includes/fact-update-example-docs-intro.rst +++ b/source/includes/fact-update-example-docs-intro.rst @@ -1,3 +1,3 @@ -In :mongosh:`mongosh `, create a ``books`` collection which +In :binary:`~bin.mongosh`, create a ``books`` collection which contains the following documents. This command first removes all previously existing documents from the ``books`` collection: diff --git a/source/includes/initiate-replica-set.rst b/source/includes/initiate-replica-set.rst index 6af902793a1..cc4a631d64f 100644 --- a/source/includes/initiate-replica-set.rst +++ b/source/includes/initiate-replica-set.rst @@ -1,4 +1,4 @@ -From :mongosh:`mongosh `, run the :method:`rs.initiate()` method. +From :binary:`~bin.mongosh`, run the :method:`rs.initiate()` method. :method:`rs.initiate()` can take an optional :doc:`replica set configuration document `. In the diff --git a/source/includes/list-mongodb-enterprise-packages.rst b/source/includes/list-mongodb-enterprise-packages.rst index 76631844386..3705e4e2580 100644 --- a/source/includes/list-mongodb-enterprise-packages.rst +++ b/source/includes/list-mongodb-enterprise-packages.rst @@ -38,7 +38,7 @@ repository, and contains the following officially-supported packages: binary * - ``mongodb-mongosh`` - - Contains the MongoDB Shell (:mongosh:`mongosh `). + - Contains the MongoDB Shell (:binary:`~bin.mongosh`). * - ``{+package-name-enterprise+}-tools`` - A ``metapackage`` that automatically installs the component diff --git a/source/includes/list-mongodb-org-packages.rst b/source/includes/list-mongodb-org-packages.rst index 822dc601ea0..86cf3273c3b 100644 --- a/source/includes/list-mongodb-org-packages.rst +++ b/source/includes/list-mongodb-org-packages.rst @@ -41,7 +41,7 @@ repository, and contains the following officially-supported packages: - Contains the legacy :binary:`~bin.mongo` shell. * - ``mongodb-mongosh`` - - Contains the MongoDB Shell (:mongosh:`mongosh `). + - Contains the MongoDB Shell (:binary:`~bin.mongosh`). * - ``{+package-name-org+}-tools`` - A ``metapackage`` that automatically installs the component diff --git a/source/includes/note-auth-methods-excluded-from-shell-history.rst b/source/includes/note-auth-methods-excluded-from-shell-history.rst index eeeb4add537..e9313f27ed7 100644 --- a/source/includes/note-auth-methods-excluded-from-shell-history.rst +++ b/source/includes/note-auth-methods-excluded-from-shell-history.rst @@ -1,4 +1,4 @@ .. note:: - :mongosh:`mongosh ` excludes all |operation-name| operations + :binary:`~bin.mongosh` excludes all |operation-name| operations from the saved history. diff --git a/source/includes/note-method-does-not-return-json.rst b/source/includes/note-method-does-not-return-json.rst index df5bf8eb1b9..f33b074af08 100644 --- a/source/includes/note-method-does-not-return-json.rst +++ b/source/includes/note-method-does-not-return-json.rst @@ -1,5 +1,5 @@ .. note:: - The |method| method run in :mongosh:`mongosh ` does + The |method| method run in :binary:`~bin.mongosh` does **not** return :term:`JSON`. Use |method| for manual inspection, and |method-alternative| in scripts. diff --git a/source/includes/note-mongo-shell-automatically-iterates-cursor.rst b/source/includes/note-mongo-shell-automatically-iterates-cursor.rst index 935ba5275df..f8481dd2d0b 100644 --- a/source/includes/note-mongo-shell-automatically-iterates-cursor.rst +++ b/source/includes/note-mongo-shell-automatically-iterates-cursor.rst @@ -1,3 +1,3 @@ -:mongosh:`mongosh ` iterates the returned cursor automatically +:binary:`~bin.mongosh` iterates the returned cursor automatically to print the results. See :doc:`/tutorial/iterate-a-cursor` for -handling cursors manually in :mongosh:`mongosh `. +handling cursors manually in :binary:`~bin.mongosh`. diff --git a/source/includes/steps-5.0-downgrade-mongod.yaml b/source/includes/steps-5.0-downgrade-mongod.yaml index b07df55edab..c3364828113 100644 --- a/source/includes/steps-5.0-downgrade-mongod.yaml +++ b/source/includes/steps-5.0-downgrade-mongod.yaml @@ -16,7 +16,7 @@ ref: 5.0-downgrade-shutdown-instance content: | To cleanly shut down the :binary:`~bin.mongod` process, connect - :mongosh:`mongosh ` to the instance and run: + :binary:`~bin.mongosh` to the instance and run: .. code-block:: javascript diff --git a/source/includes/steps-5.0-downgrade-replica-set.yaml b/source/includes/steps-5.0-downgrade-replica-set.yaml index 88b80dc64f5..e3f58908fa7 100644 --- a/source/includes/steps-5.0-downgrade-replica-set.yaml +++ b/source/includes/steps-5.0-downgrade-replica-set.yaml @@ -23,7 +23,7 @@ content: | #. Wait for the member to recover to ``SECONDARY`` state before downgrading the next secondary. To check the member's state, - use the :method:`rs.status()` method in :mongosh:`mongosh `. + use the :method:`rs.status()` method in :binary:`~bin.mongosh`. #. Once the member is in ``SECONDARY`` stage, downgrade the next secondary. @@ -52,14 +52,14 @@ content: | #. Replace the |newversion| binary with the |oldversion| binary and restart. #. Wait for the member to recover to ``ARBITER`` state. To check - the member's state, connect :mongosh:`mongosh ` to the + the member's state, connect :binary:`~bin.mongosh` to the member and run :method:`rs.status()` method. --- title: Step down the primary. level: 4 ref: 5.0-step-down-primary pre: | - Use :method:`rs.stepDown()` in :mongosh:`mongosh ` to + Use :method:`rs.stepDown()` in :binary:`~bin.mongosh` to step down the :term:`primary` and force the normal :ref:`failover ` procedure. action: diff --git a/source/includes/steps-5.0-downgrade-sharded-cluster.yaml b/source/includes/steps-5.0-downgrade-sharded-cluster.yaml index 3cc3fbdebc7..c90e1ae8b1b 100644 --- a/source/includes/steps-5.0-downgrade-sharded-cluster.yaml +++ b/source/includes/steps-5.0-downgrade-sharded-cluster.yaml @@ -13,7 +13,7 @@ title: Disable the Balancer. level: 4 ref: disable-balancer content: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos` instance in + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance in the sharded cluster, and run :method:`sh.stopBalancer()` to disable the balancer: @@ -63,7 +63,7 @@ content: | #. Wait for the member to recover to ``SECONDARY`` state before downgrading the next secondary member. To check - the member's state, connect :mongosh:`mongosh ` to the shard + the member's state, connect :binary:`~bin.mongosh` to the shard and run :method:`rs.status()` method. Repeat to downgrade for each secondary member. @@ -86,13 +86,13 @@ content: | #. Replace the |newversion| binary with the |oldversion| binary and restart. #. Wait for the member to recover to ``ARBITER`` state. To check - the member's state, connect :mongosh:`mongosh ` to the + the member's state, connect :binary:`~bin.mongosh` to the member and run :method:`rs.status()` method. #. Downgrade the shard's primary. 1. Step down the replica set primary. Connect - :mongosh:`mongosh ` to the primary and use + :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary: @@ -109,7 +109,7 @@ content: | When the status shows that the primary has stepped down and another member has assumed ``PRIMARY`` state, proceed. - #. Run the following command from :mongosh:`mongosh ` to + #. Run the following command from :binary:`~bin.mongosh` to perform a clean shutdown of the stepped-down primary, or refer to :ref:`terminate-mongod-processes` for additional ways to safely terminate the :binary:`~bin.mongod` process: @@ -139,14 +139,14 @@ content: |- #. Wait for the member to recover to ``SECONDARY`` state before downgrading the next secondary member. To check - the member's state, connect :mongosh:`mongosh ` to the shard + the member's state, connect :binary:`~bin.mongosh` to the shard and run :method:`rs.status()` method. Repeat to downgrade for each secondary member. #. Step down the config server primary. - 1. Connect :mongosh:`mongosh ` to the primary and use + 1. Connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary: @@ -163,7 +163,7 @@ content: |- When the status shows that the primary has stepped down and another member has assumed ``PRIMARY`` state, proceed. - #. Run the following command from :mongosh:`mongosh ` to + #. Run the following command from :binary:`~bin.mongosh` to perform a clean shutdown of the stepped-down primary, or refer to :ref:`terminate-mongod-processes` for additional ways to safely terminate the :binary:`~bin.mongod` process: @@ -183,14 +183,14 @@ ref: reenable-balancer content: | Once the downgrade of sharded cluster components is complete, connect - :mongosh:`mongosh ` to a :binary:`~bin.mongos` and + :binary:`~bin.mongosh` to a :binary:`~bin.mongos` and :ref:`re-enable the balancer `. .. code-block:: javascript sh.startBalancer() - The :mongosh:`mongosh ` method :method:`sh.startBalancer()` + The :binary:`~bin.mongosh` method :method:`sh.startBalancer()` also enables auto-splitting for the sharded cluster. ... diff --git a/source/includes/steps-5.0-upgrade-replica-set.yaml b/source/includes/steps-5.0-upgrade-replica-set.yaml index 1b2d7ce6e09..e87b65201ed 100644 --- a/source/includes/steps-5.0-upgrade-replica-set.yaml +++ b/source/includes/steps-5.0-upgrade-replica-set.yaml @@ -16,7 +16,7 @@ title: Step down the replica set primary. level: 5 ref: 5.0-upgrade-rs-step-down-primary content: | - Connect :mongosh:`mongosh ` to the primary and use + Connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary. --- diff --git a/source/includes/steps-5.0-upgrade-sharded-cluster.yaml b/source/includes/steps-5.0-upgrade-sharded-cluster.yaml index b3572e167be..6de0b8d1002 100644 --- a/source/includes/steps-5.0-upgrade-sharded-cluster.yaml +++ b/source/includes/steps-5.0-upgrade-sharded-cluster.yaml @@ -3,7 +3,7 @@ level: 4 ref: 5.0-upgrade-disable-balancer content: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos` instance in + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance in the sharded cluster, and run :method:`sh.stopBalancer()` to disable the balancer: @@ -71,13 +71,13 @@ content: |- #. Wait for the member to recover to ``SECONDARY`` state before upgrading the next secondary member. To check the member's state, - issue :method:`rs.status()` in :mongosh:`mongosh `. + issue :method:`rs.status()` in :binary:`~bin.mongosh`. Repeat for each secondary member. #. Step down the replica set primary. - a. Connect :mongosh:`mongosh ` to the primary and use + a. Connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary: @@ -173,13 +173,13 @@ content: |- #. Wait for the member to recover to ``SECONDARY`` state before upgrading the next secondary member. To check the member's state, you can issue :method:`rs.status()` in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. Repeat for each secondary member. #. Step down the replica set primary. - Connect :mongosh:`mongosh ` to the primary and use + Connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary: @@ -249,7 +249,7 @@ level: 4 ref: 5.0-upgrade-reenable-balancer content: |- - Using :mongosh:`mongosh `, connect to a + Using :binary:`~bin.mongosh`, connect to a :binary:`~bin.mongos` in the cluster and run :method:`sh.startBalancer()` to re-enable the balancer: diff --git a/source/includes/steps-adjust-replica-set-member-priority.yaml b/source/includes/steps-adjust-replica-set-member-priority.yaml index 6d30ab0aa6c..b35caae12c8 100644 --- a/source/includes/steps-adjust-replica-set-member-priority.yaml +++ b/source/includes/steps-adjust-replica-set-member-priority.yaml @@ -2,7 +2,7 @@ title: Copy the replica set configuration to a variable. stepnum: 1 ref: copy-configuration-object pre: | - In :mongosh:`mongosh `, use :method:`rs.conf()` to retrieve + In :binary:`~bin.mongosh`, use :method:`rs.conf()` to retrieve the replica set configuration and assign it to a variable. For example: action: diff --git a/source/includes/steps-authenticate-as-client.yaml b/source/includes/steps-authenticate-as-client.yaml index f2ffa66c6e7..5f34414e45d 100644 --- a/source/includes/steps-authenticate-as-client.yaml +++ b/source/includes/steps-authenticate-as-client.yaml @@ -3,7 +3,7 @@ stepnum: 1 ref: authenticate action: pre: | - When using :mongosh:`mongosh ` to connect to a :binary:`~bin.mongod` or + When using :binary:`~bin.mongosh` to connect to a :binary:`~bin.mongod` or :binary:`~bin.mongos`, enter your ``username``, ``password``, and :option:`authenticationDatabase `. For example: diff --git a/source/includes/steps-authenticate-through-ldap.yaml b/source/includes/steps-authenticate-through-ldap.yaml index b0ea5969673..4a16a13761e 100644 --- a/source/includes/steps-authenticate-through-ldap.yaml +++ b/source/includes/steps-authenticate-through-ldap.yaml @@ -2,7 +2,7 @@ title: Authenticate the user in ``mongosh``. stepnum: 1 ref: authenticate pre: | - To perform the authentication in :mongosh:`mongosh `, use the + To perform the authentication in :binary:`~bin.mongosh`, use the :method:`db.auth()` method in the ``$external`` database. action: pre: | diff --git a/source/includes/steps-backup-sharded-cluster-with-snapshots.yaml b/source/includes/steps-backup-sharded-cluster-with-snapshots.yaml index f85a7402ce5..29e1464c298 100644 --- a/source/includes/steps-backup-sharded-cluster-with-snapshots.yaml +++ b/source/includes/steps-backup-sharded-cluster-with-snapshots.yaml @@ -3,7 +3,7 @@ stepnum: 1 ref: disable-balancer pre: | - Connect :mongosh:`mongosh ` to a cluster + Connect :binary:`~bin.mongosh` to a cluster :binary:`~bin.mongos` instance. Use the :method:`sh.stopBalancer()` method to stop the balancer. If a balancing round is in progress, the operation waits for balancing to complete before stopping the @@ -47,7 +47,7 @@ action: pre: | For each shard replica set in the sharded cluster, confirm that the member has replicated data up to some control point. To - verify, first connect :mongosh:`mongosh ` to the shard + verify, first connect :binary:`~bin.mongosh` to the shard primary and perform a write operation with :writeconcern:`"majority"` write concern on a control collection: @@ -71,7 +71,7 @@ action: { "_id" : "BackupControlDocument", "counter" : 1 } - pre: | Query the shard secondary member for the returned control - document. Connect :mongosh:`mongosh ` to the shard + document. Connect :binary:`~bin.mongosh` to the shard secondary to lock and use :method:`db.collection.find()` to query for the control document: language: javascript @@ -99,7 +99,7 @@ action: pre: | If locking a secondary of the CSRS, confirm that the member has replicated data up to some control point. To verify, first connect - :mongosh:`mongosh ` to the CSRS primary and perform a write + :binary:`~bin.mongosh` to the CSRS primary and perform a write operation with :writeconcern:`"majority"` write concern on a control collection: language: javascript @@ -122,7 +122,7 @@ action: { "_id" : "BackupControlDocument", "counter" : 1 } - pre: | Query the CSRS secondary member for the returned control - document. Connect :mongosh:`mongosh ` to the CSRS secondary + document. Connect :binary:`~bin.mongosh` to the CSRS secondary to lock and use :method:`db.collection.find()` to query for the control document: language: javascript @@ -180,7 +180,7 @@ pre: | unlock them. To unlock the replica set members, use :method:`db.fsyncUnlock()` - method in :mongosh:`mongosh `. + method in :binary:`~bin.mongosh`. action: language: javascript code: | @@ -190,7 +190,7 @@ title: Enable the balancer. stepnum: 6 ref: enable-balancer pre: | - To re-enable to balancer, connect :mongosh:`mongosh ` to a + To re-enable to balancer, connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance and run :method:`sh.startBalancer()`. action: diff --git a/source/includes/steps-backup-sharded-clusters-dumps.yaml b/source/includes/steps-backup-sharded-clusters-dumps.yaml index 1bb43e3c2af..d7a840d9103 100644 --- a/source/includes/steps-backup-sharded-clusters-dumps.yaml +++ b/source/includes/steps-backup-sharded-clusters-dumps.yaml @@ -3,7 +3,7 @@ stepnum: 1 ref: disable-balancer pre: | To disable the :ref:`balancer `, - connect :mongosh:`mongosh ` to a :binary:`~bin.mongos` instance and run + connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance and run :method:`sh.stopBalancer()` in the ``config`` database. action: language: javascript @@ -34,7 +34,7 @@ action: - heading: Lock shard replica set secondary. pre: | For each shard replica set in the sharded cluster, connect - :mongosh:`mongosh ` to the secondary member's + :binary:`~bin.mongosh` to the secondary member's :binary:`~bin.mongod` instance and run :method:`db.fsyncLock()`. language: javascript code: | @@ -44,7 +44,7 @@ action: pre: | If locking a secondary of the CSRS, confirm that the member has replicated data up to some control point. To verify, first connect - :mongosh:`mongosh ` to the CSRS primary and perform a write + :binary:`~bin.mongosh` to the CSRS primary and perform a write operation with :writeconcern:`"majority"` write concern on a control collection: language: javascript @@ -67,7 +67,7 @@ action: { "_id" : "BackupControlDocument", "counter" : 1 } - pre: | Query the CSRS secondary member for the returned control - document. Connect :mongosh:`mongosh ` to the CSRS secondary + document. Connect :binary:`~bin.mongosh` to the CSRS secondary to lock and use :method:`db.collection.find()` to query for the control document: language: javascript @@ -112,7 +112,7 @@ action: If your deployment uses CSRS config servers, unlock the config server node before proceeding to the next step. To unlock the CSRS member, use :method:`db.fsyncUnlock()` method in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. language: javascript code: | db.fsyncUnlock() @@ -135,7 +135,7 @@ stepnum: 5 ref: restart-replica-set-members pre: | To unlock the replica set members, use :method:`db.fsyncUnlock()` - method in :mongosh:`mongosh `. + method in :binary:`~bin.mongosh`. action: language: javascript code: | @@ -147,7 +147,7 @@ title: Re-enable the balancer process. stepnum: 6 ref: reenable-balancer-process pre: | - To re-enable to balancer, connect :mongosh:`mongosh ` to a + To re-enable to balancer, connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance and run :method:`sh.setBalancerState()`. action: diff --git a/source/includes/steps-backup-without-journaling.yaml b/source/includes/steps-backup-without-journaling.yaml index d58fecf773f..78d5f700743 100644 --- a/source/includes/steps-backup-without-journaling.yaml +++ b/source/includes/steps-backup-without-journaling.yaml @@ -3,7 +3,7 @@ stepnum: 1 ref: flush pre: | To flush writes to disk and to "lock" the database, issue the - :method:`db.fsyncLock()` method in :mongosh:`mongosh `: + :method:`db.fsyncLock()` method in :binary:`~bin.mongosh`: action: language: javascript code: | @@ -18,7 +18,7 @@ stepnum: 3 ref: unlock pre: | To unlock the database after the snapshot has completed, use the - following command in :mongosh:`mongosh `: + following command in :binary:`~bin.mongosh`: action: language: javascript code: | diff --git a/source/includes/steps-change-own-password-and-custom-data-prereq.yaml b/source/includes/steps-change-own-password-and-custom-data-prereq.yaml index 0b5f771d3d1..f41ddb7a771 100644 --- a/source/includes/steps-change-own-password-and-custom-data-prereq.yaml +++ b/source/includes/steps-change-own-password-and-custom-data-prereq.yaml @@ -12,7 +12,7 @@ action: mongosh --port 27017 -u myUserAdmin -p --authenticationDatabase 'admin' post: | If you do not specify the password to the :option:`-p ` - command-line option, :mongosh:`mongosh ` prompts for the + command-line option, :binary:`~bin.mongosh` prompts for the password. --- stepnum: 2 diff --git a/source/includes/steps-change-own-password-and-custom-data.yaml b/source/includes/steps-change-own-password-and-custom-data.yaml index 27a63fa20ec..a19af377e6f 100644 --- a/source/includes/steps-change-own-password-and-custom-data.yaml +++ b/source/includes/steps-change-own-password-and-custom-data.yaml @@ -15,7 +15,7 @@ action: post: | If you do not specify the password to the :option:`-p ` - command-line option, :mongosh:`mongosh ` prompts for the + command-line option, :binary:`~bin.mongosh` prompts for the password. To check that you have the privileges specified in the diff --git a/source/includes/steps-change-replica-set-wiredtiger.yaml b/source/includes/steps-change-replica-set-wiredtiger.yaml index c6d6fe907e6..7e148da4972 100644 --- a/source/includes/steps-change-replica-set-wiredtiger.yaml +++ b/source/includes/steps-change-replica-set-wiredtiger.yaml @@ -1,7 +1,7 @@ title: "Shut down the secondary member." ref: change-wt-repl-sync-shutdown-secondary pre: | - In :mongosh:`mongosh `, shut down the secondary. + In :binary:`~bin.mongosh`, shut down the secondary. action: language: sh code: | diff --git a/source/includes/steps-clear-jumbo-flag-command.yaml b/source/includes/steps-clear-jumbo-flag-command.yaml index 90eb6dd93c7..53fefaee7a6 100644 --- a/source/includes/steps-clear-jumbo-flag-command.yaml +++ b/source/includes/steps-clear-jumbo-flag-command.yaml @@ -2,7 +2,7 @@ title: Connect to ``mongos``. ref: connect-mongos level: 4 content: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos`. + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos`. --- title: Find the ``jumbo`` Chunk. ref: find-jumbo diff --git a/source/includes/steps-clear-jumbo-flag-preferred.yaml b/source/includes/steps-clear-jumbo-flag-preferred.yaml index 0224b68a3ea..e6850017d6c 100644 --- a/source/includes/steps-clear-jumbo-flag-preferred.yaml +++ b/source/includes/steps-clear-jumbo-flag-preferred.yaml @@ -1,7 +1,7 @@ title: Connect to ``mongos``. ref: connect-mongos content: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos`. + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos`. level: 4 --- title: Find the ``jumbo`` Chunk. diff --git a/source/includes/steps-clear-jumbo-flag-refine-key.yaml b/source/includes/steps-clear-jumbo-flag-refine-key.yaml index 717415eb663..50dfcf055a4 100644 --- a/source/includes/steps-clear-jumbo-flag-refine-key.yaml +++ b/source/includes/steps-clear-jumbo-flag-refine-key.yaml @@ -2,7 +2,7 @@ title: Connect to ``mongos``. ref: connect-mongos level: 4 content: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos`. + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos`. --- title: Find the ``jumbo`` Chunk. ref: find-jumbo diff --git a/source/includes/steps-clear-jumbo-flag.yaml b/source/includes/steps-clear-jumbo-flag.yaml index 8c97847f9b8..a50b72b9b08 100644 --- a/source/includes/steps-clear-jumbo-flag.yaml +++ b/source/includes/steps-clear-jumbo-flag.yaml @@ -20,7 +20,7 @@ title: Connect to ``mongos``. ref: connect-mongos level: 4 content: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos`. + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos`. --- title: Find the ``jumbo`` Chunk. ref: find-jumbo @@ -86,7 +86,7 @@ content: | You must flush the cache on the **config server primary** for the namespace. This notifies the balancer of the jumbo flag clearance. - Connect :mongosh:`mongosh ` to the **config server + Connect :binary:`~bin.mongosh` to the **config server primary** and run :dbcommand:`flushRouterConfig` for the collection: diff --git a/source/includes/steps-configure-ldap-mongodb.yaml b/source/includes/steps-configure-ldap-mongodb.yaml index 65a860b6beb..36aca98b65e 100644 --- a/source/includes/steps-configure-ldap-mongodb.yaml +++ b/source/includes/steps-configure-ldap-mongodb.yaml @@ -92,7 +92,7 @@ content: | content: | To authenticate when connecting with - :mongosh:`mongosh `, run ``mongosh`` with the following + :binary:`~bin.mongosh`, run ``mongosh`` with the following command-line options, substituting ```` and ````, and enter your password when prompted: diff --git a/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml b/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml index 3737054d776..3bf6e5d47d1 100644 --- a/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml +++ b/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml @@ -280,7 +280,7 @@ pre: | database with :authrole:`userAdmin`, :authrole:`userAdminAnyDatabase`, or a custom role with equivalent privileges. - Use :mongosh:`mongosh ` to authenticate to the MongoDB + Use :binary:`~bin.mongosh` to authenticate to the MongoDB server, set the following options: - :option:`--host ` with the hostname of the MongoDB server @@ -304,11 +304,11 @@ pre: | mongosh --username sam@DBA.EXAMPLE.COM --password --authenticationMechanism 'PLAIN' --authenticationDatabase '$external' --host --port If you do not specify the password to the :option:`-p ` command-line option, :mongosh:`mongosh ` + --password>` command-line option, :binary:`~bin.mongosh` prompts for the password. :abbr:`Windows (Microsoft Windows)` MongoDB deployments must use - :binary:`mongo.exe ` instead of :mongosh:`mongosh `. + :binary:`mongo.exe ` instead of :binary:`~bin.mongosh`. Given the configured :ref:`Active Directory users `, the user authenticates successfully and diff --git a/source/includes/steps-configure-secondary-only-rs-member.yaml b/source/includes/steps-configure-secondary-only-rs-member.yaml index a4edd578ef2..42201af7856 100644 --- a/source/includes/steps-configure-secondary-only-rs-member.yaml +++ b/source/includes/steps-configure-secondary-only-rs-member.yaml @@ -6,7 +6,7 @@ pre: | configuration document ` that contains the current configuration for a replica set. - In :mongosh:`mongosh `, when connected to a primary, run the + In :binary:`~bin.mongosh`, when connected to a primary, run the :method:`rs.conf()` method and assign the result to a variable: action: language: javascript diff --git a/source/includes/steps-control-access-to-mongodb-windows-with-kerberos-authentication.yaml b/source/includes/steps-control-access-to-mongodb-windows-with-kerberos-authentication.yaml index b7886739c45..25cd399b289 100644 --- a/source/includes/steps-control-access-to-mongodb-windows-with-kerberos-authentication.yaml +++ b/source/includes/steps-control-access-to-mongodb-windows-with-kerberos-authentication.yaml @@ -20,7 +20,7 @@ title: Connect to ``mongod``. stepnum: 2 ref: connect-to-mongod pre: | - Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod.exe` + Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod.exe` instance. If :binary:`~bin.mongod.exe` has :option:`--auth ` enabled, ensure you connect with the :ref:`privileges required to create a user `. diff --git a/source/includes/steps-control-access-to-mongodb-with-kerberos-authentication.yaml b/source/includes/steps-control-access-to-mongodb-with-kerberos-authentication.yaml index 3614a293335..67c609c3a3f 100644 --- a/source/includes/steps-control-access-to-mongodb-with-kerberos-authentication.yaml +++ b/source/includes/steps-control-access-to-mongodb-with-kerberos-authentication.yaml @@ -21,7 +21,7 @@ title: Connect to ``mongod``. stepnum: 2 ref: connect-to-mongod pre: | - Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod` + Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod` instance. If :binary:`~bin.mongod` has :option:`--auth ` enabled, ensure you connect with the :ref:`privileges required to create a user `. @@ -104,7 +104,7 @@ title: Connect ``mongosh`` to ``mongod`` and authenticate. stepnum: 5 ref: invoke-an-authenticated-mongo-shell pre: | - Connect :mongosh:`mongosh ` client as the Kerberos principal + Connect :binary:`~bin.mongosh` client as the Kerberos principal ``application/reporting@EXAMPLE.NET``. Before connecting, you must have used Kerberos's ``kinit`` program to get credentials for ``application/reporting@EXAMPLE.NET``. @@ -123,8 +123,8 @@ action: match the Kerberos name, use :option:`--gssapiHostName ` to specify the Kerberos FQDN that it responds to. - pre: | - Alternatively, you can first connect :mongosh:`mongosh ` to the - :binary:`~bin.mongod`, and then from :mongosh:`mongosh `, use + Alternatively, you can first connect :binary:`~bin.mongosh` to the + :binary:`~bin.mongod`, and then from :binary:`~bin.mongosh`, use the :method:`db.auth()` method to authenticate in the ``$external`` database. language: javascript diff --git a/source/includes/steps-convert-replica-set-add-new-shard.yaml b/source/includes/steps-convert-replica-set-add-new-shard.yaml index f67c32535c7..42a9f5badf4 100644 --- a/source/includes/steps-convert-replica-set-add-new-shard.yaml +++ b/source/includes/steps-convert-replica-set-add-new-shard.yaml @@ -24,11 +24,11 @@ post: | Repeat this step for the other two members of the ``rs1`` replica set. --- title: - text: Connect :mongosh:`mongosh ` to a replica set member. + text: Connect :binary:`~bin.mongosh` to a replica set member. character: "`" ref: open-shell pre: | - Connect :mongosh:`mongosh ` to *one* member of the replica set + Connect :binary:`~bin.mongosh` to *one* member of the replica set (e.g. ``mongodb3.example.net``) action: copyable: true @@ -40,7 +40,7 @@ title: "Initiate the replica set." level: 4 ref: initiate-rs pre: | - From :mongosh:`mongosh `, run :method:`rs.initiate()` to + From :binary:`~bin.mongosh`, run :method:`rs.initiate()` to initiate a replica set that consists of the current member. .. important:: @@ -76,7 +76,7 @@ title: character: "`" ref: add-mongos-shard pre: | - In :mongosh:`mongosh `, when connected to the + In :binary:`~bin.mongosh`, when connected to the :binary:`~bin.mongos`, add the shard to the cluster with the :method:`sh.addShard()` method: action: diff --git a/source/includes/steps-convert-replica-set-shard-aware.yaml b/source/includes/steps-convert-replica-set-shard-aware.yaml index fe84664237e..5f0437f9a8d 100644 --- a/source/includes/steps-convert-replica-set-shard-aware.yaml +++ b/source/includes/steps-convert-replica-set-shard-aware.yaml @@ -2,7 +2,7 @@ title: Determine the primary and secondary members. level: 4 ref: determine-rs-role content: | - Connect :mongosh:`mongosh ` to one of the members and run + Connect :binary:`~bin.mongosh` to one of the members and run :method:`rs.status()` to determine the primary and secondary members. --- title: Restart secondary members with the ``--shardsvr`` option. @@ -29,7 +29,7 @@ title: Step down the primary. level: 4 ref: step-down-primary pre: | - Connect :mongosh:`mongosh ` to the primary and stepdown the primary. + Connect :binary:`~bin.mongosh` to the primary and stepdown the primary. action: language: javascript code: | diff --git a/source/includes/steps-convert-replica-set-shard-deploy-infrastructure.yaml b/source/includes/steps-convert-replica-set-shard-deploy-infrastructure.yaml index f3e5d68b1d5..991aa1b37ee 100644 --- a/source/includes/steps-convert-replica-set-shard-deploy-infrastructure.yaml +++ b/source/includes/steps-convert-replica-set-shard-deploy-infrastructure.yaml @@ -20,7 +20,7 @@ action: specific to your deployment, see :doc:`/reference/program/mongod` or :doc:`/reference/configuration-options`. - pre: | - Connect :mongosh:`mongosh ` to one of the config servers and + Connect :binary:`~bin.mongosh` to one of the config servers and run :method:`rs.initiate()` to initiate the replica set. .. important:: diff --git a/source/includes/steps-create-admin-then-enable-authentication.yaml b/source/includes/steps-create-admin-then-enable-authentication.yaml index 2525a27d8ab..2e80aeb37de 100644 --- a/source/includes/steps-create-admin-then-enable-authentication.yaml +++ b/source/includes/steps-create-admin-then-enable-authentication.yaml @@ -20,7 +20,7 @@ level: 4 ref: connect pre: | - For example, open a new terminal and connect :mongosh:`mongosh ` + For example, open a new terminal and connect :binary:`~bin.mongosh` to the instance: action: @@ -29,7 +29,7 @@ action: mongosh --port 27017 post: | Specify additional command line options as appropriate to connect - :mongosh:`mongosh ` to your deployment, such as ``--host``. + :binary:`~bin.mongosh` to your deployment, such as ``--host``. --- stepnum: 3 title: Create the user administrator. @@ -37,7 +37,7 @@ level: 4 ref: create-user-admin pre: | - From :mongosh:`mongosh `, add a user with the + From :binary:`~bin.mongosh`, add a user with the :authrole:`userAdminAnyDatabase` role in the ``admin`` database. Include additional roles as needed for this user. For example, the following creates the user ``myUserAdmin`` in the ``admin`` database with the @@ -77,13 +77,13 @@ ref: restart-with-auth content: | a. Shut down the :binary:`~bin.mongod` instance. For example, from - :mongosh:`mongosh `, issue the following command: + :binary:`~bin.mongosh`, issue the following command: .. code-block:: javascript db.adminCommand( { shutdown: 1 } ) - #. Exit :mongosh:`mongosh `. + #. Exit :binary:`~bin.mongosh`. #. Start the :binary:`~bin.mongod` with access control enabled. @@ -112,7 +112,7 @@ level: 4 stepnum: 5 ref: auth-as-admin content: | - Using :mongosh:`mongosh `, you can: + Using :binary:`~bin.mongosh`, you can: - Connect with authentication by passing in user credentials, or @@ -125,7 +125,7 @@ content: | - id: cmdline name: Authenticate during Connection content: | - Start :mongosh:`mongosh ` with the :option:`-u + Start :binary:`~bin.mongosh` with the :option:`-u \ `, :option:`-p `, and the :option:`--authenticationDatabase \ ` command line options: @@ -140,7 +140,7 @@ content: | name: Authenticate after Connection content: | - Connect :mongosh:`mongosh ` to the + Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod`: .. code-block:: bash @@ -148,7 +148,7 @@ content: | mongosh --port 27017 - In :mongosh:`mongosh `, switch to the + In :binary:`~bin.mongosh`, switch to the authentication database (in this case, ``admin``), and use :method:`db.auth(\, \) ` method to authenticate: @@ -209,14 +209,14 @@ post: | the user's privileges. After creating the additional users, disconnect - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. --- title: Connect to the instance and authenticate as ``myTester``. level: 4 ref: auth-as-mytester content: | - After disconnecting :mongosh:`mongosh ` as + After disconnecting :binary:`~bin.mongosh` as ``myUserAdmin``, reconnect as ``myTester``. You can: - Connect with authentication by passing in user credentials, or @@ -230,7 +230,7 @@ content: | - id: cmdline2 name: Authenticate during Connection content: | - Start :mongosh:`mongosh ` with the :option:`-u + Start :binary:`~bin.mongosh` with the :option:`-u \ `, :option:`-p `, and the :option:`--authenticationDatabase \ ` command line options: @@ -245,14 +245,14 @@ content: | name: Authenticate after Connection content: | - Connect :mongosh:`mongosh ` to the + Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod`: .. code-block:: bash mongosh --port 27017 - In :mongosh:`mongosh `, switch to the + In :binary:`~bin.mongosh`, switch to the authentication database (in this case, ``test``), and use :method:`db.auth(\, \) ` method to authenticate: diff --git a/source/includes/steps-csfle-shell-aws-create-key.yaml b/source/includes/steps-csfle-shell-aws-create-key.yaml index ab663260592..f944bed33d0 100644 --- a/source/includes/steps-csfle-shell-aws-create-key.yaml +++ b/source/includes/steps-csfle-shell-aws-create-key.yaml @@ -10,7 +10,7 @@ content: | *Read* permissions for the KMS service. To mitigate the risk of these credentials leaking into logs, the - following procedure passes the values into :mongosh:`mongosh ` + following procedure passes the values into :binary:`~bin.mongosh` using environment variables. First, ensure that you have configured the following environment @@ -19,7 +19,7 @@ content: | - ``AWS_ACCESS_KEY_ID`` - ``AWS_SECRET_ACCESS_KEY`` - Next, create :mongosh:`mongosh ` session using the + Next, create :binary:`~bin.mongosh` session using the :option:`--eval `, :option:`--shell `, and :option:`--nodb ` options: @@ -31,10 +31,10 @@ content: | " \ --shell --nodb - This example opens :mongosh:`mongosh ` without a + This example opens :binary:`~bin.mongosh` without a connection to a MongoDB database. The ``--eval`` option sets the ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` variables in - :mongosh:`mongosh ` to the value of the corresponding + :binary:`~bin.mongosh` to the value of the corresponding environment variables. The specified variables are also supported by the `AWS CLI `__. @@ -45,7 +45,7 @@ ref: create-encryption-configuration level: 4 content: | - In :mongosh:`mongosh `, create a new + In :binary:`~bin.mongosh`, create a new :ref:`ClientSideFieldLevelEncryptionOptions` variable for storing the client-side field level encryption configuration document: @@ -67,7 +67,7 @@ ref: connect-with-encryption level: 4 content: | - In :mongosh:`mongosh `, use the :method:`Mongo()` + In :binary:`~bin.mongosh`, use the :method:`Mongo()` constructor to establish a database connection to the target cluster. Specify the :ref:`ClientSideFieldLevelEncryptionOptions` document as the second parameter to the :method:`Mongo()` constructor to diff --git a/source/includes/steps-csfle-shell-azure-create-key.yaml b/source/includes/steps-csfle-shell-azure-create-key.yaml index 89bdefc4293..4e85c28c37d 100644 --- a/source/includes/steps-csfle-shell-azure-create-key.yaml +++ b/source/includes/steps-csfle-shell-azure-create-key.yaml @@ -8,7 +8,7 @@ content: | requires a valid Tenant ID, Client ID, and Client Secret. To mitigate the risk of these credentials leaking into logs, the - following procedure passes the values into :mongosh:`mongosh ` + following procedure passes the values into :binary:`~bin.mongosh` using environment variables. First, ensure that you have configured the following environment @@ -18,7 +18,7 @@ content: | - ``AZURE_CLIENT_ID`` - ``AZURE_CLIENT_SECRET`` - Next, create a :mongosh:`mongosh ` session using the + Next, create a :binary:`~bin.mongosh` session using the :option:`--eval `, :option:`--shell `, and :option:`--nodb ` options: @@ -31,10 +31,10 @@ content: | " \ --shell --nodb - This example opens :mongosh:`mongosh ` without a + This example opens :binary:`~bin.mongosh` without a connection to a MongoDB database. The ``--eval`` option sets the ``AZURE_TENANT_ID``, and ``AZURE_CLIENT_ID``, and - ``AZURE_CLIENT_SECRET`` variables in :mongosh:`mongosh ` to + ``AZURE_CLIENT_SECRET`` variables in :binary:`~bin.mongosh` to the value of the corresponding environment variables. --- @@ -43,7 +43,7 @@ ref: create-encryption-configuration level: 4 content: | - In :mongosh:`mongosh `, create a new + In :binary:`~bin.mongosh`, create a new :ref:`ClientSideFieldLevelEncryptionOptions` variable for storing the client-side field level encryption configuration document: @@ -66,7 +66,7 @@ ref: connect-with-encryption level: 4 content: | - In :mongosh:`mongosh `, use the :method:`Mongo()` + In :binary:`~bin.mongosh`, use the :method:`Mongo()` constructor to establish a database connection to the target cluster. Specify the :ref:`ClientSideFieldLevelEncryptionOptions` document as the second parameter to the :method:`Mongo()` constructor to diff --git a/source/includes/steps-csfle-shell-gcp-create-key.yaml b/source/includes/steps-csfle-shell-gcp-create-key.yaml index c6fb56fc598..dd83b283fea 100644 --- a/source/includes/steps-csfle-shell-gcp-create-key.yaml +++ b/source/includes/steps-csfle-shell-gcp-create-key.yaml @@ -8,7 +8,7 @@ content: | requires your GCP Email and its associated Private Key. To mitigate the risk of these credentials leaking into logs, the - following procedure passes the values into :mongosh:`mongosh ` + following procedure passes the values into :binary:`~bin.mongosh` using environment variables. First, ensure that you have configured the following environment @@ -17,7 +17,7 @@ content: | - ``GCP_EMAIL`` - ``GCP_PRIVATEKEY`` - Next, create a :mongosh:`mongosh ` session using the + Next, create a :binary:`~bin.mongosh` session using the :option:`--eval `, :option:`--shell `, and :option:`--nodb ` options: @@ -29,10 +29,10 @@ content: | " \ --shell --nodb - This example opens :mongosh:`mongosh ` without a + This example opens :binary:`~bin.mongosh` without a connection to a MongoDB database. The ``--eval`` option sets the ``GCP_EMAIL`` and ``GCP_PRIVATEKEY`` variables in - :mongosh:`mongosh ` to the value of the corresponding + :binary:`~bin.mongosh` to the value of the corresponding environment variables. --- @@ -41,7 +41,7 @@ ref: create-encryption-configuration level: 4 content: | - In :mongosh:`mongosh `, create a new + In :binary:`~bin.mongosh`, create a new :ref:`ClientSideFieldLevelEncryptionOptions` variable for storing the client-side field level encryption configuration document: @@ -63,7 +63,7 @@ ref: connect-with-encryption level: 4 content: | - In :mongosh:`mongosh `, use the :method:`Mongo()` + In :binary:`~bin.mongosh`, use the :method:`Mongo()` constructor to establish a database connection to the target cluster. Specify the :ref:`ClientSideFieldLevelEncryptionOptions` document as the second parameter to the :method:`Mongo()` constructor to diff --git a/source/includes/steps-csfle-shell-local-create-key.yaml b/source/includes/steps-csfle-shell-local-create-key.yaml index 8bd2ac58dd0..85d1394015f 100644 --- a/source/includes/steps-csfle-shell-local-create-key.yaml +++ b/source/includes/steps-csfle-shell-local-create-key.yaml @@ -9,7 +9,7 @@ content: | breaks. To mitigate the risk of these credentials leaking into logs, the - following procedure passes the values into :mongosh:`mongosh ` + following procedure passes the values into :binary:`~bin.mongosh` using environment variables. The following operation generates a key that meets the stated @@ -37,7 +37,7 @@ ref: launch-mongo-shell level: 4 content: | - Create a :mongosh:`mongosh ` session using the :option:`--eval + Create a :binary:`~bin.mongosh` session using the :option:`--eval `, :option:`--shell `, and :option:`--nodb ` options: @@ -46,9 +46,9 @@ content: | mongosh --eval "var LOCAL_KEY = '$DEV_LOCAL_KEY' " \ --shell --nodb - The example automatically opens :mongosh:`mongosh ` + The example automatically opens :binary:`~bin.mongosh` without a connection to a MongoDB database. The ``--eval`` - option sets the ``LOCAL_KEY`` variable in :mongosh:`mongosh ` + option sets the ``LOCAL_KEY`` variable in :binary:`~bin.mongosh` to the value of the corresponding environment variable. --- @@ -57,7 +57,7 @@ ref: create-encryption-configuration level: 4 content: | - In :mongosh:`mongosh `, create a new + In :binary:`~bin.mongosh`, create a new :ref:`ClientSideFieldLevelEncryptionOptions` variable for storing the client-side field level encryption configuration document: @@ -78,7 +78,7 @@ ref: connect-with-encryption level: 4 content: | - In :mongosh:`mongosh `, use the :method:`Mongo()` + In :binary:`~bin.mongosh`, use the :method:`Mongo()` constructor to establish a database connection to the target cluster. Specify the :ref:`ClientSideFieldLevelEncryptionOptions` document as the second parameter to the :method:`Mongo()` constructor to diff --git a/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml b/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml index 474b8a06d4f..839409eb0c0 100644 --- a/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml +++ b/source/includes/steps-deploy-geographically-distributed-replica-set-5member.yaml @@ -90,7 +90,7 @@ level: 4 ref: initiate-rs pre: | - From :mongosh:`mongosh `, run :method:`rs.initiate()` on + From :binary:`~bin.mongosh`, run :method:`rs.initiate()` on replica set member 0. .. important:: diff --git a/source/includes/steps-deploy-replica-set-with-auth.yaml b/source/includes/steps-deploy-replica-set-with-auth.yaml index f1ca2a6e343..f49cdcb6602 100644 --- a/source/includes/steps-deploy-replica-set-with-auth.yaml +++ b/source/includes/steps-deploy-replica-set-with-auth.yaml @@ -87,9 +87,9 @@ title: Connect to a member of the replica set over the localhost interface. level: 4 ref: deploy-repset-connect-to-member pre: | - Connect :mongosh:`mongosh ` to one of the + Connect :binary:`~bin.mongosh` to one of the {{program}} instances over the :ref:`localhost - interface`. You must run :mongosh:`mongosh ` + interface`. You must run :binary:`~bin.mongosh` on the same physical machine as the {{program}} instance. The :ref:`localhost interface` is only available @@ -196,7 +196,7 @@ pre: | Authenticate to the ``admin`` database. action: - pre: | - In :mongosh:`mongosh `, use :method:`db.auth()` to + In :binary:`~bin.mongosh`, use :method:`db.auth()` to authenticate. For example, the following authenticate as the user administrator ``fred``: @@ -208,7 +208,7 @@ action: code: | db.getSiblingDB("admin").auth("fred", passwordPrompt()) // or cleartext password - pre: | - Alternatively, connect a new :mongosh:`mongosh ` instance to + Alternatively, connect a new :binary:`~bin.mongosh` instance to the primary replica set member using the ``-u ``, ``-p ``, and the ``--authenticationDatabase`` parameters. @@ -217,7 +217,7 @@ action: mongosh -u "fred" -p --authenticationDatabase "admin" post: | If you do not specify the password to the :option:`-p ` - command-line option, :mongosh:`mongosh ` prompts for the + command-line option, :binary:`~bin.mongosh` prompts for the password. --- stepnum: 8 diff --git a/source/includes/steps-deploy-replica-set.yaml b/source/includes/steps-deploy-replica-set.yaml index 5e6231e7de7..bcc451a11a8 100644 --- a/source/includes/steps-deploy-replica-set.yaml +++ b/source/includes/steps-deploy-replica-set.yaml @@ -77,14 +77,14 @@ content: | document. --- -title: "Connect :mongosh:`mongosh ` to one of the ``mongod`` instances." +title: "Connect :binary:`~bin.mongosh` to one of the ``mongod`` instances." level: 4 ref: open-shell pre: | From the same machine where one of the :binary:`~bin.mongod` is running (in this tutorial, ``mongodb0.example.net``), start - :mongosh:`mongosh `. To connect to the :binary:`~bin.mongod` + :binary:`~bin.mongosh`. To connect to the :binary:`~bin.mongod` listening to localhost on the default port of ``27017``, simply issue: action: language: sh @@ -93,14 +93,14 @@ action: post: | Depending on your path, you may need to specify the path to the - :mongosh:`mongosh ` binary. + :binary:`~bin.mongosh` binary. --- title: "Initiate the replica set." level: 4 ref: initiate-rs pre: | - From :mongosh:`mongosh `, run :method:`rs.initiate()` on + From :binary:`~bin.mongosh`, run :method:`rs.initiate()` on replica set member 0. .. important:: diff --git a/source/includes/steps-deploy-sharded-cluster-config-server-noauth.yaml b/source/includes/steps-deploy-sharded-cluster-config-server-noauth.yaml index 3b53cc13230..053884c1c33 100644 --- a/source/includes/steps-deploy-sharded-cluster-config-server-noauth.yaml +++ b/source/includes/steps-deploy-sharded-cluster-config-server-noauth.yaml @@ -71,7 +71,7 @@ level: 4 title: Connect to one of the config servers. ref: csrs-connect pre: | - Connect :mongosh:`mongosh ` to one of the config server + Connect :binary:`~bin.mongosh` to one of the config server members. action: copyable: true @@ -85,7 +85,7 @@ level: 4 ref: csrs-initiate pre: | - From :mongosh:`mongosh `, run the :method:`rs.initiate()` method. + From :binary:`~bin.mongosh`, run the :method:`rs.initiate()` method. :method:`rs.initiate()` can take an optional :doc:`replica set configuration document `. In the diff --git a/source/includes/steps-deploy-sharded-cluster-connect.yaml b/source/includes/steps-deploy-sharded-cluster-connect.yaml index a3c45fc8347..279867469c2 100644 --- a/source/includes/steps-deploy-sharded-cluster-connect.yaml +++ b/source/includes/steps-deploy-sharded-cluster-connect.yaml @@ -122,7 +122,7 @@ action: post: | Enter the password when prompted. - pre: | - Alternatively, connect a new :mongosh:`mongosh ` session to the + Alternatively, connect a new :binary:`~bin.mongosh` session to the target replica set member using the ``-u ``, ``-p ``, and the ``--authenticationDatabase "admin"`` parameters. You must use the :ref:`localhost-exception` to connect @@ -132,7 +132,7 @@ action: mongosh -u "fred" -p --authenticationDatabase "admin" post: | If you do not specify the password to the :option:`-p ` - command-line option, :mongosh:`mongosh ` prompts for the + command-line option, :binary:`~bin.mongosh` prompts for the password. --- title: Create Administrative User for Cluster Management diff --git a/source/includes/steps-deploy-sharded-cluster-shard-replica-noauth.yaml b/source/includes/steps-deploy-sharded-cluster-shard-replica-noauth.yaml index 7f6861ce3a2..98c3bdd8840 100644 --- a/source/includes/steps-deploy-sharded-cluster-shard-replica-noauth.yaml +++ b/source/includes/steps-deploy-sharded-cluster-shard-replica-noauth.yaml @@ -65,7 +65,7 @@ title: Connect to one member of the shard replica set. level: 4 ref: deploy-repset-connect pre: | - Connect :mongosh:`mongosh ` to one of the replica set members. + Connect :binary:`~bin.mongosh` to one of the replica set members. action: copyable: true language: sh diff --git a/source/includes/steps-enable-authentication-in-replica-set-no-downtime.yaml b/source/includes/steps-enable-authentication-in-replica-set-no-downtime.yaml index f7a57578647..4c1ade82303 100644 --- a/source/includes/steps-enable-authentication-in-replica-set-no-downtime.yaml +++ b/source/includes/steps-enable-authentication-in-replica-set-no-downtime.yaml @@ -160,7 +160,7 @@ action: mongosh -u joe -password -authenticationDatabase foo --host mongoRepl/mongo1.example.net:27017, mongo2.example.net:27017, mongo3.example.net:27017 post: | If you do not specify the password to the :option:`-p ` - command-line option, :mongosh:`mongosh ` prompts for the + command-line option, :binary:`~bin.mongosh` prompts for the password. - pre: | @@ -214,7 +214,7 @@ pre: | action: - heading: Shut down the secondary or arbiter members. pre: | - From a :mongosh:`mongosh ` session that is connected to the + From a :binary:`~bin.mongosh` session that is connected to the secondary or arbiter, issue the :method:`db.shutdownServer()` against the ``admin`` database. @@ -291,7 +291,7 @@ action: - heading: Step down the primary replica set member pre: | - Connect to the primary using :mongosh:`mongosh ` and step down + Connect to the primary using :binary:`~bin.mongosh` and step down the primary using the :method:`rs.stepDown()` method. language: javascript @@ -304,7 +304,7 @@ action: Once the primary steps down and the replica set elects a new primary, shut down the old primary :binary:`~bin.mongod`. - From a :mongosh:`mongosh ` session that is connected to the old + From a :binary:`~bin.mongosh` session that is connected to the old primary, issue the :method:`db.shutdownServer()` on the ``admin`` database. @@ -374,7 +374,7 @@ action: - heading: Shut down the secondary or arbiter members pre: | - Connect :mongosh:`mongosh ` to the secondary or arbiter, and + Connect :binary:`~bin.mongosh` to the secondary or arbiter, and issue the :method:`db.shutdownServer()` on the ``admin`` database. language: javascript @@ -449,7 +449,7 @@ action: - heading: Step down the primary replica set member pre: | - Connect to the primary using :mongosh:`mongosh ` and step down + Connect to the primary using :binary:`~bin.mongosh` and step down the primary using the :method:`rs.stepDown()` method. language: javascript @@ -462,7 +462,7 @@ action: Once the primary steps down and the replica set elects a new primary, shut down the old primary :binary:`~bin.mongod`. - From a :mongosh:`mongosh ` session that is connected to the old + From a :binary:`~bin.mongosh` session that is connected to the old primary, issue the :method:`db.shutdownServer()` on the ``admin`` database. diff --git a/source/includes/steps-enable-authentication-in-replica-set.yaml b/source/includes/steps-enable-authentication-in-replica-set.yaml index 0b22d1edf34..c946fa74351 100644 --- a/source/includes/steps-enable-authentication-in-replica-set.yaml +++ b/source/includes/steps-enable-authentication-in-replica-set.yaml @@ -25,7 +25,7 @@ pre: | potential rollbacks. To shut down a :binary:`~bin.mongod`, connect each :binary:`~bin.mongod` using - :mongosh:`mongosh ` and issue the :method:`db.shutdownServer()` on the + :binary:`~bin.mongosh` and issue the :method:`db.shutdownServer()` on the ``admin`` database: action: language: sh @@ -58,14 +58,14 @@ title: Connect to the primary using the localhost interface. level: 4 ref: connect-via-localhost pre: | - Connect :mongosh:`mongosh ` to one of the + Connect :binary:`~bin.mongosh` to one of the :binary:`~bin.mongod` instances over the :ref:`localhost - interface`. You must run :mongosh:`mongosh ` + interface`. You must run :binary:`~bin.mongosh` on the same physical machine as the :binary:`~bin.mongod` instance. Use :method:`rs.status()` to identify the :term:`primary` replica set member. If you are connected to the primary, continue to the next - step. If not, connect :mongosh:`mongosh ` to the primary + step. If not, connect :binary:`~bin.mongosh` to the primary over the :ref:`localhost interface`. diff --git a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-uac.yaml b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-uac.yaml index d6eb6934563..cd87af3e6b8 100644 --- a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-uac.yaml +++ b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-uac.yaml @@ -92,7 +92,7 @@ pre: | .. example:: The following operation connects to the sharded cluster using - :mongosh:`mongosh `, authenticating as the user ``joe`` on the + :binary:`~bin.mongosh`, authenticating as the user ``joe`` on the ``marketing`` database. .. code-block:: javascript diff --git a/source/includes/steps-enable-authentication-in-sharded-cluster.yaml b/source/includes/steps-enable-authentication-in-sharded-cluster.yaml index 57142222952..ab028eaa23f 100644 --- a/source/includes/steps-enable-authentication-in-sharded-cluster.yaml +++ b/source/includes/steps-enable-authentication-in-sharded-cluster.yaml @@ -24,7 +24,7 @@ stepnum: 3 ref: disable-balancer level: 4 pre: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos`. + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos`. action: - pre: | language: sh @@ -54,7 +54,7 @@ stepnum: 4 ref: shutdown-mongos level: 4 pre: | - Connect :mongosh:`mongosh ` to each :binary:`~bin.mongos` and shut + Connect :binary:`~bin.mongosh` to each :binary:`~bin.mongos` and shut them down. Use the :method:`db.shutdownServer()` method on the ``admin`` database @@ -75,7 +75,7 @@ stepnum: 5 ref: shutdown-config-servers level: 4 pre: | - Connect :mongosh:`mongosh ` to each :binary:`~bin.mongod` in the + Connect :binary:`~bin.mongosh` to each :binary:`~bin.mongod` in the config server deployment and shut them down. For replica set config server deployments, shut down the :term:`primary` @@ -95,7 +95,7 @@ stepnum: 6 ref: shutdown-shard-servers level: 4 pre: | - For each shard replica set, connect :mongosh:`mongosh ` to each + For each shard replica set, connect :binary:`~bin.mongosh` to each :binary:`~bin.mongod` member in the replica set and shut them down. Shut down the :term:`primary` member last. @@ -254,9 +254,9 @@ pre: | access certain functions or operations. For each shard replica set in the cluster, connect - :mongosh:`mongosh ` to the :term:`primary` member over the + :binary:`~bin.mongosh` to the :term:`primary` member over the :ref:`localhost interface`. You must run - :mongosh:`mongosh ` on the same machine as the target + :binary:`~bin.mongosh` on the same machine as the target :binary:`~bin.mongod` to use the localhost interface. Create a user with the ``userAdminAnyDatabase`` @@ -337,7 +337,7 @@ action: post: | At this point, the entire sharded cluster is back online and can communicate internally using the keyfile specified. However, external - programs like :mongosh:`mongosh ` need to use a correctly + programs like :binary:`~bin.mongosh` need to use a correctly provisioned user in order to read or write to the cluster. --- title: Connect to the :binary:`~bin.mongos` instance over the localhost interface. @@ -389,7 +389,7 @@ level: 4 pre: | To perform sharding operations, authenticate as a :authrole:`clusterAdmin` user with either the - :method:`db.auth()` method or a new :mongosh:`mongosh ` session + :method:`db.auth()` method or a new :binary:`~bin.mongosh` session with the ``username``, ``password``, and ``authenticationDatabase`` parameters. diff --git a/source/includes/steps-kerberos-auth-activedirectory-authz.yaml b/source/includes/steps-kerberos-auth-activedirectory-authz.yaml index 15f3f3204ee..5cf70a3257a 100644 --- a/source/includes/steps-kerberos-auth-activedirectory-authz.yaml +++ b/source/includes/steps-kerberos-auth-activedirectory-authz.yaml @@ -92,7 +92,7 @@ ref: security-nativeldap-activedirectory-preconnect level: 4 pre: | - Connect to the MongoDB server using :mongosh:`mongosh ` using the + Connect to the MongoDB server using :binary:`~bin.mongosh` using the :option:`--host ` and :option:`--port ` options. .. code-block:: bash @@ -112,7 +112,7 @@ pre: | .. note:: - For :abbr:`Windows (Microsoft Windows)` MongoDB deployments, you should replace :mongosh:`mongosh ` with + For :abbr:`Windows (Microsoft Windows)` MongoDB deployments, you should replace :binary:`~bin.mongosh` with :binary:`mongo.exe ` --- @@ -476,13 +476,13 @@ pre: | database with :authrole:`userAdmin`, :authrole:`userAdminAnyDatabase`, or a custom role with equivalent privileges. - Use :mongosh:`mongosh ` to authenticate to the MongoDB + Use :binary:`~bin.mongosh` to authenticate to the MongoDB server, set the following options: - :option:`--host ` with the hostname of the MongoDB server - :option:`--port ` with the port of the MongoDB server - :option:`--username ` to the user's ``userPrincipalName`` - - :option:`--password ` to the user's password (or omit to have :mongosh:`mongosh ` prompt for the password) + - :option:`--password ` to the user's password (or omit to have :binary:`~bin.mongosh` prompt for the password) - :option:`--authenticationMechanism ` to ``"GSSAPI"`` - :option:`--authenticationDatabase ` to ``"$external"`` @@ -500,11 +500,11 @@ pre: | mongosh --username sam@DBA.EXAMPLE.COM --password --authenticationMechanisms="GSSAPI" --authenticationDatabase "$external" --host --port If you do not specify the password to the :option:`-p ` command-line option, :mongosh:`mongosh ` + --password>` command-line option, :binary:`~bin.mongosh` prompts for the password. :abbr:`Windows (Microsoft Windows)` MongoDB deployments must use - :binary:`mongo.exe ` instead of :mongosh:`mongosh `. + :binary:`mongo.exe ` instead of :binary:`~bin.mongosh`. Given the configured :ref:`Active Directory users `, the user authenticates successfully and diff --git a/source/includes/steps-log-rotate-rename.yaml b/source/includes/steps-log-rotate-rename.yaml index 7b76ef30a49..e9e13d7d106 100644 --- a/source/includes/steps-log-rotate-rename.yaml +++ b/source/includes/steps-log-rotate-rename.yaml @@ -26,7 +26,7 @@ ref: rotate-log title: Rotate the log file. pre: | Rotate the log file by issuing the :dbcommand:`logRotate` command - from the ``admin`` database in :mongosh:`mongosh `: + from the ``admin`` database in :binary:`~bin.mongosh`: action: language: sh code: | diff --git a/source/includes/steps-modify-psa-replica-set-safely.yaml b/source/includes/steps-modify-psa-replica-set-safely.yaml index 1e0e870f136..b43cbc0dd21 100644 --- a/source/includes/steps-modify-psa-replica-set-safely.yaml +++ b/source/includes/steps-modify-psa-replica-set-safely.yaml @@ -6,7 +6,7 @@ pre: | voting, data-bearing node, it is required that you add the node with ``{ priority: 0 }`` first. - In :mongosh:`mongosh `, modify the replica set configuration. To + In :binary:`~bin.mongosh`, modify the replica set configuration. To reconfigure an existing replica set, first retrieve the current configuration with :method:`rs.conf()`, modify the configuration document as needed, and then pass the modified document to diff --git a/source/includes/steps-perform-maintenance-task-on-replica-set-members.yaml b/source/includes/steps-perform-maintenance-task-on-replica-set-members.yaml index 3455e4e4a0a..1cb4abf16c4 100644 --- a/source/includes/steps-perform-maintenance-task-on-replica-set-members.yaml +++ b/source/includes/steps-perform-maintenance-task-on-replica-set-members.yaml @@ -2,7 +2,7 @@ title: Stop a secondary. stepnum: 1 ref: stop-a-secondary pre: | - In :mongosh:`mongosh `, shut down the :binary:`~bin.mongod` instance: + In :binary:`~bin.mongosh`, shut down the :binary:`~bin.mongod` instance: action: language: javascript code: db.shutdownServer() @@ -110,7 +110,7 @@ title: Perform maintenance operations on the secondary. stepnum: 3 ref: maintenance-on-secondary pre: | - While the member is a standalone, use :mongosh:`mongosh ` to + While the member is a standalone, use :binary:`~bin.mongosh` to perform maintenance: action: language: sh @@ -136,7 +136,7 @@ pre: | on its usual port. action: - pre: | - From :mongosh:`mongosh `, shut down the standalone + From :binary:`~bin.mongosh`, shut down the standalone server after completing the maintenance: language: javascript code: | @@ -156,12 +156,12 @@ action: For shard or config server members, be sure to remove the :parameter:`skipShardingConfigurationChecks` parameter. - When it has started, connect :mongosh:`mongosh ` to the + When it has started, connect :binary:`~bin.mongosh` to the restarted instance. - pre: | The secondary takes time to :doc:`catch up to the primary - `. From :mongosh:`mongosh `, use the + `. From :binary:`~bin.mongosh`, use the following command to verify that the member has caught up from the :replstate:`RECOVERING` state to the :replstate:`SECONDARY` state. language: javascript @@ -174,7 +174,7 @@ content: | a. To perform maintenance on the primary after completing maintenance tasks on all secondaries, connect - :mongosh:`mongosh ` to the primary and use + :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and allow one of the secondaries to be elected the new primary. Specify a 300 second waiting period to prevent the member from being elected diff --git a/source/includes/steps-replace-disabled-config-server.yaml b/source/includes/steps-replace-disabled-config-server.yaml index 555a2f73f9a..8fb86e64fc7 100644 --- a/source/includes/steps-replace-disabled-config-server.yaml +++ b/source/includes/steps-replace-disabled-config-server.yaml @@ -16,7 +16,7 @@ action: title: Add the new config server to the replica set. ref: add-to-replica-set pre: | - Connect :mongosh:`mongosh ` to the primary of the config server + Connect :binary:`~bin.mongosh` to the primary of the config server replica set and use :method:`rs.add()` to add the new member. .. warning:: @@ -75,7 +75,7 @@ title: Remove the member to replace from the config server replica set. ref: remove-old-member pre: | Upon completion of initial sync of the replacement config server, - from a :mongosh:`mongosh ` session that is connected to the + from a :binary:`~bin.mongosh` session that is connected to the primary, use :method:`rs.remove()` to remove the old member. action: language: javascript diff --git a/source/includes/steps-restore-primary-from-backup.yaml b/source/includes/steps-restore-primary-from-backup.yaml index a2749184653..9d92ef5ec41 100644 --- a/source/includes/steps-restore-primary-from-backup.yaml +++ b/source/includes/steps-restore-primary-from-backup.yaml @@ -25,7 +25,7 @@ action: mongod --dbpath /data/db - heading: Drop the ``local`` database. pre: | - Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod` + Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod` instance and drop the ``local`` database. language: javascript @@ -63,7 +63,7 @@ post: | .. include:: /includes/fact-uuid-restore-from-backup.rst --- -title: Connect :mongosh:`mongosh ` to the ``mongod`` instance. +title: Connect :binary:`~bin.mongosh` to the ``mongod`` instance. stepnum: 4 source: file: steps-deploy-replica-set.yaml diff --git a/source/includes/steps-restore-secondary-from-backup-directly.yaml b/source/includes/steps-restore-secondary-from-backup-directly.yaml index 35585ecd35e..a0a5acbad5b 100644 --- a/source/includes/steps-restore-secondary-from-backup-directly.yaml +++ b/source/includes/steps-restore-secondary-from-backup-directly.yaml @@ -20,7 +20,7 @@ title: Add the secondaries to the replica set. stepnum: 4 ref: add content: | - In a :mongosh:`mongosh ` session that is connected to the + In a :binary:`~bin.mongosh` session that is connected to the :term:`primary`, add the :term:`secondaries ` to the replica set using the :method:`rs.add()` method. See :doc:`/tutorial/deploy-replica-set` for more information about diff --git a/source/includes/steps-run-mongodb-on-linux-tarball.yaml b/source/includes/steps-run-mongodb-on-linux-tarball.yaml index 61891ca4d5f..67b82cb22c9 100644 --- a/source/includes/steps-run-mongodb-on-linux-tarball.yaml +++ b/source/includes/steps-run-mongodb-on-linux-tarball.yaml @@ -60,8 +60,8 @@ title: Begin using MongoDB. ref: begin-using-mongodb pre: | - Start a :mongosh:`mongosh ` session on the same host machine as the - :binary:`~bin.mongod`. You can run :mongosh:`mongosh ` + Start a :binary:`~bin.mongosh` session on the same host machine as the + :binary:`~bin.mongod`. You can run :binary:`~bin.mongosh` without any command-line options to connect to a :binary:`~bin.mongod` that is running on your localhost with default port 27017: @@ -73,7 +73,7 @@ action: mongo post: | - For more information on connecting using :mongosh:`mongosh `, + For more information on connecting using :binary:`~bin.mongosh`, such as to connect to a :binary:`~bin.mongod` instance running on a different host and/or port, see the :mongosh:`mongosh documentation `. @@ -84,5 +84,5 @@ post: | replacement: mongod: ":binary:`~bin.mongod`" - mongo: ":mongosh:`mongosh `" + mongo: ":binary:`~bin.mongosh`" ... diff --git a/source/includes/steps-run-mongodb-on-linux.yaml b/source/includes/steps-run-mongodb-on-linux.yaml index 36cd91ba92d..d88635cb1b7 100644 --- a/source/includes/steps-run-mongodb-on-linux.yaml +++ b/source/includes/steps-run-mongodb-on-linux.yaml @@ -82,8 +82,8 @@ stepnum: 5 ref: begin-using-mongodb pre: | - Start a :mongosh:`mongosh ` session on the same host machine as the - :binary:`~bin.mongod`. You can run :mongosh:`mongosh ` + Start a :binary:`~bin.mongosh` session on the same host machine as the + :binary:`~bin.mongod`. You can run :binary:`~bin.mongosh` without any command-line options to connect to a :binary:`~bin.mongod` that is running on your localhost with default port 27017: @@ -95,7 +95,7 @@ action: mongo post: | - For more information on connecting using :mongosh:`mongosh `, + For more information on connecting using :binary:`~bin.mongosh`, such as to connect to a :binary:`~bin.mongod` instance running on a different host and/or port, see the :mongosh:`mongosh documentation `. @@ -106,5 +106,5 @@ post: | replacement: mongod: ":binary:`~bin.mongod`" - mongo: ":mongosh:`mongosh `" + mongo: ":binary:`~bin.mongosh`" ... diff --git a/source/includes/steps-run-mongodb-on-osx.yaml b/source/includes/steps-run-mongodb-on-osx.yaml index 1b6b4cfafa2..1679867fe05 100644 --- a/source/includes/steps-run-mongodb-on-osx.yaml +++ b/source/includes/steps-run-mongodb-on-osx.yaml @@ -101,8 +101,8 @@ title: Begin using MongoDB. stepnum: 6 ref: begin-using-mongodb pre: | - Start a :mongosh:`mongosh ` session on the same host machine as the - :binary:`~bin.mongod`. You can run :mongosh:`mongosh ` + Start a :binary:`~bin.mongosh` session on the same host machine as the + :binary:`~bin.mongod`. You can run :binary:`~bin.mongosh` without any command-line options to connect to a :binary:`~bin.mongod` that is running on your *localhost* with the default port of *27017*: @@ -116,7 +116,7 @@ post: | .. include:: /includes/extracts/macos-prevent-launch-mongo.rst - For more information on connecting using :mongosh:`mongosh `, + For more information on connecting using :binary:`~bin.mongosh`, such as to connect to a :binary:`~bin.mongod` instance running on a different host and/or port, see the :mongosh:`mongosh documentation `. @@ -127,5 +127,5 @@ post: | replacement: mongod: ":binary:`~bin.mongod`" - mongo: ":mongosh:`mongosh `" + mongo: ":binary:`~bin.mongosh`" ... diff --git a/source/includes/steps-schedule-balancer-window.yaml b/source/includes/steps-schedule-balancer-window.yaml index af4e2f8d477..5e2efbb5ea0 100644 --- a/source/includes/steps-schedule-balancer-window.yaml +++ b/source/includes/steps-schedule-balancer-window.yaml @@ -1,7 +1,7 @@ ref: connect-mongos stepnum: 1 level: 3 -title: "Connect to :binary:`~bin.mongos` using :mongosh:`mongosh `." +title: "Connect to :binary:`~bin.mongos` using :binary:`~bin.mongosh`." content: | You can connect to any :binary:`~bin.mongos` in the cluster. --- diff --git a/source/includes/steps-shard-a-collection-ranged.yaml b/source/includes/steps-shard-a-collection-ranged.yaml index 0dae67b9ef7..ac28abf550b 100644 --- a/source/includes/steps-shard-a-collection-ranged.yaml +++ b/source/includes/steps-shard-a-collection-ranged.yaml @@ -6,7 +6,7 @@ pre: | Connect to a :binary:`~bin.mongos` instance. action: - pre: | - Using :mongosh:`mongosh `, use the ``--hostname`` parameter + Using :binary:`~bin.mongosh`, use the ``--hostname`` parameter passing the hostname of the target machine, and the ``--port`` parameter passing the port the :binary:`~bin.mongos` listens on. language: javascript diff --git a/source/includes/steps-test-generate-multiple-documents.yaml b/source/includes/steps-test-generate-multiple-documents.yaml index 7e6167180c2..0f65f2c93fc 100644 --- a/source/includes/steps-test-generate-multiple-documents.yaml +++ b/source/includes/steps-test-generate-multiple-documents.yaml @@ -2,7 +2,7 @@ title: Insert new documents into the ``testData`` collection. stepnum: 1 ref: insert-new-documents pre: | - From :mongosh:`mongosh `, use the ``for`` loop. If the ``testData`` + From :binary:`~bin.mongosh`, use the ``for`` loop. If the ``testData`` collection does not exist, MongoDB will implicitly create the collection. action: language: javascript @@ -21,7 +21,7 @@ action: code: | db.testData.find() - pre: | - :mongosh:`mongosh ` displays the first 20 documents in the + :binary:`~bin.mongosh` displays the first 20 documents in the collection. Your :doc:`ObjectId ` values will be different: language: javascript @@ -54,7 +54,7 @@ ref: iterate-cursor pre: | The :method:`~db.collection.find()` method returns a cursor. To :doc:`iterate the cursor ` and return more - documents, type ``it`` in :mongosh:`mongosh `. The shell will + documents, type ``it`` in :binary:`~bin.mongosh`. The shell will exhaust the cursor and return these documents: action: language: javascript diff --git a/source/includes/steps-upgrade-enterprise-replica-set.yaml b/source/includes/steps-upgrade-enterprise-replica-set.yaml index 77eb952bb02..81613a4b5f9 100644 --- a/source/includes/steps-upgrade-enterprise-replica-set.yaml +++ b/source/includes/steps-upgrade-enterprise-replica-set.yaml @@ -22,7 +22,7 @@ ref: upgrade-enterprise-rs-step-down-primary content: | Once all the secondary members have been upgraded to Enterprise, - connect :mongosh:`mongosh ` to the primary and use + connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary. diff --git a/source/includes/steps-upgrade-enterprise-sharded-cluster.yaml b/source/includes/steps-upgrade-enterprise-sharded-cluster.yaml index 7d5206677aa..d2d5d9d28aa 100644 --- a/source/includes/steps-upgrade-enterprise-sharded-cluster.yaml +++ b/source/includes/steps-upgrade-enterprise-sharded-cluster.yaml @@ -3,7 +3,7 @@ level: 4 ref: upgrade-enterprise-disable-balancer content: | - Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos` instance in + Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance in the sharded cluster, and run :method:`sh.stopBalancer()` to disable the balancer: @@ -47,13 +47,13 @@ content: |- #. Wait for the member to recover to ``SECONDARY`` state before upgrading the next secondary member. To check the member's state, - issue :method:`rs.status()` in :mongosh:`mongosh `. + issue :method:`rs.status()` in :binary:`~bin.mongosh`. Repeat for each remaining secondary member. #. Step down the replica set primary. - Connect :mongosh:`mongosh ` to the primary and use + Connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary: @@ -91,13 +91,13 @@ content: |- #. Wait for the member to recover to ``SECONDARY`` state before upgrading the next secondary member. To check the member's state, - issue :method:`rs.status()` in :mongosh:`mongosh `. + issue :method:`rs.status()` in :binary:`~bin.mongosh`. Repeat for each remaining secondary member. #. Step down the replica set primary. - Connect :mongosh:`mongosh ` to the primary and use + Connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary: @@ -129,7 +129,7 @@ level: 4 ref: upgrade-enterprise-reenable-balancer content: |- - Using :mongosh:`mongosh `, connect to a + Using :binary:`~bin.mongosh`, connect to a :binary:`~bin.mongos` in the cluster and run :method:`sh.startBalancer()` to re-enable the balancer: diff --git a/source/reference.txt b/source/reference.txt index 6d5105b0d06..219fd33cb42 100644 --- a/source/reference.txt +++ b/source/reference.txt @@ -20,7 +20,7 @@ Reference :doc:`/reference/method` Documentation of JavaScript methods and helpers in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. :doc:`/reference/mongo` Documentation of JavaScript methods and helpers in diff --git a/source/reference/bson-types.txt b/source/reference/bson-types.txt index 61f039a8576..b6e03429381 100644 --- a/source/reference/bson-types.txt +++ b/source/reference/bson-types.txt @@ -58,7 +58,7 @@ MongoDB clients should add an ``_id`` field with a unique ObjectId. Using ObjectIds for the ``_id`` field provides the following additional benefits: -- in :mongosh:`mongosh `, you can access the creation time of +- in :binary:`~bin.mongosh`, you can access the creation time of the ``ObjectId``, using the :method:`ObjectId.getTimestamp()` method. - sorting on an ``_id`` field that stores ``ObjectId`` values is @@ -165,14 +165,14 @@ BSON Date type is signed. [#unsigned-date]_ Negative values represent dates before 1970. .. example:: Construct a Date using the ``new Date()`` constructor in - :mongosh:`mongosh `: + :binary:`~bin.mongosh`: .. code-block:: javascript var mydate1 = new Date() .. example:: Construct a Date using the ``ISODate()`` constructor in - :mongosh:`mongosh `: + :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/reference/command.txt b/source/reference/command.txt index f89cb2620cb..d709839c217 100644 --- a/source/reference/command.txt +++ b/source/reference/command.txt @@ -15,7 +15,7 @@ Database Commands All command documentation outlined below describes a command and its available parameters and provides a document template or prototype for each command. Some command documentation also includes the relevant -:mongosh:`mongosh ` helpers. +:binary:`~bin.mongosh` helpers. To run a command against the current database, use :method:`db.runCommand()`: diff --git a/source/reference/command/abortReshardCollection.txt b/source/reference/command/abortReshardCollection.txt index f28333200d1..665424a10f6 100644 --- a/source/reference/command/abortReshardCollection.txt +++ b/source/reference/command/abortReshardCollection.txt @@ -37,7 +37,7 @@ Definition :dbcommand:`abortReshardCollection` command, the command returns an error. - The :mongosh:`MongoDB Shell ` provides a wrapper method + The :binary:`~bin.mongosh` provides a wrapper method :method:`sh.abortReshardCollection()`. Example diff --git a/source/reference/command/abortTransaction.txt b/source/reference/command/abortTransaction.txt index 213a3d748e6..d6e8ade228a 100644 --- a/source/reference/command/abortTransaction.txt +++ b/source/reference/command/abortTransaction.txt @@ -27,7 +27,7 @@ Definition against the ``admin`` database and run within a :method:`Session`. Rather than run the :dbcommand:`abortTransaction` command directly, most users should use the driver method or the - :mongosh:`mongosh ` :method:`Session.abortTransaction()` + :binary:`~bin.mongosh` :method:`Session.abortTransaction()` helper. The command has the following syntax: diff --git a/source/reference/command/addShardToZone.txt b/source/reference/command/addShardToZone.txt index 5aff057cecc..e4a0d299bd4 100644 --- a/source/reference/command/addShardToZone.txt +++ b/source/reference/command/addShardToZone.txt @@ -75,7 +75,7 @@ The command takes the following fields: `. -:mongosh:`mongosh ` provides the helper method +:binary:`~bin.mongosh` provides the helper method :method:`sh.addShardToZone()` Behavior diff --git a/source/reference/command/aggregate.txt b/source/reference/command/aggregate.txt index d4d2ce83e50..c2f6a642749 100644 --- a/source/reference/command/aggregate.txt +++ b/source/reference/command/aggregate.txt @@ -49,7 +49,7 @@ The command has following syntax: Rather than run the :dbcommand:`aggregate` command directly, most users should use the :method:`db.collection.aggregate()` helper - provided in :mongosh:`mongosh ` or the equivalent helper in + provided in :binary:`~bin.mongosh` or the equivalent helper in their driver. In 2.6 and later, the :method:`db.collection.aggregate()` helper always returns a cursor. @@ -318,7 +318,7 @@ Example Rather than run the :dbcommand:`aggregate` command directly, most users should use the :method:`db.collection.aggregate()` helper - provided in :mongosh:`mongosh ` or the equivalent helper in + provided in :binary:`~bin.mongosh` or the equivalent helper in their driver. In 2.6 and later, the :method:`db.collection.aggregate()` helper always returns a cursor. @@ -356,7 +356,7 @@ element in the ``tags`` array that appears in the collection. cursor: { } } ) -In :mongosh:`mongosh `, this operation can use the +In :binary:`~bin.mongosh`, this operation can use the :method:`db.collection.aggregate()` helper as in the following: .. code-block:: javascript diff --git a/source/reference/command/authenticate.txt b/source/reference/command/authenticate.txt index ecb055f5260..a9a98ab3e83 100644 --- a/source/reference/command/authenticate.txt +++ b/source/reference/command/authenticate.txt @@ -13,7 +13,7 @@ authenticate .. dbcommand:: authenticate Authenticates using the x.509 authentication mechanism. When using - :mongosh:`mongosh `, use the :method:`db.auth()` helper + :binary:`~bin.mongosh`, use the :method:`db.auth()` helper as follows: .. tip:: diff --git a/source/reference/command/balancerCollectionStatus.txt b/source/reference/command/balancerCollectionStatus.txt index e199143823d..fb5c2b35026 100644 --- a/source/reference/command/balancerCollectionStatus.txt +++ b/source/reference/command/balancerCollectionStatus.txt @@ -34,7 +34,7 @@ Definition Specify the full namespace (".") of the sharded collection. - :mongosh:`mongosh ` provides a wrapper method + :binary:`~bin.mongosh` provides a wrapper method :method:`sh.balancerCollectionStatus()`. Access Control diff --git a/source/reference/command/buildInfo.txt b/source/reference/command/buildInfo.txt index bca4894d962..5fc4f77aa0b 100644 --- a/source/reference/command/buildInfo.txt +++ b/source/reference/command/buildInfo.txt @@ -21,7 +21,7 @@ buildInfo { buildInfo: 1 } - In :mongosh:`mongosh `, call :dbcommand:`buildInfo` in the + In :binary:`~bin.mongosh`, call :dbcommand:`buildInfo` in the following form: .. code-block:: javascript diff --git a/source/reference/command/commitReshardCollection.txt b/source/reference/command/commitReshardCollection.txt index 79335fc8408..cb31f55e9da 100644 --- a/source/reference/command/commitReshardCollection.txt +++ b/source/reference/command/commitReshardCollection.txt @@ -34,7 +34,7 @@ Definition commitReshardCollection: "." } - The :mongosh:`MongoDB Shell ` provides a wrapper method + The :binary:`~bin.mongosh` provides a wrapper method :method:`sh.commitReshardCollection()`. Example diff --git a/source/reference/command/commitTransaction.txt b/source/reference/command/commitTransaction.txt index 10be1020145..9f014ca206b 100644 --- a/source/reference/command/commitTransaction.txt +++ b/source/reference/command/commitTransaction.txt @@ -24,7 +24,7 @@ Definition against the ``admin`` database and run within a :method:`Session`. Rather than run the :dbcommand:`commitTransaction` command directly, most users should use the driver method or the - :mongosh:`mongosh ` :method:`Session.commitTransaction()` + :binary:`~bin.mongosh` :method:`Session.commitTransaction()` helper. The command has the following syntax: diff --git a/source/reference/command/count.txt b/source/reference/command/count.txt index d12937e375d..6fb4759317e 100644 --- a/source/reference/command/count.txt +++ b/source/reference/command/count.txt @@ -133,7 +133,7 @@ Definition - :mongosh:`mongosh ` also provides the following wrapper methods for :dbcommand:`count`: + :binary:`~bin.mongosh` also provides the following wrapper methods for :dbcommand:`count`: - :method:`~cursor.count()` - :method:`db.collection.estimatedDocumentCount()` diff --git a/source/reference/command/createIndexes.txt b/source/reference/command/createIndexes.txt index 12de222c8a6..d29e44e0ead 100644 --- a/source/reference/command/createIndexes.txt +++ b/source/reference/command/createIndexes.txt @@ -506,7 +506,7 @@ Definition - :mongosh:`mongosh ` provides the methods + :binary:`~bin.mongosh` provides the methods :method:`db.collection.createIndex()` and :method:`db.collection.createIndexes()` as wrappers for the :dbcommand:`createIndexes` command. @@ -529,7 +529,7 @@ Index Names .. include:: /includes/extracts/4.2-changes-index-names.rst Starting in version 4.2, the :dbcommand:`createIndexes` command and -:mongosh:`mongosh ` helpers +:binary:`~bin.mongosh` helpers :method:`db.collection.createIndex()` and :method:`db.collection.createIndexes()` report an error if you create an index with one name, and then try to create the same index @@ -655,7 +655,7 @@ Hidden Option ` set to ``4.2`` on MongoDB 4.4 binaries. To change the ``hidden`` option for existing indexes, you can use the -following :mongosh:`mongosh ` methods: +following :binary:`~bin.mongosh` methods: - :method:`db.collection.hideIndex()` diff --git a/source/reference/command/currentOp.txt b/source/reference/command/currentOp.txt index de46352a260..1e8281e4509 100644 --- a/source/reference/command/currentOp.txt +++ b/source/reference/command/currentOp.txt @@ -26,7 +26,7 @@ Definition { currentOp: 1 } - :mongosh:`mongosh ` provides the :method:`db.currentOp()` + :binary:`~bin.mongosh` provides the :method:`db.currentOp()` wrapper for the :dbcommand:`currentOp` command. .. note:: @@ -683,7 +683,7 @@ Output Fields .. data:: currentOp.opid The identifier for the operation. You can pass this value to - :method:`db.killOp()` in :mongosh:`mongosh ` to terminate the + :method:`db.killOp()` in :binary:`~bin.mongosh` to terminate the operation. .. include:: /includes/extracts/warning-terminating-ops-method.rst diff --git a/source/reference/command/dbStats.txt b/source/reference/command/dbStats.txt index 763be8963e4..8c0d564d5b0 100644 --- a/source/reference/command/dbStats.txt +++ b/source/reference/command/dbStats.txt @@ -58,7 +58,7 @@ Definition .. include:: /includes/extracts/4.2-changes-stats-scaleFactor.rst - In :mongosh:`mongosh `, the :method:`db.stats()` function + In :binary:`~bin.mongosh`, the :method:`db.stats()` function provides a wrapper around :dbcommand:`dbStats`. Behavior diff --git a/source/reference/command/delete.txt b/source/reference/command/delete.txt index 9ed55b4eddd..5f034783b0d 100644 --- a/source/reference/command/delete.txt +++ b/source/reference/command/delete.txt @@ -383,7 +383,7 @@ Specify ``hint`` for Delete Operations .. versionadded:: 4.4 -In :mongosh:`mongosh `, create a ``members`` collection +In :binary:`~bin.mongosh`, create a ``members`` collection with the following documents: .. code-block:: javascript diff --git a/source/reference/command/drop.txt b/source/reference/command/drop.txt index 116bdd5af27..d9ac3430ab1 100644 --- a/source/reference/command/drop.txt +++ b/source/reference/command/drop.txt @@ -45,7 +45,7 @@ drop .. versionadded:: 4.4 - :mongosh:`mongosh ` provides the equivalent helper method + :binary:`~bin.mongosh` provides the equivalent helper method :method:`db.collection.drop()`. Behavior diff --git a/source/reference/command/dropAllUsersFromDatabase.txt b/source/reference/command/dropAllUsersFromDatabase.txt index 8f1b201f741..8e0a0a838f7 100644 --- a/source/reference/command/dropAllUsersFromDatabase.txt +++ b/source/reference/command/dropAllUsersFromDatabase.txt @@ -82,7 +82,7 @@ Required Access Example ------- -The following sequence of operations in :mongosh:`mongosh ` drops +The following sequence of operations in :binary:`~bin.mongosh` drops every user from the ``products`` database: .. code-block:: javascript diff --git a/source/reference/command/dropDatabase.txt b/source/reference/command/dropDatabase.txt index 4521cd5335b..676fa8d5baf 100644 --- a/source/reference/command/dropDatabase.txt +++ b/source/reference/command/dropDatabase.txt @@ -62,7 +62,7 @@ Definition .. versionadded:: 4.4 - :mongosh:`mongosh ` also provides the helper method + :binary:`~bin.mongosh` also provides the helper method :method:`db.dropDatabase()`. Behavior @@ -125,7 +125,7 @@ dropped database. Example ------- -The following example in :mongosh:`mongosh ` uses the ``use +The following example in :binary:`~bin.mongosh` uses the ``use `` operation to switch the current database to the ``temp`` database and then uses the :dbcommand:`dropDatabase` command to drop the ``temp`` database: diff --git a/source/reference/command/dropIndexes.txt b/source/reference/command/dropIndexes.txt index c598996a627..34375d808fd 100644 --- a/source/reference/command/dropIndexes.txt +++ b/source/reference/command/dropIndexes.txt @@ -177,7 +177,7 @@ Examples db.runCommand( { dropIndexes: "collection", index: "age_1" }) - :mongosh:`mongosh ` provides the helper methods + :binary:`~bin.mongosh` provides the helper methods :method:`db.collection.dropIndex()` and :method:`db.collection.dropIndexes()`: diff --git a/source/reference/command/dropUser.txt b/source/reference/command/dropUser.txt index a18a40b2f6f..82ad3b488c1 100644 --- a/source/reference/command/dropUser.txt +++ b/source/reference/command/dropUser.txt @@ -80,7 +80,7 @@ Required Access Example ------- -The following sequence of operations in :mongosh:`mongosh ` removes +The following sequence of operations in :binary:`~bin.mongosh` removes ``reportUser1`` from the ``products`` database: .. code-block:: javascript diff --git a/source/reference/command/enableSharding.txt b/source/reference/command/enableSharding.txt index 8130b9820fa..b4cd1dd0d5d 100644 --- a/source/reference/command/enableSharding.txt +++ b/source/reference/command/enableSharding.txt @@ -20,7 +20,7 @@ Definition for a database, you can use the :dbcommand:`shardCollection` command to shard collections in that database. - The :mongosh:`mongosh ` method :method:`sh.enableSharding()` + The :binary:`~bin.mongosh` method :method:`sh.enableSharding()` wraps the :dbcommand:`enableSharding` command. Syntax diff --git a/source/reference/command/find.txt b/source/reference/command/find.txt index 4148ebad8b1..ad7a62553c5 100644 --- a/source/reference/command/find.txt +++ b/source/reference/command/find.txt @@ -24,7 +24,7 @@ Definition Rather than run the :dbcommand:`find` command directly, you can use the :method:`db.collection.find()` helper provided in - :mongosh:`mongosh ` or the equivalent helper in the + :binary:`~bin.mongosh` or the equivalent helper in the drivers. Syntax @@ -598,7 +598,7 @@ the data confirmed as having been written to a majority of the nodes. The :dbcommand:`getMore` command uses the ``readConcern`` level specified in the originating :dbcommand:`find` command. -A ``readConcern`` can be specified for the :mongosh:`mongosh ` method +A ``readConcern`` can be specified for the :binary:`~bin.mongosh` method :method:`db.collection.find()` using the :method:`cursor.readConcern` method: @@ -628,7 +628,7 @@ command with the collation specified: } ) -:mongosh:`mongosh ` provides the :method:`cursor.collation()` to +:binary:`~bin.mongosh` provides the :method:`cursor.collation()` to specify :ref:`collation ` for a :method:`db.collection.find()` operation. diff --git a/source/reference/command/findAndModify.txt b/source/reference/command/findAndModify.txt index 4200ccab3e7..c031f3addf2 100644 --- a/source/reference/command/findAndModify.txt +++ b/source/reference/command/findAndModify.txt @@ -552,7 +552,7 @@ field: { "value" : null, "ok" : 1 } -:mongosh:`mongosh ` and many :term:`drivers ` +:binary:`~bin.mongosh` and many :term:`drivers ` provide a :method:`~db.collection.findAndModify()` helper method. Using the shell helper, this previous operation can take the following form: @@ -962,7 +962,7 @@ Specify ``hint`` for ``findAndModify`` Operations .. versionadded:: 4.4 -In :mongosh:`mongosh `, create a ``members`` collection +In :binary:`~bin.mongosh`, create a ``members`` collection with the following documents: .. code-block:: javascript diff --git a/source/reference/command/fsync.txt b/source/reference/command/fsync.txt index 5f5ea8b04c6..5c762287599 100644 --- a/source/reference/command/fsync.txt +++ b/source/reference/command/fsync.txt @@ -114,7 +114,7 @@ backup of the data set and the journal together as a single unit. in the return document. After ``{ fsync: 1, lock: true }`` runs on a :binary:`~bin.mongod`, all -write operations will block. :mongosh:`mongosh ` provides a +write operations will block. :binary:`~bin.mongosh` provides a helper method :method:`db.fsyncLock()`. @@ -205,7 +205,7 @@ currently locked: return false; } -After loading this function into your :mongosh:`mongosh ` session, +After loading this function into your :binary:`~bin.mongosh` session, call it with the following syntax: .. code-block:: javascript diff --git a/source/reference/command/fsyncUnlock.txt b/source/reference/command/fsyncUnlock.txt index c0f5a2eb27f..0a34a51ef65 100644 --- a/source/reference/command/fsyncUnlock.txt +++ b/source/reference/command/fsyncUnlock.txt @@ -70,7 +70,7 @@ Definition .. tip:: - :mongosh:`mongosh ` provides the helper method + :binary:`~bin.mongosh` provides the helper method :method:`db.fsyncUnlock()`. Examples diff --git a/source/reference/command/getFreeMonitoringStatus.txt b/source/reference/command/getFreeMonitoringStatus.txt index 4893907d34e..61d895f5e96 100644 --- a/source/reference/command/getFreeMonitoringStatus.txt +++ b/source/reference/command/getFreeMonitoringStatus.txt @@ -24,7 +24,7 @@ getFreeMonitoringStatus db.adminCommand( { getFreeMonitoringStatus: 1 } ) - :mongosh:`mongosh ` provides the + :binary:`~bin.mongosh` provides the :method:`db.getFreeMonitoringStatus()` helper for the command. Access Control diff --git a/source/reference/command/getLog.txt b/source/reference/command/getLog.txt index 6a6a9640e82..60603e7cd73 100644 --- a/source/reference/command/getLog.txt +++ b/source/reference/command/getLog.txt @@ -142,7 +142,7 @@ Outside ``mongosh`` with ``jq`` .. include:: /includes/fact-use-jq-with-structured-logging.rst To use ``jq`` with :dbcommand:`getLog` output, you must use the -:option:`--eval ` option to :mongosh:`mongosh `. +:option:`--eval ` option to :binary:`~bin.mongosh`. The following operation uses ``jq`` to filter on the **REPL** :ref:`component ` to present only those log messages associated with replication: @@ -152,7 +152,7 @@ messages associated with replication: mongosh --quiet --eval "db.adminCommand( { getLog:'global'} ).log.forEach(x => {print(x)})" | jq -c '. | select(.c=="REPL")' Be sure to provide any necessary connection-specific parameters to -:mongosh:`mongosh ` as needed, such as :option:`--host +:binary:`~bin.mongosh` as needed, such as :option:`--host ` or :option:`--port `. See :ref:`log-message-parsing` for more examples of filtering log output @@ -171,7 +171,7 @@ Examples Retrieve Available Log Filters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The following operation, run from :mongosh:`mongosh `, +The following operation, run from :binary:`~bin.mongosh`, returns the available log filters for passing to :dbcommand:`getLog`: .. code-block:: javascript @@ -188,7 +188,7 @@ The operation returns the following document: Retrieve Recent Events from Log ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The following operation, run from :mongosh:`mongosh `, +The following operation, run from :binary:`~bin.mongosh`, retrieves the most recent ``global`` events for the :binary:`~bin.mongod`: diff --git a/source/reference/command/hello.txt b/source/reference/command/hello.txt index 423d7061f9c..e694d9a81bf 100644 --- a/source/reference/command/hello.txt +++ b/source/reference/command/hello.txt @@ -58,7 +58,7 @@ add a log comment associated with the command. db.runCommand( { hello: 1, saslSupportedMechs: "", comment: } ) -The :method:`db.hello()` method in :mongosh:`mongosh ` +The :method:`db.hello()` method in :binary:`~bin.mongosh` provides a wrapper around :dbcommand:`hello`. Behavior diff --git a/source/reference/command/hostInfo.txt b/source/reference/command/hostInfo.txt index 261d57db06b..1af1fb6be5e 100644 --- a/source/reference/command/hostInfo.txt +++ b/source/reference/command/hostInfo.txt @@ -26,7 +26,7 @@ hostInfo db.hostInfo() db.adminCommand( { "hostInfo" : 1 } ) - In :mongosh:`mongosh ` you can use :method:`db.hostInfo()` + In :binary:`~bin.mongosh` you can use :method:`db.hostInfo()` as a helper to access :dbcommand:`hostInfo`. The output of :dbcommand:`hostInfo` on a Linux system will resemble the following: diff --git a/source/reference/command/killOp.txt b/source/reference/command/killOp.txt index 558f0c9acfe..a9782e46fde 100644 --- a/source/reference/command/killOp.txt +++ b/source/reference/command/killOp.txt @@ -18,7 +18,7 @@ Definition .. dbcommand:: killOp Terminates an operation as specified by the operation ID. - :mongosh:`mongosh ` provides the + :binary:`~bin.mongosh` provides the :method:`db.killOp()` helper. To find operations and their corresponding IDs, see :pipeline:`$currentOp` or :method:`db.currentOp()`. diff --git a/source/reference/command/listCollections.txt b/source/reference/command/listCollections.txt index a657355836a..c158fddad7d 100644 --- a/source/reference/command/listCollections.txt +++ b/source/reference/command/listCollections.txt @@ -18,7 +18,7 @@ Definition Retrieve information, i.e. the name and options, about the collections and :doc:`views ` in a database. Specifically, the command returns a document that contains information with which to create a - cursor to the collection information. :mongosh:`mongosh ` + cursor to the collection information. :binary:`~bin.mongosh` provides the :method:`db.getCollectionInfos()` and the :method:`db.getCollectionNames()` helper methods. diff --git a/source/reference/command/listDatabases.txt b/source/reference/command/listDatabases.txt index 1872908530f..62723b92f30 100644 --- a/source/reference/command/listDatabases.txt +++ b/source/reference/command/listDatabases.txt @@ -110,7 +110,7 @@ When :doc:`authentication ` is enabled: .. note:: - For :mongosh:`mongosh ` connected to earlier + For :binary:`~bin.mongosh` connected to earlier versions of MongoDB deployment (e.g. 3.6.10), - If the user has :authaction:`listDatabases` action on the cluster diff --git a/source/reference/command/listIndexes.txt b/source/reference/command/listIndexes.txt index 1460385b4a8..0bf667773ec 100644 --- a/source/reference/command/listIndexes.txt +++ b/source/reference/command/listIndexes.txt @@ -20,7 +20,7 @@ Definition the command returns a document that contains information with which to create a cursor to the index information. Index information includes the keys and options used to create the index. - :mongosh:`mongosh ` provides the + :binary:`~bin.mongosh` provides the :method:`db.collection.getIndexes()` helper. The command has the following form: diff --git a/source/reference/command/mapReduce.txt b/source/reference/command/mapReduce.txt index aa1924f92e8..370384114b3 100644 --- a/source/reference/command/mapReduce.txt +++ b/source/reference/command/mapReduce.txt @@ -395,7 +395,7 @@ associatd with :ref:`causally consistent sessions `. Map-Reduce Examples ------------------- -In :mongosh:`mongosh `, the :method:`db.collection.mapReduce()` +In :binary:`~bin.mongosh`, the :method:`db.collection.mapReduce()` method is a wrapper around the :dbcommand:`mapReduce` command. The following examples use the :method:`db.collection.mapReduce()` method: diff --git a/source/reference/command/reIndex.txt b/source/reference/command/reIndex.txt index f3e2f1a7793..e212a4e3b03 100644 --- a/source/reference/command/reIndex.txt +++ b/source/reference/command/reIndex.txt @@ -44,7 +44,7 @@ Definition * - reIndex - The name of the collection to reindex. - :mongosh:`mongosh ` provides a wrapper :method:`db.collection.reIndex()`. + :binary:`~bin.mongosh` provides a wrapper :method:`db.collection.reIndex()`. Behavior -------- diff --git a/source/reference/command/removeShard.txt b/source/reference/command/removeShard.txt index 3a09c8dc1a4..c6f4bda3b61 100644 --- a/source/reference/command/removeShard.txt +++ b/source/reference/command/removeShard.txt @@ -77,7 +77,7 @@ Change Streams Example ------- -From :mongosh:`mongosh `, the :dbcommand:`removeShard` +From :binary:`~bin.mongosh`, the :dbcommand:`removeShard` operation resembles the following: .. code-block:: javascript diff --git a/source/reference/command/removeShardFromZone.txt b/source/reference/command/removeShardFromZone.txt index e13d798fd56..87bb5ddca95 100644 --- a/source/reference/command/removeShardFromZone.txt +++ b/source/reference/command/removeShardFromZone.txt @@ -74,7 +74,7 @@ The command takes the following fields: -:mongosh:`mongosh ` provides the helper method +:binary:`~bin.mongosh` provides the helper method :method:`sh.removeShardFromZone()`. Behavior diff --git a/source/reference/command/renameCollection.txt b/source/reference/command/renameCollection.txt index b25279a81c2..e60659a7d28 100644 --- a/source/reference/command/renameCollection.txt +++ b/source/reference/command/renameCollection.txt @@ -208,7 +208,7 @@ The following example renames a collection named ``orders`` in the db.adminCommand( { renameCollection: "test.orders", to: "test.orders2014" } ) -:mongosh:`mongosh ` provides the +:binary:`~bin.mongosh` provides the :method:`db.collection.renameCollection()` helper for the command to rename collections within the *same* database. The following is equivalent to the previous example: diff --git a/source/reference/command/replSetGetConfig.txt b/source/reference/command/replSetGetConfig.txt index 36b45f20e7c..8ee79327b3f 100644 --- a/source/reference/command/replSetGetConfig.txt +++ b/source/reference/command/replSetGetConfig.txt @@ -73,7 +73,7 @@ To run, :dbcommand:`replSetGetConfig` must be issued against the .. versionadded:: 4.4 -:mongosh:`mongosh ` provides the :method:`rs.conf()` method +:binary:`~bin.mongosh` provides the :method:`rs.conf()` method that wraps the :dbcommand:`replSetGetConfig` command: .. code-block:: javascript @@ -200,7 +200,7 @@ command run with :ref:`commitmentStatus: true If ``true``, then the configuration has been committed, and the replica set can be reconfigured. To reconfigure the replica set, see :dbcommand:`replSetReconfig` command or the - :mongosh:`mongosh ` method :method:`rs.reconfig()`. + :binary:`~bin.mongosh` method :method:`rs.reconfig()`. If ``false``, then the configuration has not been committed, and the replica set cannot be reconfigured. diff --git a/source/reference/command/replSetGetStatus.txt b/source/reference/command/replSetGetStatus.txt index a1cc693451f..4ec726da66a 100644 --- a/source/reference/command/replSetGetStatus.txt +++ b/source/reference/command/replSetGetStatus.txt @@ -38,7 +38,7 @@ The command has the following syntax: - Starting in MongoDB 4.2.1 If you run :dbcommand:`replSetGetStatus` or the - :mongosh:`mongosh ` helper :method:`rs.status()` on a + :binary:`~bin.mongosh` helper :method:`rs.status()` on a member during its :ref:`initial sync ` (i.e. :replstate:`STARTUP2` state), the command returns :data:`replSetGetStatus.initialSyncStatus` metrics. @@ -63,7 +63,7 @@ The command has the following syntax: sync information. You cannot specify ``initialSync: 1`` in the - :mongosh:`mongosh ` helper :method:`rs.status()`. + :binary:`~bin.mongosh` helper :method:`rs.status()`. .. _rs-status-output: diff --git a/source/reference/command/replSetResizeOplog.txt b/source/reference/command/replSetResizeOplog.txt index f4a567d1a62..0f0cde4efa1 100644 --- a/source/reference/command/replSetResizeOplog.txt +++ b/source/reference/command/replSetResizeOplog.txt @@ -230,7 +230,7 @@ Examples Change the Maximum Oplog Size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use the :method:`db.collection.stats()` :mongosh:`mongosh ` +Use the :method:`db.collection.stats()` :binary:`~bin.mongosh` method to display the current maximum oplog size, ``maxSize``, in megabytes. For example: @@ -276,7 +276,7 @@ The above command returns: Change the Minimum Oplog Retention Period ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod` +1. Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod` replica set member. #. *Optional*. Use the :method:`db.serverStatus()` command to verify diff --git a/source/reference/command/reshardCollection.txt b/source/reference/command/reshardCollection.txt index 9dcb9107387..016cefa28c1 100644 --- a/source/reference/command/reshardCollection.txt +++ b/source/reference/command/reshardCollection.txt @@ -113,7 +113,7 @@ Definition - Optional. To maintain or add :ref:`zones `, specify the zones for your collection in an array. - The :mongosh:`MongoDB Shell ` provides a wrapper method + The :binary:`~bin.mongosh` provides a wrapper method :method:`sh.reshardCollection()`. Resharding Process diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index e67cfd5ed3e..ddfb42cacaf 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -47,7 +47,7 @@ For example: db.runCommand({ serverStatus: 1}).metrics.commands db.runCommand({ serverStatus: 1}).metrics.commands.update -:mongosh:`mongosh ` provides the :method:`db.serverStatus()` +:binary:`~bin.mongosh` provides the :method:`db.serverStatus()` wrapper for the :dbcommand:`serverStatus` command. .. seealso:: diff --git a/source/reference/command/setFreeMonitoring.txt b/source/reference/command/setFreeMonitoring.txt index 1359e97b851..3ae2d558f75 100644 --- a/source/reference/command/setFreeMonitoring.txt +++ b/source/reference/command/setFreeMonitoring.txt @@ -41,7 +41,7 @@ setFreeMonitoring explicitly disabled. That is, you do not need to re-enable each time you start the server. - :mongosh:`mongosh ` provides the following helper methods + :binary:`~bin.mongosh` provides the following helper methods for :dbcommand:`setFreeMonitoring`: - :method:`db.enableFreeMonitoring()` diff --git a/source/reference/command/shutdown.txt b/source/reference/command/shutdown.txt index bb4820a05d4..2cd7bda8c0d 100644 --- a/source/reference/command/shutdown.txt +++ b/source/reference/command/shutdown.txt @@ -93,7 +93,7 @@ See :ref:`cmd-shutdown-access-control` for more information. For a :binary:`~bin.mongod` started *without* :ref:`authentication`, you must run :dbcommand:`shutdown` from a client connected to the -localhost interface. For example, run :mongosh:`mongosh ` with +localhost interface. For example, run :binary:`~bin.mongosh` with the :option:`--host "127.0.0.1" ` option on the same host machine as the :binary:`~bin.mongod`. diff --git a/source/reference/command/splitChunk.txt b/source/reference/command/splitChunk.txt index f02507037a1..555f8a4d710 100644 --- a/source/reference/command/splitChunk.txt +++ b/source/reference/command/splitChunk.txt @@ -17,7 +17,7 @@ Definition An internal administrative command. To split chunks, use the :method:`sh.splitFind()` and :method:`sh.splitAt()` functions - in :mongosh:`mongosh `. + in :binary:`~bin.mongosh`. .. include:: /includes/warning-splitting-chunks.rst diff --git a/source/reference/command/top.txt b/source/reference/command/top.txt index 8446942c562..028553aca32 100644 --- a/source/reference/command/top.txt +++ b/source/reference/command/top.txt @@ -45,7 +45,7 @@ top Example ------- -At :mongosh:`mongosh ` prompt, use :dbcommand:`top` with the +At :binary:`~bin.mongosh` prompt, use :dbcommand:`top` with the following invocation: .. code-block:: javascript diff --git a/source/reference/command/update.txt b/source/reference/command/update.txt index c4192318f85..9d32e6786bd 100644 --- a/source/reference/command/update.txt +++ b/source/reference/command/update.txt @@ -22,7 +22,7 @@ Definition statements. The update methods provided by the MongoDB drivers use this command internally. - :mongosh:`mongosh ` provides the following helper methods: + :binary:`~bin.mongosh` provides the following helper methods: - :method:`db.collection.updateOne()` diff --git a/source/reference/command/updateZoneKeyRange.txt b/source/reference/command/updateZoneKeyRange.txt index 268414b7113..f20a8b9e521 100644 --- a/source/reference/command/updateZoneKeyRange.txt +++ b/source/reference/command/updateZoneKeyRange.txt @@ -109,7 +109,7 @@ Definition Only issue :dbcommand:`updateZoneKeyRange` when connected to a :binary:`~bin.mongos` instance. - :mongosh:`mongosh ` provides two helper methods: + :binary:`~bin.mongosh` provides two helper methods: - :method:`sh.updateZoneKeyRange()` for adding a range of shard key values to a zone. diff --git a/source/reference/command/usersInfo.txt b/source/reference/command/usersInfo.txt index 70b38352f41..e18d90b3bb3 100644 --- a/source/reference/command/usersInfo.txt +++ b/source/reference/command/usersInfo.txt @@ -127,7 +127,7 @@ requested information: - Returns information about the users in the database where the command is run. - :mongosh:`mongosh ` provides the + :binary:`~bin.mongosh` provides the :method:`db.getUsers()` helper for this invocation of the command. * - ``{ usersInfo: }`` @@ -135,7 +135,7 @@ requested information: - Return information about the a specific user that exists in the database where the command is run. - :mongosh:`mongosh ` provides the + :binary:`~bin.mongosh` provides the :method:`db.getUser()` helper for this invocation of the command. * - ``{ usersInfo: { user: , db: } }`` diff --git a/source/reference/command/validate.txt b/source/reference/command/validate.txt index 4194ab8519a..ea4b53bda37 100644 --- a/source/reference/command/validate.txt +++ b/source/reference/command/validate.txt @@ -41,7 +41,7 @@ The command has the following syntax: repair: // Optional, added in MongoDB 5.0 } ) -:mongosh:`mongosh ` also provides a wrapper +:binary:`~bin.mongosh` also provides a wrapper :method:`db.collection.validate()`. Command Fields diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index c8a320023bb..26d61b87fa0 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -45,7 +45,7 @@ Collections to Support Sharded Cluster Operations list on the sharding-internals page. To access the ``config`` database and view the list of collections that -support sharding operations, connect :mongosh:`mongosh ` to a +support sharding operations, connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance in a sharded cluster and issue the following: .. code-block:: javascript @@ -492,7 +492,7 @@ replica sets and sharded clusters. Do not manually modify or drop these collections. To access these collections for a :binary:`~bin.mongod` or -:binary:`~bin.mongos` instance, connect :mongosh:`mongosh ` to the +:binary:`~bin.mongos` instance, connect :binary:`~bin.mongosh` to the instance. .. data:: config.system.sessions diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index f8be3f8eee6..66960433bba 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -2176,7 +2176,7 @@ Core Options - other members of the deployment if the instance is part of a replica set or a sharded cluster - - :mongosh:`mongosh ` + - :binary:`~bin.mongosh` - drivers that support the ``OP_COMPRESSED`` message format. @@ -2799,9 +2799,9 @@ Key Management Configuration Options and Kerberos authentication. The SASL hostname overrides the hostname only for the configuration of SASL and Kerberos. - For :mongosh:`mongosh ` and other MongoDB tools to connect to + For :binary:`~bin.mongosh` and other MongoDB tools to connect to the new :setting:`~security.sasl.hostName`, see the - ``gssapiHostName`` option in :mongosh:`mongosh ` and other + ``gssapiHostName`` option in :binary:`~bin.mongosh` and other tools. @@ -2826,7 +2826,7 @@ Key Management Configuration Options .. important:: Ensure that your driver supports alternate service names. - For :mongosh:`mongosh ` and other MongoDB tools to + For :binary:`~bin.mongosh` and other MongoDB tools to connect to the new :setting:`~security.sasl.serviceName`, see the ``gssapiServiceName`` option. diff --git a/source/reference/connection-string.txt b/source/reference/connection-string.txt index cc917ed0465..56831c397af 100644 --- a/source/reference/connection-string.txt +++ b/source/reference/connection-string.txt @@ -214,7 +214,7 @@ reconfiguring clients. In order to leverage the DNS seed list, use a connection string prefix of ``mongodb+srv`` rather than the standard ``mongodb``. The ``+srv`` indicates to the client that the hostname that follows corresponds to a -DNS SRV record. The driver or :mongosh:`mongosh ` will then +DNS SRV record. The driver or :binary:`~bin.mongosh` will then query the DNS for the record to determine which hosts are running the :binary:`~bin.mongod` instances. @@ -314,7 +314,7 @@ string in the standard format would be: .. see:: :ref:`example-connect-mongo-using-srv` provides an example of - connecting :mongosh:`mongosh ` to a replica set using + connecting :binary:`~bin.mongosh` to a replica set using the DNS Seed list Connection Format. @@ -330,7 +330,7 @@ Connection options are pairs in the following form: ``name=value``. - The option ``name`` is case insensitive when using a driver. - The option ``name`` is case insensitive when using - :mongosh:`mongosh `, or the version 4.2 or later legacy + :binary:`~bin.mongosh`, or the version 4.2 or later legacy :binary:`~bin.mongo` shell. - The option ``name`` is case sensitive when using a version 4.0 and @@ -619,7 +619,7 @@ Compression Options messages between the parties are uncompressed. Starting in MongoDB 4.0.5 (and MongoDB 3.6.10), - :mongosh:`mongosh ` supports the uri connection string + :binary:`~bin.mongosh` supports the uri connection string option :urioption:`compressors`. * - .. urioption:: zlibCompressionLevel @@ -651,7 +651,7 @@ Compression Options - ``9`` providing the best compression but at the slowest speed. - Not supported by :mongosh:`mongosh `. + Not supported by :binary:`~bin.mongosh`. .. _connection-pool-options: @@ -723,7 +723,7 @@ supported by the: - MongoDB drivers -- :mongosh:`mongosh ` +- :binary:`~bin.mongosh` - :binary:`~bin.mongofiles` @@ -824,7 +824,7 @@ The following connection string to a replica set specifies - :readconcern:`available <"available">` This connection string option is not available for - :mongosh:`mongosh `. Specify the read concern as an + :binary:`~bin.mongosh`. Specify the read concern as an :ref:`option to the specific operation `. @@ -1054,7 +1054,7 @@ credentials are authenticated against the ``admin`` database. session token are defined on your platform using their respective `AWS IAM environment variables `__ - :mongosh:`mongosh ` will use these environment + :binary:`~bin.mongosh` will use these environment variable values to authenticate; you do not need to specify them in the connection string. @@ -1215,7 +1215,7 @@ Miscellaneous Configuration - the :data:`system.profile.appName` field in the :doc:`database profiler ` output. - If you do not specify a custom app name, :mongosh:`mongosh ` + If you do not specify a custom app name, :binary:`~bin.mongosh` uses the default "``MongoDB Shell``". .. versionadded:: 4.0 @@ -1233,7 +1233,7 @@ Miscellaneous Configuration - ``false``. Disables retryable reads for the connection. - :mongosh:`mongosh ` does not support retryable reads. + :binary:`~bin.mongosh` does not support retryable reads. .. versionadded:: 4.2 @@ -1447,7 +1447,7 @@ as well, provide it with the ``AWS_SESSION_TOKEN`` You may also set these credentials on your platform using standard `AWS IAM environment variables `__. -:mongosh:`mongosh ` checks for the following environment +:binary:`~bin.mongosh` checks for the following environment variables when you use the ``MONGODB-AWS`` :urioption:`authentication mechanism `: diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index 953d6fe5ae9..2bada58895c 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -431,7 +431,7 @@ Glossary support the number of hosts on the contemporary Internet. ISODate - The international date format used by :mongosh:`mongosh ` + The international date format used by :binary:`~bin.mongosh` to display dates. The format is: ``YYYY-MM-DD HH:MM.SS.millis``. interrupt point @@ -731,7 +731,7 @@ Glossary A read request. MongoDB uses a :term:`JSON`-like query language that includes a variety of :term:`query operators ` with names that begin with a ``$`` character. In - :mongosh:`mongosh `, you can issue queries using the + :binary:`~bin.mongosh`, you can issue queries using the :method:`db.collection.find()` and :method:`db.collection.findOne()` methods. See :ref:`read-operations-queries`. @@ -839,7 +839,7 @@ Glossary seed list A seed list is used by drivers and clients (like - :mongosh:`mongosh `) for initial discovery of the replica + :binary:`~bin.mongosh`) for initial discovery of the replica set configuration. Seed lists can be provided as a list of ``host:port`` pairs (see :ref:`connections-standard-connection-string-format` or via DNS entries (see :ref:`connections-dns-seedlist`). diff --git a/source/reference/limits.txt b/source/reference/limits.txt index c77b194e360..174ae4236be 100644 --- a/source/reference/limits.txt +++ b/source/reference/limits.txt @@ -81,7 +81,7 @@ Naming Restrictions If your collection name includes special characters, such as the underscore character, or begins with numbers, then to access the collection use the :method:`db.getCollection()` method in - :mongosh:`mongosh ` or a :api:`similar method for your driver <>`. + :binary:`~bin.mongosh` or a :api:`similar method for your driver <>`. Namespace Length: @@ -419,7 +419,7 @@ Operations The limit raises from ``1,000`` to ``100,000`` writes. This limit also applies to legacy ``OP_INSERT`` messages. - The :method:`Bulk()` operations in :mongosh:`mongosh ` and + The :method:`Bulk()` operations in :binary:`~bin.mongosh` and comparable methods in the drivers do not have this limit. .. limit:: Views diff --git a/source/reference/local-database.txt b/source/reference/local-database.txt index f0ddf5975d8..be47e4e7641 100644 --- a/source/reference/local-database.txt +++ b/source/reference/local-database.txt @@ -111,7 +111,7 @@ Collections on Replica Set Members :data:`local.system.replset` holds the replica set's configuration object as its single document. To view the object's configuration - information, issue :method:`rs.conf()` from :mongosh:`mongosh `. + information, issue :method:`rs.conf()` from :binary:`~bin.mongosh`. You can also query this collection directly. .. data:: local.oplog.rs diff --git a/source/reference/log-messages.txt b/source/reference/log-messages.txt index 9e321780925..7fa43905388 100644 --- a/source/reference/log-messages.txt +++ b/source/reference/log-messages.txt @@ -635,7 +635,7 @@ Client Data ~~~~~~~~~~~ `MongoDB drivers `_ and -client applications (including :mongosh:`mongosh `) have the +client applications (including :binary:`~bin.mongosh`) have the ability to send identifying information at the time of connection to the server. After the connection is established, the client does not send the identifying information again unless the connection is dropped @@ -645,7 +645,7 @@ This identifying information is contained in the **attributes** field of the log entry. The exact information included varies by client. Below is a sample log message containing the client data document as -transmitted from a :mongosh:`mongosh ` connection. The client +transmitted from a :binary:`~bin.mongosh` connection. The client data is contained in the ``doc`` object in the **attributes** field: .. code-block:: javascript @@ -816,7 +816,7 @@ For example, the following sets the :setting:`default verbosity level } } ) -You would set these values from :mongosh:`mongosh `. +You would set these values from :binary:`~bin.mongosh`. ``db.setLogLevel()`` ```````````````````` @@ -832,7 +832,7 @@ parent. For example, the following sets the db.setLogLevel(-1, "query") -You would set this value from :mongosh:`mongosh `. +You would set this value from :binary:`~bin.mongosh`. .. [#slow-oplogs] @@ -943,7 +943,7 @@ Analyzing Client Types The following example analyzes the reported :ref:`client data ` of remote `MongoDB driver `__ -connections and client applications, including :mongosh:`mongosh `, +connections and client applications, including :binary:`~bin.mongosh`, and prints a total for each unique operating system type that connected, sorted by frequency: diff --git a/source/reference/method.txt b/source/reference/method.txt index e0bbecc27d9..cb1bc36abcb 100644 --- a/source/reference/method.txt +++ b/source/reference/method.txt @@ -431,7 +431,7 @@ Database * - :method:`db.getCollection()` - - Returns a collection or view object. Used to access collections with names that are not valid in :mongosh:`mongosh `. + - Returns a collection or view object. Used to access collections with names that are not valid in :binary:`~bin.mongosh`. * - :method:`db.getCollectionInfos()` @@ -770,7 +770,7 @@ User Management * - :method:`passwordPrompt()` - Prompts for the password as an alternative to specifying passwords - directly in various :mongosh:`mongosh ` user + directly in various :binary:`~bin.mongosh` user authentication/management methods. @@ -1261,7 +1261,7 @@ Native * - :method:`getHostName()` - - Returns the hostname of the system running :mongosh:`mongosh `. + - Returns the hostname of the system running :binary:`~bin.mongosh`. * - :method:`getMemInfo()` @@ -1273,7 +1273,7 @@ Native * - :doc:`/reference/method/isInteractive` - - Returns a boolean indicating whether :mongosh:`mongosh ` is + - Returns a boolean indicating whether :binary:`~bin.mongosh` is running in interactive or script mode. * - :method:`listFiles()` @@ -1314,15 +1314,15 @@ Native * - :doc:`/reference/method/sleep` - - Suspends :mongosh:`mongosh ` for a given period of time. + - Suspends :binary:`~bin.mongosh` for a given period of time. * - :method:`setVerboseShell()` - - Configures :mongosh:`mongosh ` to report operation timing. + - Configures :binary:`~bin.mongosh` to report operation timing. * - :doc:`/reference/method/version` - - Returns the current version of :mongosh:`mongosh ` instance. + - Returns the current version of :binary:`~bin.mongosh` instance. * - :method:`_isWindows()` diff --git a/source/reference/method/Date.txt b/source/reference/method/Date.txt index 3fd83a15632..b938f81cb7d 100644 --- a/source/reference/method/Date.txt +++ b/source/reference/method/Date.txt @@ -16,10 +16,10 @@ Date() :ref:`document-bson-type-date` object. - ``Date()`` returns the current date as a string in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. - ``new Date()`` returns the current date as a - :ref:`document-bson-type-date` object. :mongosh:`mongosh ` + :ref:`document-bson-type-date` object. :binary:`~bin.mongosh` wraps the :ref:`document-bson-type-date` object with the ``ISODate`` helper. The ``ISODate`` is in `UTC `__. @@ -90,7 +90,7 @@ following example: Return Date as ``Date`` Object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -:mongosh:`mongosh ` wraps objects of +:binary:`~bin.mongosh` wraps objects of :ref:`document-bson-type-date` type with the ``ISODate`` helper; however, the objects remain of type :ref:`document-bson-type-date`. diff --git a/source/reference/method/Mongo.getDB.txt b/source/reference/method/Mongo.getDB.txt index 25dde330ae3..1ae325dbaaa 100644 --- a/source/reference/method/Mongo.getDB.txt +++ b/source/reference/method/Mongo.getDB.txt @@ -16,7 +16,7 @@ Description .. method:: Mongo.getDB() Provides access to database objects from - :mongosh:`mongosh ` or from a JavaScript file. + :binary:`~bin.mongosh` or from a JavaScript file. The :method:`Mongo.getDB()` method has the following parameter: diff --git a/source/reference/method/Mongo.setCausalConsistency.txt b/source/reference/method/Mongo.setCausalConsistency.txt index 31b452ae144..e5309274c6b 100644 --- a/source/reference/method/Mongo.setCausalConsistency.txt +++ b/source/reference/method/Mongo.setCausalConsistency.txt @@ -50,9 +50,9 @@ Definition Example ------- -The following :mongosh:`mongosh ` operation enables causal +The following :binary:`~bin.mongosh` operation enables causal consistency on the :method:`Mongo` connection object associated with -:mongosh:`mongosh `'s global ``db`` variable: +:binary:`~bin.mongosh`'s global ``db`` variable: .. code-block:: javascript diff --git a/source/reference/method/Mongo.startSession.txt b/source/reference/method/Mongo.startSession.txt index 07e7d809302..af20daa7f78 100644 --- a/source/reference/method/Mongo.startSession.txt +++ b/source/reference/method/Mongo.startSession.txt @@ -18,7 +18,7 @@ Definition .. versionadded:: 3.6 Starts a :ref:`session ` for the connection. - :mongosh:`mongosh ` assigns the session id to commands associated + :binary:`~bin.mongosh` assigns the session id to commands associated with the session. The :method:`~Mongo.startSession()` method can take a document with @@ -77,7 +77,7 @@ Definition - Boolean. Enables or disables the ability to retry writes upon encountering transient network errors. - If you start :mongosh:`mongosh ` with the + If you start :binary:`~bin.mongosh` with the :option:`--retryWrites ` option, ``retryWrites`` is enabled by default for :method:`Mongo.startSession()`. @@ -97,7 +97,7 @@ Examples The following starts a session with causal consistency and retryable writes enabled on the :method:`Mongo` connection object associated with -:mongosh:`mongosh `'s global ``db`` variable: +:binary:`~bin.mongosh`'s global ``db`` variable: .. code-block:: javascript diff --git a/source/reference/method/Mongo.txt b/source/reference/method/Mongo.txt index 213593f0a06..1c519a43e01 100644 --- a/source/reference/method/Mongo.txt +++ b/source/reference/method/Mongo.txt @@ -18,7 +18,7 @@ Description .. method:: Mongo(host, ClientSideFieldLevelEncryptionOptions) JavaScript constructor to instantiate a database connection from - :mongosh:`mongosh ` or from a JavaScript file. + :binary:`~bin.mongosh` or from a JavaScript file. The :method:`Mongo()` method has the following parameters: @@ -80,7 +80,7 @@ If the database connection has an existing client-side field level encryption configuration, specifying ``ClientSideFieldLevelEncryptionOptions`` overrides that configuration. -For example, starting :mongosh:`mongosh ` +For example, starting :binary:`~bin.mongosh` with client-side field level encryption :ref:`command-line options ` enables client-side encryption for that connection. New database connections @@ -165,7 +165,7 @@ following parameters: If possible, consider defining the credentials provided in ``kmsProviders`` as environment variables, and then passing them - to :mongosh:`mongosh ` using the :option:`--eval + to :binary:`~bin.mongosh` using the :option:`--eval ` option. This minimizes the chances of credentials leaking into logs. See :ref:`field-level-encryption-data-key-create` for examples of @@ -261,7 +261,7 @@ Connect to a MongoDB Cluster ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following operation creates a new connection object from within a -:mongosh:`mongosh ` session: +:binary:`~bin.mongosh` session: .. code-block:: javascript @@ -284,7 +284,7 @@ Configuring client-side field level encryption for a :ref:`locally managed key ` requires specifying a base64-encoded 96-byte string with no line breaks. The following operation generates a key that meets the stated requirements and loads -it into :mongosh:`mongosh `: +it into :binary:`~bin.mongosh`: .. code-block:: bash :emphasize-lines: 1 @@ -294,7 +294,7 @@ it into :mongosh:`mongosh `: mongosh --nodb --shell --eval "var TEST_LOCAL_KEY='$TEST_LOCAL_KEY'" The following operation creates a new connection object from within a -:mongosh:`mongosh ` session. The +:binary:`~bin.mongosh` session. The :ref:`ClientSideFieldLevelEncryptionOptions` option specifies the required options for enabling client-side field level encryption using a locally managed key: @@ -345,7 +345,7 @@ Configuring client-side field level encryption for a :ref:`locally managed key ` requires specifying a base64-encoded 96-byte string with no line breaks. The following operation generates a key that meets the stated requirements and loads -it into :mongosh:`mongosh `: +it into :binary:`~bin.mongosh`: .. code-block:: bash :emphasize-lines: 1 @@ -355,7 +355,7 @@ it into :mongosh:`mongosh `: mongosh --nodb --shell --eval "var TEST_LOCAL_KEY='$TEST_LOCAL_KEY'" The following operation creates a new connection object from within a -:mongosh:`mongosh ` session. The +:binary:`~bin.mongosh` session. The :ref:`ClientSideFieldLevelEncryptionOptions` option specifies the required options for enabling :ref:`automatic client-side encryption ` on the ``hr.employees`` collection: diff --git a/source/reference/method/Mongo.watch.txt b/source/reference/method/Mongo.watch.txt index 4dffbbdbf8d..26fc4669426 100644 --- a/source/reference/method/Mongo.watch.txt +++ b/source/reference/method/Mongo.watch.txt @@ -271,7 +271,7 @@ privileges. Example ------- -The following operation in :mongosh:`mongosh ` opens a +The following operation in :binary:`~bin.mongosh` opens a change stream cursor on a replica set. The returned cursor reports on data changes to all the non-``system`` collections across all databases except for the ``admin``, ``local``, and the ``config`` databases. diff --git a/source/reference/method/ObjectId.toString.txt b/source/reference/method/ObjectId.toString.txt index 1f55b3fba7d..35241318b54 100644 --- a/source/reference/method/ObjectId.toString.txt +++ b/source/reference/method/ObjectId.toString.txt @@ -19,7 +19,7 @@ Example ------- The following example calls the :method:`~ObjectId.toString()` method -on an :method:`ObjectId()` instance in :mongosh:`mongosh `: +on an :method:`ObjectId()` instance in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/reference/method/Session.txt b/source/reference/method/Session.txt index 91a7168db0a..24ca36e8c81 100644 --- a/source/reference/method/Session.txt +++ b/source/reference/method/Session.txt @@ -17,9 +17,9 @@ Definition .. versionadded:: 3.6 - The Session object for the connection in :mongosh:`mongosh `. + The Session object for the connection in :binary:`~bin.mongosh`. To instantiate a session for the connection in - :mongosh:`mongosh `, see :method:`Mongo.startSession()`. For more + :binary:`~bin.mongosh`, see :method:`Mongo.startSession()`. For more information on sessions, see :ref:`sessions`. .. list-table:: @@ -29,7 +29,7 @@ Definition * - .. method:: Session.getDatabase() - - Access the specified database from the session in :mongosh:`mongosh `. + - Access the specified database from the session in :binary:`~bin.mongosh`. * - .. method:: Session.advanceClusterTime({ clusterTime: , signature: { hash: , keyId: } }) @@ -82,7 +82,7 @@ Example ------- The following example starts a session on the :method:`Mongo` -connection object associated with :mongosh:`mongosh `'s global +connection object associated with :binary:`~bin.mongosh`'s global ``db`` variable, and then uses the :method:`Session.getDatabase()` method to retrieve the database object associated with the session. diff --git a/source/reference/method/SessionOptions.txt b/source/reference/method/SessionOptions.txt index 1dae933d480..ad785e6468b 100644 --- a/source/reference/method/SessionOptions.txt +++ b/source/reference/method/SessionOptions.txt @@ -18,7 +18,7 @@ Definition .. versionadded:: 3.6 The options for a :method:`session ` in - :mongosh:`mongosh `. To access the :method:`SessionOptions` + :binary:`~bin.mongosh`. To access the :method:`SessionOptions` object, use the :method:`Session.getOptions()` method. The session options available are: @@ -44,7 +44,7 @@ Definition - Document. Specifies the :ref:`read concern `. - In :mongosh:`mongosh `, you can set the option when + In :binary:`~bin.mongosh`, you can set the option when you run :method:`Mongo.startSession()`. You can also access the ``readConcern`` option via the following methods: @@ -56,7 +56,7 @@ Definition - Document. Specifies the :ref:`read preference `. - In :mongosh:`mongosh `, you can set the option + In :binary:`~bin.mongosh`, you can set the option when you run :method:`Mongo.startSession()`. You can also access the ``readPreference`` option via the following methods: @@ -71,7 +71,7 @@ Definition encountering transient network errors, such as during failovers. - To enable retry writes, start :mongosh:`mongosh ` + To enable retry writes, start :binary:`~bin.mongosh` with the :option:`--retryWrites ` option. You can view whether ``retryWrites`` is enabled for a session @@ -83,7 +83,7 @@ Definition - Document. Specifies the :ref:`write concern `. - In :mongosh:`mongosh `, you can set the options + In :binary:`~bin.mongosh`, you can set the options when you run :method:`Mongo.startSession()`. You can also access the ``writeConcern`` option via the following methods: diff --git a/source/reference/method/UUID.txt b/source/reference/method/UUID.txt index 015cfc8f46b..a111d05f8e3 100644 --- a/source/reference/method/UUID.txt +++ b/source/reference/method/UUID.txt @@ -39,7 +39,7 @@ Generates a BSON :abbr:`UUID (Universally unique identifier)` object. .. versionchanged:: 3.6 - In earlier versions of :mongosh:`mongosh `, + In earlier versions of :binary:`~bin.mongosh`, :method:`UUID` required a hexadecimal string argument. See the :v3.4:`3.4 manual `. @@ -87,5 +87,5 @@ This command outputs a random UUID in the following form: .. versionchanged:: 3.6 - In earlier versions of :mongosh:`mongosh `, + In earlier versions of :binary:`~bin.mongosh`, :method:`UUID` required a hexadecimal string argument. diff --git a/source/reference/method/WriteResult.hasWriteConcernError.txt b/source/reference/method/WriteResult.hasWriteConcernError.txt index ad07eb9f4e3..bd931d504f8 100644 --- a/source/reference/method/WriteResult.hasWriteConcernError.txt +++ b/source/reference/method/WriteResult.hasWriteConcernError.txt @@ -15,7 +15,7 @@ Definition .. method:: WriteResult.hasWriteConcernError() - Returns ``true`` if the result of a :mongosh:`mongosh ` write + Returns ``true`` if the result of a :binary:`~bin.mongosh` write method has :data:`WriteResult.writeConcernError`. Otherwise, the method returns ``false``. diff --git a/source/reference/method/WriteResult.hasWriteError.txt b/source/reference/method/WriteResult.hasWriteError.txt index 5dcce522597..0c2024befb3 100644 --- a/source/reference/method/WriteResult.hasWriteError.txt +++ b/source/reference/method/WriteResult.hasWriteError.txt @@ -15,7 +15,7 @@ Definition .. method:: WriteResult.hasWriteError() - Returns ``true`` if the result of a :mongosh:`mongosh ` write + Returns ``true`` if the result of a :binary:`~bin.mongosh` write method has :data:`WriteResult.writeError`. Otherwise, the method returns ``false``. diff --git a/source/reference/method/WriteResult.txt b/source/reference/method/WriteResult.txt index 4083872baf6..75239fb96d0 100644 --- a/source/reference/method/WriteResult.txt +++ b/source/reference/method/WriteResult.txt @@ -15,7 +15,7 @@ Definition .. method:: WriteResult() - A wrapper that contains the result status of :mongosh:`mongosh ` + A wrapper that contains the result status of :binary:`~bin.mongosh` write methods. .. see:: diff --git a/source/reference/method/cd.txt b/source/reference/method/cd.txt index 2ec303f4995..c930c6e59ed 100644 --- a/source/reference/method/cd.txt +++ b/source/reference/method/cd.txt @@ -30,8 +30,8 @@ Definition - string - - A path on the file system local to :mongosh:`mongosh ` context. + - A path on the file system local to :binary:`~bin.mongosh` context. :method:`cd()` changes the directory context of - :mongosh:`mongosh ` and has no effect on the MongoDB server. + :binary:`~bin.mongosh` and has no effect on the MongoDB server. diff --git a/source/reference/method/cursor.addOption.txt b/source/reference/method/cursor.addOption.txt index 5f438beaf2e..1e38d8c5e2a 100644 --- a/source/reference/method/cursor.addOption.txt +++ b/source/reference/method/cursor.addOption.txt @@ -41,7 +41,7 @@ Definition - flag - - ``OP_QUERY`` wire protocol flag. For :mongosh:`mongosh `, + - ``OP_QUERY`` wire protocol flag. For :binary:`~bin.mongosh`, you can use the cursor flags listed below. For the driver-specific list, see your :driver:`driver documentation `. @@ -54,7 +54,7 @@ Definition Flags ----- -:mongosh:`mongosh ` provides several additional cursor flags to +:binary:`~bin.mongosh` provides several additional cursor flags to modify the behavior of the cursor. .. list-table:: diff --git a/source/reference/method/cursor.batchSize.txt b/source/reference/method/cursor.batchSize.txt index 947e16b0f3c..ae8f60e0924 100644 --- a/source/reference/method/cursor.batchSize.txt +++ b/source/reference/method/cursor.batchSize.txt @@ -22,7 +22,7 @@ Definition Specifies the number of documents to return in each batch of the response from the MongoDB instance. In most cases, modifying the batch size will - not affect the user or the application, as :mongosh:`mongosh ` and + not affect the user or the application, as :binary:`~bin.mongosh` and most :driver:`drivers ` return results as if MongoDB returned a single batch. @@ -62,7 +62,7 @@ Example The following example sets the batch size for the results of a query (i.e. :method:`~db.collection.find()`) to ``10``. The :method:`~cursor.batchSize()` method does not change the -output in :mongosh:`mongosh `, which, by default, iterates over the +output in :binary:`~bin.mongosh`, which, by default, iterates over the first 20 documents. .. code-block:: javascript diff --git a/source/reference/method/db.auth.txt b/source/reference/method/db.auth.txt index 0fc7940a801..cdc231ab156 100644 --- a/source/reference/method/db.auth.txt +++ b/source/reference/method/db.auth.txt @@ -202,7 +202,7 @@ Example Authenticate after Connecting to the Shell ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To authenticate after connecting :mongosh:`mongosh `, issue +To authenticate after connecting :binary:`~bin.mongosh`, issue :method:`db.auth()` in the user's :ref:`authentication database `: @@ -233,13 +233,13 @@ method to: Authenticate when Connecting to the Shell ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Alternatively, you can use :mongosh:`mongosh `'s +Alternatively, you can use :binary:`~bin.mongosh`'s command-line options :option:`--username `, :option:`--password `, :option:`--authenticationDatabase `, and :option:`--authenticationMechanism ` to specify authentication credentials when -connecting :mongosh:`mongosh `: +connecting :binary:`~bin.mongosh`: .. code-block:: bash diff --git a/source/reference/method/db.changeUserPassword.txt b/source/reference/method/db.changeUserPassword.txt index 03e435b6930..66bd41b4cfd 100644 --- a/source/reference/method/db.changeUserPassword.txt +++ b/source/reference/method/db.changeUserPassword.txt @@ -93,7 +93,7 @@ The following operation changes the password of the user named use products db.changeUserPassword("accountUser", passwordPrompt()) -When prompted in :mongosh:`mongosh ` for the password, enter +When prompted in :binary:`~bin.mongosh` for the password, enter the new password. You can also pass the new password directly to diff --git a/source/reference/method/db.collection.aggregate.txt b/source/reference/method/db.collection.aggregate.txt index e222c7ca864..ef6ede38459 100644 --- a/source/reference/method/db.collection.aggregate.txt +++ b/source/reference/method/db.collection.aggregate.txt @@ -249,12 +249,12 @@ Error Handling Cursor Behavior ~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, if the cursor returned from the +In :binary:`~bin.mongosh`, if the cursor returned from the :method:`db.collection.aggregate()` is not assigned to a variable using -the ``var`` keyword, then :mongosh:`mongosh ` automatically +the ``var`` keyword, then :binary:`~bin.mongosh` automatically iterates the cursor up to 20 times. See :doc:`/tutorial/iterate-a-cursor` for handling cursors in -:mongosh:`mongosh `. +:binary:`~bin.mongosh`. Cursors returned from aggregation only supports cursor methods that operate on evaluated cursors (i.e. cursors whose first batch has been diff --git a/source/reference/method/db.collection.createIndex.txt b/source/reference/method/db.collection.createIndex.txt index aa08fc9d4ee..cf15c31640e 100644 --- a/source/reference/method/db.collection.createIndex.txt +++ b/source/reference/method/db.collection.createIndex.txt @@ -688,7 +688,7 @@ Hidden Option ` set to ``4.2`` on MongoDB 4.4 binaries. To hide or unhide existing indexes, you can use the following -:mongosh:`mongosh ` methods: +:binary:`~bin.mongosh` methods: - :method:`db.collection.hideIndex()` diff --git a/source/reference/method/db.collection.createIndexes.txt b/source/reference/method/db.collection.createIndexes.txt index ed7e512036e..2f5d69ee5d8 100644 --- a/source/reference/method/db.collection.createIndexes.txt +++ b/source/reference/method/db.collection.createIndexes.txt @@ -695,7 +695,7 @@ Hidden Option ` set to ``4.2`` on MongoDB 4.4 binaries. To hide or unhide existing indexes, you can use the following -:mongosh:`mongosh ` methods: +:binary:`~bin.mongosh` methods: - :method:`db.collection.hideIndex()` diff --git a/source/reference/method/db.collection.deleteMany.txt b/source/reference/method/db.collection.deleteMany.txt index 4088726713d..75f302dc87d 100644 --- a/source/reference/method/db.collection.deleteMany.txt +++ b/source/reference/method/db.collection.deleteMany.txt @@ -277,7 +277,7 @@ Specify ``hint`` for Delete Operations .. versionadded:: 4.4 -In :mongosh:`mongosh `, create a ``members`` collection +In :binary:`~bin.mongosh`, create a ``members`` collection with the following documents: .. code-block:: javascript diff --git a/source/reference/method/db.collection.deleteOne.txt b/source/reference/method/db.collection.deleteOne.txt index c3af98cf186..493c025b3ae 100644 --- a/source/reference/method/db.collection.deleteOne.txt +++ b/source/reference/method/db.collection.deleteOne.txt @@ -286,7 +286,7 @@ Specify ``hint`` for Delete Operations .. versionadded:: 4.4 -In :mongosh:`mongosh `, create a ``members`` collection +In :binary:`~bin.mongosh`, create a ``members`` collection with the following documents: .. code-block:: javascript diff --git a/source/reference/method/db.collection.explain.txt b/source/reference/method/db.collection.explain.txt index d525afbf011..5a1e82a252a 100644 --- a/source/reference/method/db.collection.explain.txt +++ b/source/reference/method/db.collection.explain.txt @@ -274,7 +274,7 @@ following operation provides information on the ).sort( { quantity: -1 } ).hint( { category: 1, quantity: -1 } ) For a list of query modifiers available, run the following in -:mongosh:`mongosh `: +:binary:`~bin.mongosh`: .. code-block:: javascript @@ -285,7 +285,7 @@ Iterate the ``explain().find()`` Return Cursor :method:`db.collection.explain().find() ` returns a cursor to the explain results. If run interactively in -:mongosh:`mongosh `, :mongosh:`mongosh ` automatically +:binary:`~bin.mongosh`, :binary:`~bin.mongosh` automatically iterates the cursor using the ``.next()`` method. For scripts, however, you must explicitly call ``.next()`` (or its alias ``.finish()``) to return the results: diff --git a/source/reference/method/db.collection.find.txt b/source/reference/method/db.collection.find.txt index 6dba91ae24e..e4406ff5ab0 100644 --- a/source/reference/method/db.collection.find.txt +++ b/source/reference/method/db.collection.find.txt @@ -104,7 +104,7 @@ See :ref:`Projection Examples `. Cursor Handling ~~~~~~~~~~~~~~~ -Executing :method:`db.collection.find()` in :mongosh:`mongosh ` +Executing :method:`db.collection.find()` in :binary:`~bin.mongosh` automatically iterates the cursor to display up to the first 20 documents. Type ``it`` to continue iteration. @@ -672,7 +672,7 @@ Iterate the Returned Cursor The :method:`~db.collection.find()` method returns a :ref:`cursor ` to the results. -In :mongosh:`mongosh `, if the returned cursor is not assigned to a +In :binary:`~bin.mongosh`, if the returned cursor is not assigned to a variable using the ``var`` keyword, the cursor is automatically iterated to access up to the first 20 documents that match the query. You can set the ``DBQuery.shellBatchSize`` variable to change the number of automatically @@ -737,7 +737,7 @@ to iterate the cursor and access the documents: Modify the Cursor Behavior ~~~~~~~~~~~~~~~~~~~~~~~~~~ -:mongosh:`mongosh ` and the :driver:`drivers +:binary:`~bin.mongosh` and the :driver:`drivers ` provide several cursor methods that call on the *cursor* returned by the :method:`~db.collection.find()` method to modify its behavior. diff --git a/source/reference/method/db.collection.latencyStats.txt b/source/reference/method/db.collection.latencyStats.txt index d273119dbb7..edc24bac2ed 100644 --- a/source/reference/method/db.collection.latencyStats.txt +++ b/source/reference/method/db.collection.latencyStats.txt @@ -49,7 +49,7 @@ Examples -------- You can run :method:`~db.collection.latencyStats()` in -:mongosh:`mongosh ` as follows: +:binary:`~bin.mongosh` as follows: .. code-block:: javascript diff --git a/source/reference/method/db.collection.update.txt b/source/reference/method/db.collection.update.txt index 9d6cfd65fd7..0464735ece8 100644 --- a/source/reference/method/db.collection.update.txt +++ b/source/reference/method/db.collection.update.txt @@ -998,7 +998,7 @@ with :method:`~db.collection.update()`. Using ``upsert`` with ``multi`` (Match) ``````````````````````````````````````` - From :mongosh:`mongosh `, insert the following + From :binary:`~bin.mongosh`, insert the following documents into a ``books`` collection: .. code-block:: javascript @@ -1299,7 +1299,7 @@ Update Elements Match ``arrayFilters`` Criteria To update all array elements which match a specified criteria, use the :ref:`arrayFilters ` parameter. -In :mongosh:`mongosh `, create a ``students`` +In :binary:`~bin.mongosh`, create a ``students`` collection with the following documents: .. code-block:: javascript @@ -1340,7 +1340,7 @@ You can also use the :ref:`arrayFilters ` parameter to update specific document fields within an array of documents. -In :mongosh:`mongosh `, create a ``students2`` +In :binary:`~bin.mongosh`, create a ``students2`` collection with the following documents: .. code-block:: javascript @@ -1408,7 +1408,7 @@ Specify ``hint`` for Update Operations .. versionadded:: 4.2 -In :mongosh:`mongosh `, create a ``members`` +In :binary:`~bin.mongosh`, create a ``members`` collection with the following documents: .. code-block:: javascript @@ -1510,7 +1510,7 @@ Specify Collation .. include:: /includes/extracts/collation-option.rst -In :mongosh:`mongosh `, create a collection named +In :binary:`~bin.mongosh`, create a collection named ``myColl`` with the following documents: .. code-block:: javascript diff --git a/source/reference/method/db.copyDatabase.txt b/source/reference/method/db.copyDatabase.txt index d770e97656b..12692ae202f 100644 --- a/source/reference/method/db.copyDatabase.txt +++ b/source/reference/method/db.copyDatabase.txt @@ -32,7 +32,7 @@ Definition the current :binary:`~bin.mongod` instance or within the current :binary:`~bin.mongod`. - The :mongosh:`mongosh ` helper method :method:`db.copyDatabase()` + The :binary:`~bin.mongosh` helper method :method:`db.copyDatabase()` takes the following arguments: .. list-table:: diff --git a/source/reference/method/db.disableFreeMonitoring.txt b/source/reference/method/db.disableFreeMonitoring.txt index 319150c9d05..3ffe956dff8 100644 --- a/source/reference/method/db.disableFreeMonitoring.txt +++ b/source/reference/method/db.disableFreeMonitoring.txt @@ -51,7 +51,7 @@ privilege. Example ------- -To disable free monitoring, run the following in :mongosh:`mongosh `: +To disable free monitoring, run the following in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/reference/method/db.dropDatabase.txt b/source/reference/method/db.dropDatabase.txt index 735eb44b2c7..b44239c3260 100644 --- a/source/reference/method/db.dropDatabase.txt +++ b/source/reference/method/db.dropDatabase.txt @@ -114,7 +114,7 @@ collections in the dropped database. Example ------- -The following example in :mongosh:`mongosh ` uses the ``use +The following example in :binary:`~bin.mongosh` uses the ``use `` operation to switch the current database to the ``temp`` database and then uses the :method:`db.dropDatabase()` method to drops the ``temp`` database: diff --git a/source/reference/method/db.enableFreeMonitoring.txt b/source/reference/method/db.enableFreeMonitoring.txt index e44998e0f81..941c5ce1641 100644 --- a/source/reference/method/db.enableFreeMonitoring.txt +++ b/source/reference/method/db.enableFreeMonitoring.txt @@ -73,7 +73,7 @@ privilege. Example ------- -To enable free monitoring, run the following in :mongosh:`mongosh `: +To enable free monitoring, run the following in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/reference/method/db.getCollection.txt b/source/reference/method/db.getCollection.txt index fd439370993..d6bee8eaa56 100644 --- a/source/reference/method/db.getCollection.txt +++ b/source/reference/method/db.getCollection.txt @@ -18,7 +18,7 @@ Definition Returns a :term:`collection` or a :doc:`view ` object that is functionally equivalent to using the ``db.`` syntax. The method is useful for a collection or a view whose name - might interact with :mongosh:`mongosh ` itself, such as names + might interact with :binary:`~bin.mongosh` itself, such as names that begin with ``_`` or that match a :doc:`database shell method `. diff --git a/source/reference/method/db.getFreeMonitoringStatus.txt b/source/reference/method/db.getFreeMonitoringStatus.txt index 40e420013e0..b7ce4abfa5a 100644 --- a/source/reference/method/db.getFreeMonitoringStatus.txt +++ b/source/reference/method/db.getFreeMonitoringStatus.txt @@ -14,7 +14,7 @@ db.getFreeMonitoringStatus Returns information on :doc:`free monitoring ` status. - :mongosh:`mongosh ` helper + :binary:`~bin.mongosh` helper :method:`db.getFreeMonitoringStatus()` is a wrapper around the :dbcommand:`getFreeMonitoringStatus` command. diff --git a/source/reference/method/db.getMongo.txt b/source/reference/method/db.getMongo.txt index 94290ccc930..913ab01f812 100644 --- a/source/reference/method/db.getMongo.txt +++ b/source/reference/method/db.getMongo.txt @@ -17,12 +17,12 @@ db.getMongo() :returns: The current database connection. :method:`db.getMongo()` runs when the shell initiates. Use this - command to test that :mongosh:`mongosh ` has a connection to + command to test that :binary:`~bin.mongosh` has a connection to the proper database instance. .. note:: - :mongosh:`mongosh ` has a sub-command, + :binary:`~bin.mongosh` has a sub-command, ``db.getMongo().setSecondaryOk()`` which is not available in ``mongosh``. Use :method:`Mongo.setReadPref()` instead. diff --git a/source/reference/method/db.getSiblingDB.txt b/source/reference/method/db.getSiblingDB.txt index 4f4ead2fe77..300ecb1567c 100644 --- a/source/reference/method/db.getSiblingDB.txt +++ b/source/reference/method/db.getSiblingDB.txt @@ -46,7 +46,7 @@ Example You can use :method:`db.getSiblingDB()` as an alternative to the ``use `` helper. This is particularly useful when writing scripts -using :mongosh:`mongosh ` where the ``use`` helper is not +using :binary:`~bin.mongosh` where the ``use`` helper is not available. Consider the following sequence of operations: .. code-block:: javascript diff --git a/source/reference/method/db.hostInfo.txt b/source/reference/method/db.hostInfo.txt index 73feb4f95d4..74fd05c9b97 100644 --- a/source/reference/method/db.hostInfo.txt +++ b/source/reference/method/db.hostInfo.txt @@ -16,7 +16,7 @@ db.hostInfo() that the :binary:`~bin.mongod` or :binary:`~bin.mongos` runs on. Some of the returned fields are only included on some platforms. - :method:`db.hostInfo()` provides a :mongosh:`mongosh ` helper + :method:`db.hostInfo()` provides a :binary:`~bin.mongosh` helper method around the :dbcommand:`hostInfo` command. The output of :method:`db.hostInfo()` on a Linux system will resemble the following: diff --git a/source/reference/method/db.shutdownServer.txt b/source/reference/method/db.shutdownServer.txt index 8be0a05234a..4ddda0b26e8 100644 --- a/source/reference/method/db.shutdownServer.txt +++ b/source/reference/method/db.shutdownServer.txt @@ -79,7 +79,7 @@ See :ref:`method-shutdown-access-control` for more information. For a :binary:`~bin.mongod` started *without* :ref:`authentication`, you must run :method:`db.shutdownServer()` from a client connected to the -localhost interface. For example, run :mongosh:`mongosh ` with the +localhost interface. For example, run :binary:`~bin.mongosh` with the :option:`--host "127.0.0.1" ` option on the same host machine as the :binary:`~bin.mongod`. diff --git a/source/reference/method/db.watch.txt b/source/reference/method/db.watch.txt index 64fd69286ac..3d89b300b86 100644 --- a/source/reference/method/db.watch.txt +++ b/source/reference/method/db.watch.txt @@ -271,7 +271,7 @@ privileges. Example ------- -The following operation in :mongosh:`mongosh ` opens a +The following operation in :binary:`~bin.mongosh` opens a change stream cursor on the ``hr`` database. The returned cursor reports on data changes to all the non-``system`` collections in that database. diff --git a/source/reference/method/getHostName.txt b/source/reference/method/getHostName.txt index 04ee0a1685d..59aad7dd199 100644 --- a/source/reference/method/getHostName.txt +++ b/source/reference/method/getHostName.txt @@ -12,4 +12,4 @@ getHostName() .. method:: getHostName() - :returns: The hostname of the system running :mongosh:`mongosh `. + :returns: The hostname of the system running :binary:`~bin.mongosh`. diff --git a/source/reference/method/hostname.txt b/source/reference/method/hostname.txt index 78e207b9b78..d5670c5882d 100644 --- a/source/reference/method/hostname.txt +++ b/source/reference/method/hostname.txt @@ -12,4 +12,4 @@ hostname() .. method:: hostname() - :returns: The hostname of the system running :mongosh:`mongosh `. + :returns: The hostname of the system running :binary:`~bin.mongosh`. diff --git a/source/reference/method/isInteractive.txt b/source/reference/method/isInteractive.txt index 2293fc1c2d0..f10d88c1176 100644 --- a/source/reference/method/isInteractive.txt +++ b/source/reference/method/isInteractive.txt @@ -15,7 +15,7 @@ isInteractive() .. versionadded:: 4.2 Returns a boolean value indicating if the current - :mongosh:`mongosh ` session is running in interactive mode or in + :binary:`~bin.mongosh` session is running in interactive mode or in script mode: - ``true`` if in interactive mode @@ -31,8 +31,8 @@ Interactive Mode Issuing Operations inside the Shell ``````````````````````````````````` -Connect :mongosh:`mongosh ` to a deployment. Inside -:mongosh:`mongosh `, run: +Connect :binary:`~bin.mongosh` to a deployment. Inside +:binary:`~bin.mongosh`, run: .. code-block:: javascript @@ -49,15 +49,15 @@ Create a JavaScript ``testExample.js`` file with the content: print("Is the shell in interactive mode? " + isInteractive() ); -Connect :mongosh:`mongosh ` to a deployment. Inside -:mongosh:`mongosh `, load the javascript file (see +Connect :binary:`~bin.mongosh` to a deployment. Inside +:binary:`~bin.mongosh`, load the javascript file (see :method:`load()`): .. code-block:: javascript let loadStatus = load("testExample.js"); //You may need to specify the path to the file -The method returns the following in :mongosh:`mongosh `: +The method returns the following in :binary:`~bin.mongosh`: .. code-block:: none @@ -74,8 +74,8 @@ Create a JavaScript ``testExample.js`` file with the content: print("\n\nIs the shell in interactive mode? " + isInteractive() ); From a terminal/command-line prompt (i.e. not inside -:mongosh:`mongosh `), specify the javascript file to -:mongosh:`mongosh ` in order to execute the file, as follows: +:binary:`~bin.mongosh`), specify the javascript file to +:binary:`~bin.mongosh` in order to execute the file, as follows: .. code-block:: bash diff --git a/source/reference/method/isWindows.txt b/source/reference/method/isWindows.txt index a9836f60afe..fd2560ea7bd 100644 --- a/source/reference/method/isWindows.txt +++ b/source/reference/method/isWindows.txt @@ -14,6 +14,6 @@ _isWindows() :returns: boolean. - Returns "true" if :mongosh:`mongosh ` is running on a + Returns "true" if :binary:`~bin.mongosh` is running on a system that is Windows, or "false" if the shell is running on a Unix or Linux systems. diff --git a/source/reference/method/js-client-side-field-level-encryption.txt b/source/reference/method/js-client-side-field-level-encryption.txt index 13133ca35ec..740cac1208f 100644 --- a/source/reference/method/js-client-side-field-level-encryption.txt +++ b/source/reference/method/js-client-side-field-level-encryption.txt @@ -14,7 +14,7 @@ Client-Side Field Level Encryption Methods .. include:: /includes/extracts/csfle-requires-enabling-encryption.rst -The following methods are for :mongosh:`mongosh ` +The following methods are for :binary:`~bin.mongosh` *only*. For instructions on implementing client-side field level encryption using a MongoDB 4.2+ compatible driver, defer to the driver documentation. See :ref:`field-level-encryption-drivers` for diff --git a/source/reference/method/js-database.txt b/source/reference/method/js-database.txt index 97af02d5a7d..dd6178d5f56 100644 --- a/source/reference/method/js-database.txt +++ b/source/reference/method/js-database.txt @@ -66,7 +66,7 @@ Database Methods * - :method:`db.getCollection()` - - Returns a collection or view object. Used to access collections with names that are not valid in :mongosh:`mongosh `. + - Returns a collection or view object. Used to access collections with names that are not valid in :binary:`~bin.mongosh`. * - :method:`db.getCollectionInfos()` diff --git a/source/reference/method/js-native.txt b/source/reference/method/js-native.txt index 7d4d0829cb9..878d95bb483 100644 --- a/source/reference/method/js-native.txt +++ b/source/reference/method/js-native.txt @@ -34,7 +34,7 @@ Native Methods * - :method:`getHostName()` - - Returns the hostname of the system running :mongosh:`mongosh `. + - Returns the hostname of the system running :binary:`~bin.mongosh`. * - :method:`getMemInfo()` @@ -46,7 +46,7 @@ Native Methods * - :doc:`/reference/method/isInteractive` - - Returns a boolean indicating whether :mongosh:`mongosh ` is + - Returns a boolean indicating whether :binary:`~bin.mongosh` is running in interactive or script mode. * - :method:`listFiles()` @@ -87,15 +87,15 @@ Native Methods * - :doc:`/reference/method/sleep` - - Suspends :mongosh:`mongosh ` for a given period of time. + - Suspends :binary:`~bin.mongosh` for a given period of time. * - :method:`setVerboseShell()` - - Configures :mongosh:`mongosh ` to report operation timing. + - Configures :binary:`~bin.mongosh` to report operation timing. * - :doc:`/reference/method/version` - - Returns the current version of :mongosh:`mongosh ` instance. + - Returns the current version of :binary:`~bin.mongosh` instance. * - :method:`_isWindows()` diff --git a/source/reference/method/js-user-management.txt b/source/reference/method/js-user-management.txt index 8dde961f77e..99b4fc09c9e 100644 --- a/source/reference/method/js-user-management.txt +++ b/source/reference/method/js-user-management.txt @@ -75,7 +75,7 @@ User Management Methods * - :method:`passwordPrompt()` - Prompts for the password as an alternative to specifying passwords - directly in various :mongosh:`mongosh ` user + directly in various :binary:`~bin.mongosh` user authentication/management methods. diff --git a/source/reference/method/listFiles.txt b/source/reference/method/listFiles.txt index 1ebd3b4184e..12381f90275 100644 --- a/source/reference/method/listFiles.txt +++ b/source/reference/method/listFiles.txt @@ -14,7 +14,7 @@ listFiles() Returns an array, containing one document per object in the directory. This function operates in the context of - :mongosh:`mongosh `. The fields included in the documents are: + :binary:`~bin.mongosh`. The fields included in the documents are: .. describe:: name diff --git a/source/reference/method/load.txt b/source/reference/method/load.txt index ad491f82884..47554eeffdc 100644 --- a/source/reference/method/load.txt +++ b/source/reference/method/load.txt @@ -47,7 +47,7 @@ Definition After executing a file with :method:`load()`, you may reference any functions or variables defined the file from within - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. Example ------- diff --git a/source/reference/method/md5sumFile.txt b/source/reference/method/md5sumFile.txt index e1afafc172b..d0305558c85 100644 --- a/source/reference/method/md5sumFile.txt +++ b/source/reference/method/md5sumFile.txt @@ -41,4 +41,4 @@ Description .. note:: The specified filename must refer to a file located on - the system running :mongosh:`mongosh `. + the system running :binary:`~bin.mongosh`. diff --git a/source/reference/method/mkdir.txt b/source/reference/method/mkdir.txt index 0ef2f5300f7..8c37a969eff 100644 --- a/source/reference/method/mkdir.txt +++ b/source/reference/method/mkdir.txt @@ -18,7 +18,7 @@ Description Creates a directory at the specified path. This method creates the entire path specified if the enclosing directory or directories do not already exit. The user running - :mongosh:`mongosh ` must have permission to create directories in + :binary:`~bin.mongosh` must have permission to create directories in the specified path. This method is equivalent to :command:`mkdir -p` with BSD or GNU utilities. diff --git a/source/reference/method/passwordPrompt.txt b/source/reference/method/passwordPrompt.txt index 257cd51a33a..6c0b6f2929d 100644 --- a/source/reference/method/passwordPrompt.txt +++ b/source/reference/method/passwordPrompt.txt @@ -18,7 +18,7 @@ Definition .. versionadded:: 4.2 - Prompts for the password in :mongosh:`mongosh `. The + Prompts for the password in :binary:`~bin.mongosh`. The entered password is not displayed in the shell. Use :method:`passwordPrompt()` in conjunction with methods that accept password as a parameter instead of specifying the password in diff --git a/source/reference/method/rs.add.txt b/source/reference/method/rs.add.txt index f10abc966ad..47bfc4b45ab 100644 --- a/source/reference/method/rs.add.txt +++ b/source/reference/method/rs.add.txt @@ -77,7 +77,7 @@ Definition :method:`rs.add()` provides a wrapper around some of the functionality of the :dbcommand:`replSetReconfig` :term:`database - command` and the corresponding :mongosh:`mongosh ` helper + command` and the corresponding :binary:`~bin.mongosh` helper :method:`rs.reconfig()`. See the :doc:`/reference/replica-configuration` document for full documentation of all replica set configuration options. @@ -95,7 +95,7 @@ Behavior :method:`rs.add()` can, in some cases, trigger an election for primary which will disconnect the shell (such as adding a new member with a higher priority than the current primary). In such cases, -:mongosh:`mongosh ` may display an error even if the operation +:binary:`~bin.mongosh` may display an error even if the operation succeeds. .. warning:: diff --git a/source/reference/method/rs.initiate.txt b/source/reference/method/rs.initiate.txt index 3393b768ff7..de0983b7923 100644 --- a/source/reference/method/rs.initiate.txt +++ b/source/reference/method/rs.initiate.txt @@ -77,7 +77,7 @@ members of the replica set and clients can connect. .. include:: /includes/warning-bind-ip-security-considerations.rst -Connect :mongosh:`mongosh ` to one of the :binary:`~bin.mongod` +Connect :binary:`~bin.mongosh` to one of the :binary:`~bin.mongod` instances and run :method:`rs.initiate()`. .. note:: diff --git a/source/reference/method/rs.reconfig.txt b/source/reference/method/rs.reconfig.txt index b52ac79214d..1588a7e4fcd 100644 --- a/source/reference/method/rs.reconfig.txt +++ b/source/reference/method/rs.reconfig.txt @@ -309,7 +309,7 @@ A replica set named ``rs0`` has the following configuration: The following sequence of operations updates the :rsconf:`members[n].priority` of the second member. The operations are -issued through a :mongosh:`mongosh ` session that is connected to +issued through a :binary:`~bin.mongosh` session that is connected to the primary. .. code-block:: javascript diff --git a/source/reference/method/rs.reconfigForPSASet.txt b/source/reference/method/rs.reconfigForPSASet.txt index 6633cc7a443..44452ca7a84 100644 --- a/source/reference/method/rs.reconfigForPSASet.txt +++ b/source/reference/method/rs.reconfigForPSASet.txt @@ -185,7 +185,7 @@ A replica set named ``rs0`` has the following configuration: } The following sequence of operations add a new secondary to the replica -set. The operations are issued in the :mongosh:`mongosh ` shell while +set. The operations are issued in the :binary:`~bin.mongosh` shell while connected to the primary. .. code-block:: javascript diff --git a/source/reference/method/rs.status.txt b/source/reference/method/rs.status.txt index 00f5482bf9f..440bd01bb3c 100644 --- a/source/reference/method/rs.status.txt +++ b/source/reference/method/rs.status.txt @@ -30,7 +30,7 @@ For an example and details on the output, see :ref:`replSetGetStatus `. - Starting in MongoDB 4.2.1 - If you run the :mongosh:`mongosh ` helper method + If you run the :binary:`~bin.mongosh` helper method :method:`rs.status()` (or the :dbcommand:`replSetGetStatus` command) on a member during its :ref:`initial sync ` (i.e. :replstate:`STARTUP2` state), @@ -58,4 +58,4 @@ For an example and details on the output, see :ref:`replSetGetStatus sync information. You cannot specify ``initialSync: 1`` to the - :mongosh:`mongosh ` helper method :method:`rs.status()`. + :binary:`~bin.mongosh` helper method :method:`rs.status()`. diff --git a/source/reference/method/rs.syncFrom.txt b/source/reference/method/rs.syncFrom.txt index 8f0265c1e5d..ea4418675ac 100644 --- a/source/reference/method/rs.syncFrom.txt +++ b/source/reference/method/rs.syncFrom.txt @@ -29,7 +29,7 @@ Behavior Example ------- -To use the :method:`rs.syncFrom()` helper in :mongosh:`mongosh `: +To use the :method:`rs.syncFrom()` helper in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/reference/method/setVerboseShell.txt b/source/reference/method/setVerboseShell.txt index 9820156c4a2..f05e7394cd0 100644 --- a/source/reference/method/setVerboseShell.txt +++ b/source/reference/method/setVerboseShell.txt @@ -13,7 +13,7 @@ setVerboseShell() .. method:: setVerboseShell() The :method:`setVerboseShell()` method configures - :mongosh:`mongosh ` to print the duration of each operation. + :binary:`~bin.mongosh` to print the duration of each operation. :method:`setVerboseShell()` has the form: @@ -30,7 +30,7 @@ Example The following example demonstrates the behavior of the verbose shell: -#. From :mongosh:`mongosh `, set verbose shell to ``true``: +#. From :binary:`~bin.mongosh`, set verbose shell to ``true``: .. code-block:: bash @@ -48,7 +48,7 @@ The following example demonstrates the behavior of the verbose shell: ); #. In addition to returning the results of the operation, - :mongosh:`mongosh ` now displays information about the duration of + :binary:`~bin.mongosh` now displays information about the duration of the operation: .. code-block:: bash diff --git a/source/reference/method/sh.abortReshardCollection.txt b/source/reference/method/sh.abortReshardCollection.txt index d53a27763ec..c82045cd02b 100644 --- a/source/reference/method/sh.abortReshardCollection.txt +++ b/source/reference/method/sh.abortReshardCollection.txt @@ -29,7 +29,7 @@ Definition the :method:`sh.abortReshardCollection()` method, the method returns an error. - The :mongosh:`MongoDB Shell ` method + The :binary:`~bin.mongosh` method :method:`sh.abortReshardCollection()` wraps the :dbcommand:`abortReshardCollection` command. diff --git a/source/reference/method/sh.balancerCollectionStatus.txt b/source/reference/method/sh.balancerCollectionStatus.txt index 7df90132ac8..a14483ac096 100644 --- a/source/reference/method/sh.balancerCollectionStatus.txt +++ b/source/reference/method/sh.balancerCollectionStatus.txt @@ -23,7 +23,7 @@ Definition of draining shards, zone violation or imbalance of chunks across shards. - The :mongosh:`mongosh ` method + The :binary:`~bin.mongosh` method :method:`sh.balancerCollectionStatus()` wraps the :dbcommand:`balancerCollectionStatus` command. diff --git a/source/reference/method/sh.commitReshardCollection.txt b/source/reference/method/sh.commitReshardCollection.txt index 6525dd31ac7..c396b13ec7d 100644 --- a/source/reference/method/sh.commitReshardCollection.txt +++ b/source/reference/method/sh.commitReshardCollection.txt @@ -26,7 +26,7 @@ Definition :method:`sh.commitReshardCollection()` method blocks writes early and forces the resharding operation to complete. - The :mongosh:`MongoDB Shell ` method + The :binary:`~bin.mongosh` method :method:`sh.commitReshardCollection()` wraps the :dbcommand:`commitReshardCollection` command. diff --git a/source/reference/method/sh.disableAutoSplit.txt b/source/reference/method/sh.disableAutoSplit.txt index 757c6621bea..cbab1d5c5f8 100644 --- a/source/reference/method/sh.disableAutoSplit.txt +++ b/source/reference/method/sh.disableAutoSplit.txt @@ -26,7 +26,7 @@ Description information on chunk splits, see :ref:`sharding-chunk-splits`. You can only run :method:`sh.disableAutoSplit()` from a - :mongosh:`mongosh ` session that is connected to a + :binary:`~bin.mongosh` session that is connected to a :binary:`~bin.mongos` instance. :method:`sh.disableAutoSplit()` errors if run on a :binary:`~bin.mongod` instance. diff --git a/source/reference/method/sh.enableAutoSplit.txt b/source/reference/method/sh.enableAutoSplit.txt index 04dd1ca9b57..ca0f5797837 100644 --- a/source/reference/method/sh.enableAutoSplit.txt +++ b/source/reference/method/sh.enableAutoSplit.txt @@ -24,7 +24,7 @@ Description :data:`config.settings` collection. You can only run :method:`sh.enableAutoSplit()` from a - :mongosh:`mongosh ` session that is connected to a + :binary:`~bin.mongosh` session that is connected to a :binary:`~bin.mongos` instance. :method:`sh.enableAutoSplit()` errors if run on a :binary:`~bin.mongod` instance. diff --git a/source/reference/method/sh.enableSharding.txt b/source/reference/method/sh.enableSharding.txt index 777c6f25bd8..a6d269daafe 100644 --- a/source/reference/method/sh.enableSharding.txt +++ b/source/reference/method/sh.enableSharding.txt @@ -17,7 +17,7 @@ Definition Enables sharding on the specified database. Once you enabled sharding for a database, you can use :method:`sh.shardCollection()` - to shard collections in that database. The :mongosh:`mongosh ` + to shard collections in that database. The :binary:`~bin.mongosh` method :method:`sh.enableSharding()` wraps the :dbcommand:`enableSharding` command. diff --git a/source/reference/method/sh.shardCollection.txt b/source/reference/method/sh.shardCollection.txt index 4eec673b684..18666ad75d0 100644 --- a/source/reference/method/sh.shardCollection.txt +++ b/source/reference/method/sh.shardCollection.txt @@ -21,7 +21,7 @@ Definition The shard key determines how MongoDB distributes the collection's documents among the shards. - The :mongosh:`mongosh ` method :method:`sh.shardCollection` + The :binary:`~bin.mongosh` method :method:`sh.shardCollection` wraps the :dbcommand:`shardCollection` command. :method:`sh.shardCollection()` takes the following diff --git a/source/reference/method/sleep.txt b/source/reference/method/sleep.txt index 427895f89bd..aef1ccb1636 100644 --- a/source/reference/method/sleep.txt +++ b/source/reference/method/sleep.txt @@ -46,7 +46,7 @@ Consider a low-priority bulk data import script. To avoid impacting other processes, you may suspend the shell after inserting each document, distributing the cost of insertion over a longer period of time. -The following example :mongosh:`mongosh ` script will load a JSON file containing +The following example :binary:`~bin.mongosh` script will load a JSON file containing an array of documents, and save one element every 100 milliseconds. .. code-block:: javascript diff --git a/source/reference/method/version.txt b/source/reference/method/version.txt index a53f45bb62d..9c5357632e5 100644 --- a/source/reference/method/version.txt +++ b/source/reference/method/version.txt @@ -12,5 +12,5 @@ version() .. method:: version() - :returns: The version of :mongosh:`mongosh ` as a string. + :returns: The version of :binary:`~bin.mongosh` as a string. diff --git a/source/reference/mongo.txt b/source/reference/mongo.txt index c17f84486aa..358cf27afc4 100644 --- a/source/reference/mongo.txt +++ b/source/reference/mongo.txt @@ -13,7 +13,7 @@ Legacy ``mongo`` Shell .. note:: The ``mongo`` shell has been deprecated in MongoDB v5.0. The - replacement is :mongosh:`mongosh `. + replacement is :binary:`~bin.mongosh`. Older ``mongo`` shell documentation is included with the corresponding documentation for that ``MongoDB`` release. @@ -30,7 +30,7 @@ Legacy ``mongo`` Shell Comparison of the ``mongo`` Shell and ``mongosh`` ------------------------------------------------- -The new MongoDB Shell (:mongosh:`mongosh `) offers numerous +The new MongoDB Shell (:binary:`~bin.mongosh`) offers numerous advantages over the legacy :binary:`~bin.mongo` shell, such as: - Improved syntax highlighting. diff --git a/source/reference/mongodb-extended-json.txt b/source/reference/mongodb-extended-json.txt index d99f2bb0c52..064016b40e1 100644 --- a/source/reference/mongodb-extended-json.txt +++ b/source/reference/mongodb-extended-json.txt @@ -16,7 +16,7 @@ MongoDB Extended JSON (v2) discussion on the Legacy MongoDB Extended JSON v1, see :doc:`/reference/mongodb-extended-json-v1`. - For supported data types in :mongosh:`mongosh `, see + For supported data types in :binary:`~bin.mongosh`, see :mongosh:`mongosh Data Types `. For supported data types in the legacy :binary:`~bin.mongo` shell, diff --git a/source/reference/operator/aggregation/accumulator.txt b/source/reference/operator/aggregation/accumulator.txt index bcb5f101e3e..76626a26978 100644 --- a/source/reference/operator/aggregation/accumulator.txt +++ b/source/reference/operator/aggregation/accumulator.txt @@ -304,7 +304,7 @@ Use ``$accumulator`` to Implement the ``$avg`` Operator functionality, but to illustrate the behavior and syntax of the :group:`$accumulator` operator with familiar logic. -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``books`` with the following documents: .. code-block:: javascript @@ -427,7 +427,7 @@ useful if you want to, for example: - Set the initial state to a different value based on the group being processed. -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``restaurants`` with the following documents: .. code-block:: javascript @@ -455,7 +455,7 @@ whether the restaurant's city matches the city in the user's profile: .. note:: - To execute this example in :mongosh:`mongosh `, replace + To execute this example in :binary:`~bin.mongosh`, replace ```` in the :ref:`initArgs ` with a string containing an actual city value, such as ``Bettles``. diff --git a/source/reference/operator/aggregation/binarySize.txt b/source/reference/operator/aggregation/binarySize.txt index dc099f3849b..fd67064d5ae 100644 --- a/source/reference/operator/aggregation/binarySize.txt +++ b/source/reference/operator/aggregation/binarySize.txt @@ -123,7 +123,7 @@ Consider the following examples: Example ------- -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``images`` with the following documents: .. code-block:: javascript diff --git a/source/reference/operator/aggregation/bsonSize.txt b/source/reference/operator/aggregation/bsonSize.txt index f680ab49d41..0abaa89f50e 100644 --- a/source/reference/operator/aggregation/bsonSize.txt +++ b/source/reference/operator/aggregation/bsonSize.txt @@ -50,7 +50,7 @@ Examples Return Sizes of Documents ~~~~~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``employees`` with the following documents: .. code-block:: javascript diff --git a/source/reference/operator/aggregation/bucket.txt b/source/reference/operator/aggregation/bucket.txt index 6fbfa469655..6e186ab4c75 100644 --- a/source/reference/operator/aggregation/bucket.txt +++ b/source/reference/operator/aggregation/bucket.txt @@ -196,7 +196,7 @@ Examples Bucket by Year and Filter by Bucket Results ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``artists`` with the following documents: .. code-block:: javascript @@ -329,7 +329,7 @@ Use $bucket with $facet to Bucket by Multiple Fields You can use the :pipeline:`$facet` stage to perform multiple :pipeline:`$bucket` aggregations in a single stage. -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``artwork`` with the following documents: .. code-block:: javascript diff --git a/source/reference/operator/aggregation/currentOp.txt b/source/reference/operator/aggregation/currentOp.txt index 02648a00ad2..7f4e7796e0f 100644 --- a/source/reference/operator/aggregation/currentOp.txt +++ b/source/reference/operator/aggregation/currentOp.txt @@ -24,7 +24,7 @@ Definition the :method:`db.aggregate()` helper on the ``admin`` database. The :pipeline:`$currentOp` aggregation stage is preferred over the - :dbcommand:`currentOp` command and its :mongosh:`mongosh ` + :dbcommand:`currentOp` command and its :binary:`~bin.mongosh` helper method :method:`db.currentOp()`. Because the :dbcommand:`currentOp` command and :method:`db.currentOp()` helper method return the results in a single document, the total size of the @@ -927,7 +927,7 @@ relevant for the operation: .. data:: $currentOp.opid The identifier for the operation. You can pass this value to - :method:`db.killOp()` in :mongosh:`mongosh ` to terminate the + :method:`db.killOp()` in :binary:`~bin.mongosh` to terminate the operation. .. include:: /includes/extracts/warning-terminating-ops-method.rst diff --git a/source/reference/operator/aggregation/first-array-element.txt b/source/reference/operator/aggregation/first-array-element.txt index 9f661d22b31..63c8cab1a6a 100644 --- a/source/reference/operator/aggregation/first-array-element.txt +++ b/source/reference/operator/aggregation/first-array-element.txt @@ -203,7 +203,7 @@ The operation returns the following documents: { "_id" : 2, "team" : "Bears", "progress" : -2 } { "_id" : 3, "team" : "Cobras", "progress" : "Not enough data." } -By default, :mongosh:`mongosh ` uses the 64-bit floating-point +By default, :binary:`~bin.mongosh` uses the 64-bit floating-point double for numbers. To improve precision, you can use :ref:`shell-type-decimal` instead. diff --git a/source/reference/operator/aggregation/group.txt b/source/reference/operator/aggregation/group.txt index da33e32d612..6c581655b48 100644 --- a/source/reference/operator/aggregation/group.txt +++ b/source/reference/operator/aggregation/group.txt @@ -371,7 +371,7 @@ This aggregation operation is equivalent to the following SQL statement: Pivot Data ~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``books`` with the following documents: .. code-block:: javascript diff --git a/source/reference/operator/aggregation/last-array-element.txt b/source/reference/operator/aggregation/last-array-element.txt index 1dc953d98aa..61d3f8cd6f9 100644 --- a/source/reference/operator/aggregation/last-array-element.txt +++ b/source/reference/operator/aggregation/last-array-element.txt @@ -200,7 +200,7 @@ The operation returns the following documents: { "_id" : 2, "team" : "Bears", "progress" : -2 } { "_id" : 3, "team" : "Cobras", "progress" : "Not enough data." } -By default, :mongosh:`mongosh ` uses the 64-bit floating-point +By default, :binary:`~bin.mongosh` uses the 64-bit floating-point double for numbers. To improve precision, you can use :ref:`shell-type-decimal` instead. diff --git a/source/reference/operator/aggregation/map.txt b/source/reference/operator/aggregation/map.txt index a9c4c5d42d0..c3967760edb 100644 --- a/source/reference/operator/aggregation/map.txt +++ b/source/reference/operator/aggregation/map.txt @@ -59,7 +59,7 @@ Examples Add to each element of an array using ``$map`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``grades`` with the following documents: .. code-block:: javascript @@ -105,7 +105,7 @@ This operation returns the following results: Truncate each array element with ``$map`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``deliveries`` with the following documents: .. code-block:: javascript @@ -151,7 +151,7 @@ This operation returns the following results: Convert Celsius Temperatures to Fahrenheit Using ``$map`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``temperatures`` with the following documents: .. code-block:: javascript diff --git a/source/reference/operator/aggregation/redact.txt b/source/reference/operator/aggregation/redact.txt index a1cffe175ca..ab20730713b 100644 --- a/source/reference/operator/aggregation/redact.txt +++ b/source/reference/operator/aggregation/redact.txt @@ -68,7 +68,7 @@ Examples The examples in this section use the :method:`db.collection.aggregate()` helper provided in the 2.6 version -of :mongosh:`mongosh `. +of :binary:`~bin.mongosh`. Evaluate Access at Every Document Level ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/reference/operator/aggregation/unwind.txt b/source/reference/operator/aggregation/unwind.txt index e5c7a219af9..25ae6f7c9f3 100644 --- a/source/reference/operator/aggregation/unwind.txt +++ b/source/reference/operator/aggregation/unwind.txt @@ -143,7 +143,7 @@ Examples Unwind Array ~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``inventory`` with the following document: .. code-block:: javascript @@ -175,7 +175,7 @@ of the ``sizes`` field which now holds a value from the original .. versionadded:: 3.2 -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``inventory2`` with the following documents: .. code-block:: javascript @@ -272,7 +272,7 @@ null, missing, or an empty array: Group by Unwound Values ~~~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``inventory2`` with the following documents: .. code-block:: javascript @@ -361,7 +361,7 @@ Third Stage: Unwind Embedded Arrays ~~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, create a sample collection named +In :binary:`~bin.mongosh`, create a sample collection named ``sales`` with the following documents: .. code-block:: javascript diff --git a/source/reference/operator/meta/explain.txt b/source/reference/operator/meta/explain.txt index 5ce469f86c5..08bcfc04fd9 100644 --- a/source/reference/operator/meta/explain.txt +++ b/source/reference/operator/meta/explain.txt @@ -29,7 +29,7 @@ $explain db.collection.find()._addSpecial( "$explain", 1 ) db.collection.find( { $query: {}, $explain: 1 } ) - In :mongosh:`mongosh `, you also can retrieve query plan + In :binary:`~bin.mongosh`, you also can retrieve query plan information through the :method:`~cursor.explain()` method: .. code-block:: javascript diff --git a/source/reference/operator/meta/hint.txt b/source/reference/operator/meta/hint.txt index 9376be980c1..45cd477dad6 100644 --- a/source/reference/operator/meta/hint.txt +++ b/source/reference/operator/meta/hint.txt @@ -20,7 +20,7 @@ $hint document. Use :operator:`$hint` for testing query performance and indexing - strategies. :mongosh:`mongosh ` provides a helper method + strategies. :binary:`~bin.mongosh` provides a helper method :method:`~cursor.hint()` for the :operator:`$hint` operator. Consider the following operation: diff --git a/source/reference/operator/meta/max.txt b/source/reference/operator/meta/max.txt index 5b5362bae35..65ad0de1820 100644 --- a/source/reference/operator/meta/max.txt +++ b/source/reference/operator/meta/max.txt @@ -22,7 +22,7 @@ Definition :method:`~db.collection.find()`. The :operator:`$max` specifies the upper bound for *all* keys of a specific index *in order*. - :mongosh:`mongosh ` provides the :method:`~cursor.max()` + :binary:`~bin.mongosh` provides the :method:`~cursor.max()` wrapper method: .. code-block:: javascript @@ -84,7 +84,7 @@ If you use :operator:`$max` with :operator:`$min` to specify a range: Examples -------- -The following examples use :mongosh:`mongosh ` wrappers. +The following examples use :binary:`~bin.mongosh` wrappers. Specify Exclusive Upper Bound ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/reference/operator/meta/maxTimeMS.txt b/source/reference/operator/meta/maxTimeMS.txt index 65197533de4..1774a8a1475 100644 --- a/source/reference/operator/meta/maxTimeMS.txt +++ b/source/reference/operator/meta/maxTimeMS.txt @@ -19,7 +19,7 @@ $maxTimeMS cursor. MongoDB interrupts the operation at the earliest following :term:`interrupt point`. - :mongosh:`mongosh ` provides the :method:`cursor.maxTimeMS()` method + :binary:`~bin.mongosh` provides the :method:`cursor.maxTimeMS()` method .. code-block:: javascript diff --git a/source/reference/operator/meta/min.txt b/source/reference/operator/meta/min.txt index d459fab9cce..297e30c4f5d 100644 --- a/source/reference/operator/meta/min.txt +++ b/source/reference/operator/meta/min.txt @@ -22,7 +22,7 @@ Definition :method:`~db.collection.find()`. The :operator:`$min` specifies the lower bound for *all* keys of a specific index *in order*. - :mongosh:`mongosh ` provides the :method:`~cursor.min()` + :binary:`~bin.mongosh` provides the :method:`~cursor.min()` wrapper method: .. code-block:: javascript @@ -85,7 +85,7 @@ If you use :operator:`$max` with :operator:`$min` to specify a range, Examples -------- -The following examples use :mongosh:`mongosh ` wrappers. +The following examples use :binary:`~bin.mongosh` wrappers. Specify Inclusive Lower Bound ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/reference/operator/meta/orderby.txt b/source/reference/operator/meta/orderby.txt index a82b33b910c..3ca15a9ee47 100644 --- a/source/reference/operator/meta/orderby.txt +++ b/source/reference/operator/meta/orderby.txt @@ -17,7 +17,7 @@ $orderby The :operator:`$orderby` operator sorts the results of a query in ascending or descending order. - :mongosh:`mongosh ` provides the :method:`cursor.sort()` + :binary:`~bin.mongosh` provides the :method:`cursor.sort()` method: .. code-block:: javascript diff --git a/source/reference/operator/meta/query.txt b/source/reference/operator/meta/query.txt index 699e14d7d5b..c1eede929ee 100644 --- a/source/reference/operator/meta/query.txt +++ b/source/reference/operator/meta/query.txt @@ -20,7 +20,7 @@ Definition The :operator:`$query` operator forces MongoDB to interpret an expression as a query. - The following :mongosh:`mongosh ` operations are equivalent, and + The following :binary:`~bin.mongosh` operations are equivalent, and return only those documents in the collection named ``collection`` where the ``age`` field equals ``25``. diff --git a/source/reference/operator/meta/showDiskLoc.txt b/source/reference/operator/meta/showDiskLoc.txt index 3fa8831e60d..a1a54b322a9 100644 --- a/source/reference/operator/meta/showDiskLoc.txt +++ b/source/reference/operator/meta/showDiskLoc.txt @@ -25,7 +25,7 @@ $showDiskLoc "offset": } - :mongosh:`mongosh ` provides the + :binary:`~bin.mongosh` provides the ``cursor.showDiskLoc()`` method for :operator:`$showDiskLoc`: .. code-block:: javascript diff --git a/source/reference/operator/update/bit.txt b/source/reference/operator/update/bit.txt index 4b058926d58..2190dd452bb 100644 --- a/source/reference/operator/update/bit.txt +++ b/source/reference/operator/update/bit.txt @@ -32,7 +32,7 @@ Definition .. note:: - All numbers in :mongosh:`mongosh ` are doubles, not + All numbers in :binary:`~bin.mongosh` are doubles, not integers. Use the ``NumberInt()`` or the ``NumberLong()`` constructor to specify integers. See :ref:`shell-type-int` or :ref:`shell-type-long` for more information. @@ -82,7 +82,7 @@ And the updated document has the following value for ``expdata``: { "_id" : 1, "expdata" : 8 } -:mongosh:`mongosh ` displays ``NumberInt(8)`` as ``8``. +:binary:`~bin.mongosh` displays ``NumberInt(8)`` as ``8``. Bitwise OR ~~~~~~~~~~ diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 184cfa95f96..dca17443a9e 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -514,7 +514,7 @@ Authentication Parameters mongod --setParameter scramIterationCount=12000 Or, if using the :dbcommand:`setParameter` command within - :mongosh:`mongosh `: + :binary:`~bin.mongosh`: .. code-block:: javascript @@ -552,7 +552,7 @@ Authentication Parameters mongod --setParameter scramSHA256IterationCount=20000 Or, if using the :dbcommand:`setParameter` command within - :mongosh:`mongosh `: + :binary:`~bin.mongosh`: .. code-block:: javascript @@ -1014,7 +1014,7 @@ General Parameters mongod --setParameter cursorTimeoutMillis=300000 Or, if using the :dbcommand:`setParameter` command within - :mongosh:`mongosh `: + :binary:`~bin.mongosh`: .. code-block:: javascript @@ -1604,7 +1604,7 @@ Logging Parameters mongod --setParameter "logComponentVerbosity={command: 3}" - :mongosh:`mongosh ` also provides the :method:`db.setLogLevel()` + :binary:`~bin.mongosh` also provides the :method:`db.setLogLevel()` to set the log level for a single component. For various ways to set the log verbosity level, see :ref:`log-messages-configure-verbosity`. @@ -2513,7 +2513,7 @@ Logical Session mirrorReads: '{samplingRate: 0.10}' Or if using the :dbcommand:`setParameter` command in a - :mongosh:`mongosh ` session that is connected to a running + :binary:`~bin.mongosh` session that is connected to a running :binary:`~bin.mongod`, do **not** enclose the document in quotes: .. code-block:: javascript @@ -2693,7 +2693,7 @@ Sharding Parameters mongos --setParameter maxTimeMSForHedgedReads=200 Or if using the :dbcommand:`setParameter` command in a - :mongosh:`mongosh ` session that is connected to a running + :binary:`~bin.mongosh` session that is connected to a running :binary:`~bin.mongos`: .. code-block:: javascript @@ -2750,7 +2750,7 @@ Sharding Parameters mongos --setParameter readHedgingMode=off Or if using the :dbcommand:`setParameter` command in a - :mongosh:`mongosh ` session that is connected to a running + :binary:`~bin.mongosh` session that is connected to a running :binary:`~bin.mongos`: .. code-block:: javascript @@ -2784,7 +2784,7 @@ Sharding Parameters mongod --setParameter shutdownTimeoutMillisForSignaledShutdown=250 Or if using the :dbcommand:`setParameter` command in a - :mongosh:`mongosh ` session that is connected to a running + :binary:`~bin.mongosh` session that is connected to a running :binary:`~bin.mongod`: .. code-block:: javascript @@ -2813,7 +2813,7 @@ Sharding Parameters mongos --setParameter mongosShutdownTimeoutMillisForSignaledShutdown=250 Or if using the :dbcommand:`setParameter` command in a - :mongosh:`mongosh ` session that is connected to a running + :binary:`~bin.mongosh` session that is connected to a running :binary:`~bin.mongos`: .. code-block:: javascript diff --git a/source/reference/program.txt b/source/reference/program.txt index 36a76baf5ac..1bd428496e7 100644 --- a/source/reference/program.txt +++ b/source/reference/program.txt @@ -26,7 +26,7 @@ The core components in the MongoDB package are: - the controller and query router for :term:`sharded clusters ` - * - :mongosh:`mongosh ` + * - :binary:`~bin.mongosh` - the interactive shell diff --git a/source/reference/program/mongo.txt b/source/reference/program/mongo.txt index 557b20f69d1..f97890f2fdf 100644 --- a/source/reference/program/mongo.txt +++ b/source/reference/program/mongo.txt @@ -26,7 +26,7 @@ Legacy ``mongo`` Shell .. note:: The ``mongo`` shell has been deprecated in MongoDB v5.0. The - replacement is :mongosh:`mongosh `. + replacement is :binary:`~bin.mongosh`. Older ``mongo`` shell documentation is included with the corresponding documentation for that ``MongoDB`` release. diff --git a/source/reference/program/mongod.txt b/source/reference/program/mongod.txt index c03ea4b9877..2366e6fdda6 100644 --- a/source/reference/program/mongod.txt +++ b/source/reference/program/mongod.txt @@ -742,7 +742,7 @@ Core Options - other members of the deployment if the instance is part of a replica set or a sharded cluster - - :mongosh:`mongosh ` + - :binary:`~bin.mongosh` - drivers that support the ``OP_COMPRESSED`` message format. diff --git a/source/reference/program/mongokerberos.txt b/source/reference/program/mongokerberos.txt index 9c176fce73e..b85d4439afe 100644 --- a/source/reference/program/mongokerberos.txt +++ b/source/reference/program/mongokerberos.txt @@ -210,7 +210,7 @@ Kerberos authentication process, including checking for proper DNS resolution, verification of the Kerberos client keytab file, and testing whether a ticket can be successfully granted. Running :binary:`~bin.mongokerberos` in client mode simulates the client -authentication procedure of :mongosh:`mongosh `. +authentication procedure of :binary:`~bin.mongosh`. Before you can use :binary:`~bin.mongokerberos` in client mode, you must first have configured Kerberos on your platform according to your @@ -293,7 +293,7 @@ Options client mode. :binary:`~bin.mongokerberos` will request a Kerberos ticket for this username as part of the validation procedure. Running :binary:`~bin.mongokerberos` in client mode simulates the client - authentication procedure of :mongosh:`mongosh `. + authentication procedure of :binary:`~bin.mongosh`. See :ref:`mongokeberos-usage-client` for example usage and expected output. diff --git a/source/reference/program/mongos.txt b/source/reference/program/mongos.txt index 2f6da81a27d..c093ca0ee19 100644 --- a/source/reference/program/mongos.txt +++ b/source/reference/program/mongos.txt @@ -573,7 +573,7 @@ Core Options - other members of the sharded cluster - - :mongosh:`mongosh ` + - :binary:`~bin.mongosh` - drivers that support the ``OP_COMPRESSED`` message format. diff --git a/source/reference/read-concern.txt b/source/reference/read-concern.txt index 51cb171052e..6b601f1ccd8 100644 --- a/source/reference/read-concern.txt +++ b/source/reference/read-concern.txt @@ -224,7 +224,7 @@ option to commands and methods that support read concern: readConcern: { level: } -To specify the read concern level for :mongosh:`mongosh ` +To specify the read concern level for :binary:`~bin.mongosh` method :method:`db.collection.find()`, use the :method:`cursor.readConcern()` method: diff --git a/source/reference/replica-set-protocol-versions.txt b/source/reference/replica-set-protocol-versions.txt index f8766827549..27b0e08ca1c 100644 --- a/source/reference/replica-set-protocol-versions.txt +++ b/source/reference/replica-set-protocol-versions.txt @@ -97,7 +97,7 @@ Before changing the protocol version for MongoDB 3.2 through MongoDB protocol version) has replicated from the primary to all secondaries. To check, on each secondary, check the :data:`optimes.lastCommittedOpTime.t ` field returned from -:method:`rs.status()`. For example, connect :mongosh:`mongosh ` to +:method:`rs.status()`. For example, connect :binary:`~bin.mongosh` to each secondary and run: .. code-block:: javascript @@ -117,7 +117,7 @@ the protocol version. To change the replica set protocol version, reconfigure (:method:`rs.reconfig`) the replica set with the new :rsconf:`protocolVersion`. For example, to upgrade to ``pv1``, connect -:mongosh:`mongosh ` to the current primary and perform the +:binary:`~bin.mongosh` to the current primary and perform the following sequence of operations: .. code-block:: bash diff --git a/source/reference/security-client-side-automatic-json-schema.txt b/source/reference/security-client-side-automatic-json-schema.txt index 9a54aeef6dc..0545d8ed0be 100644 --- a/source/reference/security-client-side-automatic-json-schema.txt +++ b/source/reference/security-client-side-automatic-json-schema.txt @@ -46,7 +46,7 @@ both the client *and* the server. The following automatic encryption rules for the ``hr.employees`` collection mark the ``taxid`` and ``taxid-short`` fields for automatic client-side field level encryption. Official MongoDB 4.2+ compatible :ref:`drivers -`, :mongosh:`mongosh `, and the 4.2 +`, :binary:`~bin.mongosh`, and the 4.2 or later legacy :binary:`~bin.mongo` shell configured with these rules automatically encrypt the ``taxid`` and ``taxid-short`` fields for write or read operations to the ``hr.employees`` collection. @@ -485,7 +485,7 @@ encryption rules specified :autoencryptkeyword:`encrypt` or ``medicalRecords.additionalItems``, automatic field level encryption fails and returns an errors. -The official MongoDB 4.2+ compatible drivers, :mongosh:`mongosh `, +The official MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the 4.2 or later legacy :binary:`~bin.mongo` shell require specifying the automatic encryption rules as part of creating the database connection object: @@ -634,7 +634,7 @@ encryption rules specified :autoencryptkeyword:`encrypt` or ``medicalRecords.additionalItems``, automatic field level encryption fails and returns an errors. -The official MongoDB 4.2+ compatible drivers, :mongosh:`mongosh `, +The official MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the 4.2 or later legacy :binary:`~bin.mongo` shell require specifying the automatic encryption rules as part of creating the database connection object: diff --git a/source/reference/security-client-side-encryption-appendix.txt b/source/reference/security-client-side-encryption-appendix.txt index 80020bad590..ef71339ed2f 100644 --- a/source/reference/security-client-side-encryption-appendix.txt +++ b/source/reference/security-client-side-encryption-appendix.txt @@ -46,7 +46,7 @@ Apache-licensed `libmongocrypt `__ library for performing client-side field level encryption and automatic decryption. -The official MongoDB 4.2+ compatible drivers, :mongosh:`mongosh `, +The official MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, and the 4.2 or later legacy :binary:`~bin.mongo` shell require access to the ``mongocryptd`` process on the client host machine. These clients search for the ``mongocryptd`` process in the system PATH by default. diff --git a/source/reference/security.txt b/source/reference/security.txt index 124b22f00cf..7230aabf97f 100644 --- a/source/reference/security.txt +++ b/source/reference/security.txt @@ -11,7 +11,7 @@ Security Reference :class: singlecol The following lists the security related methods available in -:mongosh:`mongosh ` as well as additional +:binary:`~bin.mongosh` as well as additional :ref:`security reference material `. Security Methods in ``mongosh`` @@ -83,7 +83,7 @@ User Management and Authentication Methods * - :method:`passwordPrompt()` - Prompts for the password as an alternative to specifying passwords - directly in various :mongosh:`mongosh ` user + directly in various :binary:`~bin.mongosh` user authentication/management methods. diff --git a/source/reference/sql-comparison.txt b/source/reference/sql-comparison.txt index a28a01b5188..7420751add0 100644 --- a/source/reference/sql-comparison.txt +++ b/source/reference/sql-comparison.txt @@ -121,7 +121,7 @@ exhaustive. * - Database Client - - :mongosh:`mongosh ` + - :binary:`~bin.mongosh` - ``mysql`` diff --git a/source/release-notes/5.0-compatibility.txt b/source/release-notes/5.0-compatibility.txt index 1aa61bf1772..e09eb22629e 100644 --- a/source/release-notes/5.0-compatibility.txt +++ b/source/release-notes/5.0-compatibility.txt @@ -132,7 +132,7 @@ Shell Changes ------------- The ``mongo`` shell has been deprecated in MongoDB v5.0. The -replacement shell is :mongosh:`mongosh `. +replacement shell is :binary:`~bin.mongosh`. Shell packaging also changes in MongoDB v5.0. Refer to the :mongosh:`installation instructions ` for further details. @@ -316,7 +316,7 @@ Deprecations - :binary:`~bin.mongo` The legacy ``mongo`` shell has been deprecated in MongoDB v5.0. The - replacement is :mongosh:`mongosh `. + replacement is :binary:`~bin.mongosh`. - :method:`db.printSlaveReplicationInfo()` diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index 9f19c7c9135..0c1fcf6db11 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -312,7 +312,7 @@ New MongoDB Shell: ``mongosh`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ``mongo`` shell has been deprecated in MongoDB v5.0. The -replacement shell is :mongosh:`mongosh `. The legacy ``mongo`` shell +replacement shell is :binary:`~bin.mongosh`. The legacy ``mongo`` shell will be removed in a future release. Shell packaging also changes in MongoDB v5.0. Refer to the @@ -322,7 +322,7 @@ Shell Support for GCP and Azure KMS Providers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Starting in MongoDB 5.0 (and MongoDB 4.4.5), the Google Cloud Platform -KMS and Azure Key Vault are supported in both :mongosh:`mongosh ` +KMS and Azure Key Vault are supported in both :binary:`~bin.mongosh` and the legacy :binary:`~bin.mongo` shell as :ref:`Key Management Service (KMS) ` providers for :doc:`/core/security-client-side-encryption`. diff --git a/source/sharding.txt b/source/sharding.txt index 50597500495..a2ccd50c79b 100644 --- a/source/sharding.txt +++ b/source/sharding.txt @@ -266,7 +266,7 @@ perform read or write operations. .. include:: /images/sharded-cluster-mixed.rst You can connect to a :binary:`~bin.mongos` the same way you connect to a -:binary:`~bin.mongod` using the :mongosh:`MongoDB Shell ` or a +:binary:`~bin.mongod` using the :binary:`~bin.mongosh` or a MongoDB :driver:`driver `. .. _sharding-strategy: diff --git a/source/tutorial/add-shards-to-shard-cluster.txt b/source/tutorial/add-shards-to-shard-cluster.txt index 4920cf340e8..83a6fb7754a 100644 --- a/source/tutorial/add-shards-to-shard-cluster.txt +++ b/source/tutorial/add-shards-to-shard-cluster.txt @@ -40,7 +40,7 @@ Add a Shard to a Cluster You interact with a sharded cluster by connecting to a :binary:`~bin.mongos` instance. -1. In :mongosh:`mongosh `, connect to the :binary:`~bin.mongos` +1. In :binary:`~bin.mongosh`, connect to the :binary:`~bin.mongos` instance. For example, if a :binary:`~bin.mongos` is accessible at ``mongos0.example.net`` on port ``27017``, issue the following command: diff --git a/source/tutorial/aggregation-zip-code-data-set.txt b/source/tutorial/aggregation-zip-code-data-set.txt index ba3efc7eb2d..ccf18041908 100644 --- a/source/tutorial/aggregation-zip-code-data-set.txt +++ b/source/tutorial/aggregation-zip-code-data-set.txt @@ -49,7 +49,7 @@ Each document in the ``zipcodes`` collection has the following form: ---------------------- All of the following examples use the :method:`aggregate() -` helper in :mongosh:`mongosh `. +` helper in :binary:`~bin.mongosh`. The :method:`aggregate() ` method uses the :ref:`aggregation pipeline ` to process @@ -60,7 +60,7 @@ the documents as they pass along the pipeline. Documents pass through the stages in sequence. The :method:`aggregate() ` method in -:mongosh:`mongosh ` provides a wrapper around the +:binary:`~bin.mongosh` provides a wrapper around the :dbcommand:`aggregate` database command. See the documentation for your :driver:`driver ` for a more idiomatic interface for data aggregation operations. diff --git a/source/tutorial/build-indexes-on-replica-sets.txt b/source/tutorial/build-indexes-on-replica-sets.txt index 858dd6bb715..fe2bebd08e5 100644 --- a/source/tutorial/build-indexes-on-replica-sets.txt +++ b/source/tutorial/build-indexes-on-replica-sets.txt @@ -164,7 +164,7 @@ Connect directly to the :binary:`~bin.mongod` instance running as a standalone on the new port and create the new index for this instance. -For example, connect :mongosh:`mongosh ` to the instance, and +For example, connect :binary:`~bin.mongosh` to the instance, and use the :method:`~db.collection.createIndex()` to create an ascending index on the ``username`` field of the ``records`` collection: @@ -265,7 +265,7 @@ When all the secondaries have the new index, step down the primary, restart it as a standalone using the procedure described above, and build the index on the former primary: -#. Use the :method:`rs.stepDown()` method in :mongosh:`mongosh ` +#. Use the :method:`rs.stepDown()` method in :binary:`~bin.mongosh` to step down the primary. Upon successful stepdown, the current primary becomes a secondary and the replica set members elect a new primary. diff --git a/source/tutorial/build-indexes-on-sharded-clusters.txt b/source/tutorial/build-indexes-on-sharded-clusters.txt index 021c553fa64..66474c114bf 100644 --- a/source/tutorial/build-indexes-on-sharded-clusters.txt +++ b/source/tutorial/build-indexes-on-sharded-clusters.txt @@ -89,7 +89,7 @@ Procedure A. Stop the Balancer ~~~~~~~~~~~~~~~~~~~~ -Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos` +Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance in the sharded cluster, and run :method:`sh.stopBalancer()` to disable the balancer: [#autosplit-stop]_ @@ -119,7 +119,7 @@ is disabled: B. Determine the Distribution of the Collection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -From :mongosh:`mongosh ` connected to the +From :binary:`~bin.mongosh` connected to the :binary:`~bin.mongos`, refresh the cached routing table for that :binary:`~bin.mongos` to avoid returning stale distribution information for the collection. Once refreshed, run @@ -280,7 +280,7 @@ Connect directly to the :binary:`~bin.mongod` instance running as a standalone on the new port and create the new index for this instance. -For example, connect :mongosh:`mongosh ` to the instance, +For example, connect :binary:`~bin.mongosh` to the instance, and use the :method:`db.collection.createIndex()` method to create an ascending index on the ``username`` field of the ``records`` collection: @@ -394,7 +394,7 @@ When all the secondaries for the shard have the new index, step down the primary for the shard, restart it as a standalone using the procedure described above, and build the index on the former primary: -#. Use the :method:`rs.stepDown()` method in :mongosh:`mongosh ` +#. Use the :method:`rs.stepDown()` method in :binary:`~bin.mongosh` to step down the primary. Upon successful stepdown, the current primary becomes a secondary and the replica set members elect a new primary. @@ -417,7 +417,7 @@ E. Restart the Balancer Once you finish the rolling index build for the affected shards, restart the balancer. -Connect :mongosh:`mongosh ` to a :binary:`~bin.mongos` +Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance in the sharded cluster, and run :method:`sh.startBalancer()`: [#autosplit-start]_ .. code-block:: javascript diff --git a/source/tutorial/change-hostnames-in-a-replica-set.txt b/source/tutorial/change-hostnames-in-a-replica-set.txt index 31199400e02..da6900c9367 100644 --- a/source/tutorial/change-hostnames-in-a-replica-set.txt +++ b/source/tutorial/change-hostnames-in-a-replica-set.txt @@ -112,7 +112,7 @@ This procedure uses the above :ref:`assumptions ` to the replica set's primary. In + #. Connect :binary:`~bin.mongosh` to the replica set's primary. In our example, the primary runs on port ``27017`` so you would issue the following command: @@ -144,7 +144,7 @@ This procedure uses the above :ref:`assumptions ` to the primary and step down the +#. Connect :binary:`~bin.mongosh` to the primary and step down the primary using the :method:`rs.stepDown()` method: .. code-block:: javascript @@ -172,10 +172,10 @@ This procedure uses the above :ref:`assumptions ` to the new primary. +#. Connect :binary:`~bin.mongosh` to the new primary. #. To confirm the new configuration, call :method:`rs.conf()` in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. Your output should resemble: @@ -276,7 +276,7 @@ Procedure #. For each member of the replica set, perform the following sequence of operations: - a. Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod` + a. Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod` running on the new, temporary port. For example, for a member running on a temporary port of ``37017``, you would issue this command: @@ -328,14 +328,14 @@ Procedure mongod --dbpath /data/db1/ --port 27017 --replSet rs --bind_ip localhost, #. Connect to one of the :binary:`~bin.mongod` instances - using :mongosh:`mongosh `. For example: + using :binary:`~bin.mongosh`. For example: .. code-block:: bash mongosh --port 27017 #. To confirm the new configuration, call :method:`rs.conf()` in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. Your output should resemble: diff --git a/source/tutorial/change-oplog-size.txt b/source/tutorial/change-oplog-size.txt index 379f8dc2c92..36523f67e50 100644 --- a/source/tutorial/change-oplog-size.txt +++ b/source/tutorial/change-oplog-size.txt @@ -37,7 +37,7 @@ members, perform these steps on the :term:`primary`. A. Connect to the replica set member ------------------------------------ -Connect to the replica set member using :mongosh:`mongosh `: +Connect to the replica set member using :binary:`~bin.mongosh`: .. code-block:: bash diff --git a/source/tutorial/change-replica-set-wiredtiger.txt b/source/tutorial/change-replica-set-wiredtiger.txt index 603422f66e2..63362bde478 100644 --- a/source/tutorial/change-replica-set-wiredtiger.txt +++ b/source/tutorial/change-replica-set-wiredtiger.txt @@ -105,7 +105,7 @@ B. Step down the primary. the primary. Once all the secondary members have been upgraded to WiredTiger, -connect :mongosh:`mongosh ` to the primary and use +connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary. diff --git a/source/tutorial/change-sharded-cluster-wiredtiger.txt b/source/tutorial/change-sharded-cluster-wiredtiger.txt index cb1f0190087..0a8cffc0f25 100644 --- a/source/tutorial/change-sharded-cluster-wiredtiger.txt +++ b/source/tutorial/change-sharded-cluster-wiredtiger.txt @@ -116,7 +116,7 @@ B. Step down the primary. ~~~~~~~~~~~~~~~~~~~~~~~~~ Once all the secondary members have been upgraded to WiredTiger, -connect :mongosh:`mongosh ` to the primary and use +connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary. diff --git a/source/tutorial/configure-a-delayed-replica-set-member.txt b/source/tutorial/configure-a-delayed-replica-set-member.txt index c6f37c0ab9d..6dbaaa0de74 100644 --- a/source/tutorial/configure-a-delayed-replica-set-member.txt +++ b/source/tutorial/configure-a-delayed-replica-set-member.txt @@ -38,7 +38,7 @@ Example The following example sets a 1-hour delay on a secondary member currently at the index ``0`` in the :rsconf:`members` array. To set the delay, issue -the following sequence of operations in a :mongosh:`mongosh ` session +the following sequence of operations in a :binary:`~bin.mongosh` session that is connected to the primary: .. code-block:: javascript diff --git a/source/tutorial/configure-a-hidden-replica-set-member.txt b/source/tutorial/configure-a-hidden-replica-set-member.txt index 99f393820f0..588657a0c3a 100644 --- a/source/tutorial/configure-a-hidden-replica-set-member.txt +++ b/source/tutorial/configure-a-hidden-replica-set-member.txt @@ -54,7 +54,7 @@ Configuration Procedure The following example hides the secondary member currently at the index ``0`` in the :rsconf:`members` array. To configure a :term:`hidden member`, use the following sequence of operations in a -:mongosh:`mongosh ` session that is connected to the primary, +:binary:`~bin.mongosh` session that is connected to the primary, specifying the member to configure by its array index in the :rsconf:`members` array: diff --git a/source/tutorial/configure-a-non-voting-replica-set-member.txt b/source/tutorial/configure-a-non-voting-replica-set-member.txt index 8f8bcb5b75f..beb9fa9aa31 100644 --- a/source/tutorial/configure-a-non-voting-replica-set-member.txt +++ b/source/tutorial/configure-a-non-voting-replica-set-member.txt @@ -15,7 +15,7 @@ distribution beyond the maximum seven voting members. To configure a member as non-voting, use the :dbcommand:`replSetReconfig` command *or* its -:mongosh:`mongosh ` helper method :method:`rs.reconfig()` to set its +:binary:`~bin.mongosh` helper method :method:`rs.reconfig()` to set its :rsconf:`members[n].votes` and :rsconf:`members[n].priority` values to ``0``. Non-voting replica set members *must* have a :rsconf:`~members[n].priority` of ``0``. @@ -39,7 +39,7 @@ down using :dbcommand:`replSetStepDown` or its shell helper :method:`rs.stepDown()` before performing this procedure. \1) Connect to the Replica Set Primary - Connect :mongosh:`mongosh ` to the replica set :term:`primary`: + Connect :binary:`~bin.mongosh` to the replica set :term:`primary`: .. code-block:: bash diff --git a/source/tutorial/configure-replica-set-secondary-sync-target.txt b/source/tutorial/configure-replica-set-secondary-sync-target.txt index c887c920573..7d3ed1c20a3 100644 --- a/source/tutorial/configure-replica-set-secondary-sync-target.txt +++ b/source/tutorial/configure-replica-set-secondary-sync-target.txt @@ -31,7 +31,7 @@ this functionality: - :dbcommand:`replSetSyncFrom` command, or -- :method:`rs.syncFrom()` helper in :mongosh:`mongosh ` +- :method:`rs.syncFrom()` helper in :binary:`~bin.mongosh` Considerations -------------- @@ -41,13 +41,13 @@ Considerations Procedure --------- -To use the :dbcommand:`replSetSyncFrom` command in :mongosh:`mongosh `: +To use the :dbcommand:`replSetSyncFrom` command in :binary:`~bin.mongosh`: .. code-block:: javascript db.adminCommand( { replSetSyncFrom: "hostname<:port>" } ); -To use the :method:`rs.syncFrom()` helper in :mongosh:`mongosh `: +To use the :method:`rs.syncFrom()` helper in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/tutorial/configure-replica-set-tag-sets.txt b/source/tutorial/configure-replica-set-tag-sets.txt index 4b3e5c584e4..744922459f2 100644 --- a/source/tutorial/configure-replica-set-tag-sets.txt +++ b/source/tutorial/configure-replica-set-tag-sets.txt @@ -71,7 +71,7 @@ have been omitted for brevity): #. **Add tags to the members.** - Connect :mongosh:`mongosh ` to the replica set and use + Connect :binary:`~bin.mongosh` to the replica set and use :method:`rs.reconfig()` to add tags to the members: .. code-block:: javascript @@ -198,7 +198,7 @@ Given a five member replica set with members in two data centers: #. **Add tags to the replica set members.** - Connect :mongosh:`mongosh ` to the replica set and use + Connect :binary:`~bin.mongosh` to the replica set and use :method:`rs.reconfig()` to add tags to the members: .. code-block:: javascript diff --git a/source/tutorial/configure-ssl-clients.txt b/source/tutorial/configure-ssl-clients.txt index 5d8a72b8a90..afa3bbd1a1c 100644 --- a/source/tutorial/configure-ssl-clients.txt +++ b/source/tutorial/configure-ssl-clients.txt @@ -45,7 +45,7 @@ Clients must have support for TLS/SSL to connect to a procedures using their ``ssl`` aliases, see :ref:`mongo-shell-ssl-connect`. -:mongosh:`mongosh ` provides various TLS/SSL settings, +:binary:`~bin.mongosh` provides various TLS/SSL settings, including: .. list-table:: @@ -61,7 +61,7 @@ including: * - :option:`--tlsCertificateKeyFile ` - Specifies the :file:`.pem` file that contains - :mongosh:`mongosh `'s certificate and key to present to + :binary:`~bin.mongosh`'s certificate and key to present to the :binary:`~bin.mongod` or :binary:`~bin.mongos` instance. This option is mutually exclusive with :option:`--tlsCertificateSelector ` @@ -70,7 +70,7 @@ including: * - :option:`--tlsCertificateKeyFilePassword ` - - If :mongosh:`mongosh `'s certificate key file is encrypted. + - If :binary:`~bin.mongosh`'s certificate key file is encrypted. * - :option:`--tlsCAFile ` @@ -88,21 +88,21 @@ including: .. include:: /includes/extracts/4.4-changes-certificate-expiry-warning.rst -For a complete list of :mongosh:`mongosh `'s ``tls`` +For a complete list of :binary:`~bin.mongosh`'s ``tls`` options, see :ref:`mongo-shell-tls`. -For TLS/SSL connections, :mongosh:`mongosh ` validates the +For TLS/SSL connections, :binary:`~bin.mongosh` validates the certificate presented by the :binary:`~bin.mongod` or :binary:`~bin.mongos` instance: -- :mongosh:`mongosh ` verifies that the certificate is from +- :binary:`~bin.mongosh` verifies that the certificate is from the specified Certificate Authority (:option:`--tlsCAFile `. If the certificate is not from the specified CA, - :mongosh:`mongosh ` will fail to connect. + :binary:`~bin.mongosh` will fail to connect. - .. include:: /includes/extracts/ssl-facts-mongo-ssl-hostname-verification.rst - To connect :mongosh:`mongosh ` to a :binary:`~bin.mongod` or + To connect :binary:`~bin.mongosh` to a :binary:`~bin.mongod` or :binary:`~bin.mongos` that requires TLS/SSL, specify the :option:`--host ` option or use a :doc:`connection string ` to specify the hostname. All @@ -122,7 +122,7 @@ Connect to MongoDB Instance Using Encryption (``tls`` Options) To connect to a :binary:`~bin.mongod` or :binary:`~bin.mongos` instance that requires :ref:`encrypted communication `, -start :mongosh:`mongosh ` with: +start :binary:`~bin.mongosh` with: - :option:`--tls ` @@ -136,14 +136,14 @@ For example, consider a :binary:`~bin.mongod` instance running on mongod --tlsMode requireTLS --tlsCertificateKeyFile -To connect to the instance, start :mongosh:`mongosh ` with +To connect to the instance, start :binary:`~bin.mongosh` with the following options: .. code-block:: bash mongosh --tls --host hostname.example.com --tlsCAFile /etc/ssl/caToValidateServerCertificates.pem -:mongosh:`mongosh ` verifies the certificate presented by +:binary:`~bin.mongosh` verifies the certificate presented by the :binary:`~bin.mongod` instance against the specified hostname and the CA file. @@ -160,7 +160,7 @@ Connect to MongoDB Instance that Requires Client Certificates (``tls`` Options) To connect to a :binary:`~bin.mongod` or :binary:`~bin.mongos` that requires :ref:`CA-signed client certificates -`, start :mongosh:`mongosh ` with: +`, start :binary:`~bin.mongosh` with: - :option:`--tls ` @@ -177,7 +177,7 @@ For example, consider a :binary:`~bin.mongod` instance running on mongod --tlsMode requireTLS --tlsCertificateKeyFile /etc/ssl/mongodb.pem --tlsCAFile /etc/ssl/caToValidateClientCertificates.pem -To connect to the instance, start :mongosh:`mongosh ` with the +To connect to the instance, start :binary:`~bin.mongosh` with the following options: .. code-block:: bash @@ -194,13 +194,13 @@ On Windows and macOS, --tlsCAFile>` option as well. For example, to use a certificate with the ``CN`` (Common Name) of ``myclient.example.net`` and the CA file from the system certificate store on macOS, start - :mongosh:`mongosh ` with the following options: + :binary:`~bin.mongosh` with the following options: .. code-block:: bash mongosh --tls --host hostname.example.com --tlsCertificateSelector subject="myclient.example.net" - Although still available, :mongosh:`mongosh ` + Although still available, :binary:`~bin.mongosh` ``--ssl``, ``--sslCAFile``, ``--sslPEMKeyFile``, and ``--sslCertificateSelector`` options are :ref:`deprecated as of MongoDB 4.2 <4.2-tls>`. @@ -217,9 +217,9 @@ Avoid Use of ``--tlsAllowInvalidCertificates`` Option --tlsAllowInvalidCertificates>` is necessary, only use the option on systems where intrusion is not possible. - If :mongosh:`mongosh ` runs with the + If :binary:`~bin.mongosh` runs with the :option:`--tlsAllowInvalidCertificates ` option, :mongosh:`mongosh ` + --tlsAllowInvalidCertificates>` option, :binary:`~bin.mongosh` will not attempt to validate the server certificates. This creates a vulnerability to expired :binary:`~bin.mongod` and :binary:`~bin.mongos` certificates as well as to foreign processes @@ -233,7 +233,7 @@ Avoid Use of ``--tlsAllowInvalidCertificates`` Option ``mongosh`` Configuration (Using ``ssl`` Options) ------------------------------------------------- -:mongosh:`mongosh ` provides various TLS/SSL settings, including: +:binary:`~bin.mongosh` provides various TLS/SSL settings, including: .. list-table:: :header-rows: 1 @@ -248,12 +248,12 @@ Avoid Use of ``--tlsAllowInvalidCertificates`` Option * - ``--sslPEMKeyFile`` - Specifies the :file:`.pem` file that contains - :mongosh:`mongosh `'s certificate and key to present to + :binary:`~bin.mongosh`'s certificate and key to present to the :binary:`~bin.mongod` or :binary:`~bin.mongos` instance. * - ``--sslPEMKeyPassword`` - - If :mongosh:`mongosh `'s certificate key file is encrypted. + - If :binary:`~bin.mongosh`'s certificate key file is encrypted. * - ``--sslCAFile`` @@ -269,18 +269,18 @@ Avoid Use of ``--tlsAllowInvalidCertificates`` Option For a complete list of ``ssl`` options, see :ref:`SSL Options `. -For TLS/SSL connections, :mongosh:`mongosh ` validates the +For TLS/SSL connections, :binary:`~bin.mongosh` validates the certificate presented by the :binary:`~bin.mongod` or :binary:`~bin.mongos` instance: -- :mongosh:`mongosh ` verifies that the certificate is from +- :binary:`~bin.mongosh` verifies that the certificate is from the specified Certificate Authority :option:`--sslCAFile `. If the certificate is not from the specified CA, - :mongosh:`mongosh ` will fail to connect. + :binary:`~bin.mongosh` will fail to connect. - .. include:: /includes/extracts/ssl-facts-mongo-ssl-hostname-verification.rst - To connect :mongosh:`mongosh ` to a :binary:`~bin.mongod` or + To connect :binary:`~bin.mongosh` to a :binary:`~bin.mongod` or :binary:`~bin.mongos` that requires TLS/SSL, specify the :option:`--host ` option or use a :doc:`connection string ` to specify the hostname. All @@ -300,7 +300,7 @@ Connect to MongoDB Instance Using Encryption (``--ssl`` Options) To connect to a :binary:`~bin.mongod` or :binary:`~bin.mongos` instance that requires :ref:`encrypted communication `, -start :mongosh:`mongosh ` with: +start :binary:`~bin.mongosh` with: - ``--ssl`` @@ -314,14 +314,14 @@ For example, consider a :binary:`~bin.mongod` instance running on mongod --sslMode requireSSL --sslPEMKeyFile -To connect to the instance, start :mongosh:`mongosh ` with the +To connect to the instance, start :binary:`~bin.mongosh` with the following options: .. code-block:: bash mongosh --ssl --host hostname.example.com --sslCAFile /etc/ssl/caToValidateServerCertificates.pem -:mongosh:`mongosh ` verifies the certificate presented by +:binary:`~bin.mongosh` verifies the certificate presented by the :binary:`~bin.mongod` instance against the specified hostname and the CA file. @@ -338,7 +338,7 @@ Connect to MongoDB Instance that Requires Client Certificates (``ssl`` Options) To connect to a :binary:`~bin.mongod` or :binary:`~bin.mongos` that requires :ref:`CA-signed client certificates -`, start :mongosh:`mongosh ` with: +`, start :binary:`~bin.mongosh` with: - ``--ssl`` @@ -355,7 +355,7 @@ For example, consider a :binary:`~bin.mongod` instance running on mongod --sslMode requireSSL --sslPEMKeyFile /etc/ssl/mongodb.pem --sslCAFile /etc/ssl/ca.pem -To connect to the instance, start :mongosh:`mongosh ` with the +To connect to the instance, start :binary:`~bin.mongosh` with the following options: .. code-block:: bash @@ -371,7 +371,7 @@ On Windows and macOS, ``--sslCAFile`` option as well. For example, to use a certificate with the ``CN`` (Common Name) of ``myclient.example.net`` and the CA file from the system certificate - store on macOS, start :mongosh:`mongosh ` with the following + store on macOS, start :binary:`~bin.mongosh` with the following options: .. code-block:: bash @@ -436,7 +436,7 @@ tools include: - :binary:`~bin.mongotop` To use encrypted communication with these tools, use the same ``ssl`` options as -:mongosh:`mongosh `. See :ref:`mongo-shell-ssl-connect`. +:binary:`~bin.mongosh`. See :ref:`mongo-shell-ssl-connect`. .. seealso:: diff --git a/source/tutorial/configure-x509-client-authentication.txt b/source/tutorial/configure-x509-client-authentication.txt index d584df2a469..2ea6152a09f 100644 --- a/source/tutorial/configure-x509-client-authentication.txt +++ b/source/tutorial/configure-x509-client-authentication.txt @@ -382,9 +382,9 @@ authenticate with the client certificate. :method:`db.auth()` method to authenticate after connection. - For example, if using :mongosh:`mongosh `, + For example, if using :binary:`~bin.mongosh`, - 1. Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod` set up for + 1. Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod` set up for TLS/SSL: .. code-block:: bash @@ -490,9 +490,9 @@ authenticate with the client certificate. :method:`db.auth()` method to authenticate after connection. - For example, if using :mongosh:`mongosh `, + For example, if using :binary:`~bin.mongosh`, - 1. Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod` set up for + 1. Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod` set up for TLS/SSL: .. code-block:: bash diff --git a/source/tutorial/control-access-to-mongodb-with-kerberos-authentication.txt b/source/tutorial/control-access-to-mongodb-with-kerberos-authentication.txt index 259aab01401..e1e4e6c09b9 100644 --- a/source/tutorial/control-access-to-mongodb-with-kerberos-authentication.txt +++ b/source/tutorial/control-access-to-mongodb-with-kerberos-authentication.txt @@ -64,7 +64,7 @@ Procedure The following procedure outlines the steps to add a Kerberos user principal to MongoDB, configure a standalone :binary:`~bin.mongod` instance -for Kerberos support, and connect using :mongosh:`mongosh ` and +for Kerberos support, and connect using :binary:`~bin.mongosh` and authenticate the user principal. .. include:: /includes/steps/control-access-to-mongodb-with-kerberos-authentication.rst diff --git a/source/tutorial/convert-secondary-into-arbiter.txt b/source/tutorial/convert-secondary-into-arbiter.txt index e590478d72f..541fc195dca 100644 --- a/source/tutorial/convert-secondary-into-arbiter.txt +++ b/source/tutorial/convert-secondary-into-arbiter.txt @@ -46,14 +46,14 @@ Convert Secondary to Arbiter and Reuse the Port Number #. Remove the :term:`secondary` from the :term:`replica set` by calling the :method:`rs.remove()` method. Perform this operation while connected to the current - :term:`primary` in :mongosh:`mongosh `: + :term:`primary` in :binary:`~bin.mongosh`: .. code-block:: javascript rs.remove("<:port>") #. Verify that the replica set no longer includes the secondary by - calling the :method:`rs.conf()` method in :mongosh:`mongosh `: + calling the :method:`rs.conf()` method in :binary:`~bin.mongosh`: .. code-block:: javascript @@ -88,7 +88,7 @@ Convert Secondary to Arbiter and Reuse the Port Number mongod --port 27021 --dbpath /data/db --replSet rs --bind_ip localhost, -#. In :mongosh:`mongosh ` convert the secondary to an arbiter +#. In :binary:`~bin.mongosh` convert the secondary to an arbiter using the :method:`rs.addArb()` method: .. code-block:: javascript @@ -96,7 +96,7 @@ Convert Secondary to Arbiter and Reuse the Port Number rs.addArb("<:port>") #. Verify the arbiter belongs to the replica set by calling the - :method:`rs.conf()` method in :mongosh:`mongosh `. + :method:`rs.conf()` method in :binary:`~bin.mongosh`. .. code-block:: javascript @@ -135,7 +135,7 @@ Convert Secondary to Arbiter Running on a New Port Number mongod --port 27021 --dbpath /data/db-temp --replSet rs --bind_ip localhost, -#. In :mongosh:`mongosh ` connected to the current primary, +#. In :binary:`~bin.mongosh` connected to the current primary, convert the new :binary:`~bin.mongod` instance to an arbiter using the :method:`rs.addArb()` method: @@ -144,7 +144,7 @@ Convert Secondary to Arbiter Running on a New Port Number rs.addArb("<:port>") #. Verify the arbiter has been added to the replica set by calling the - :method:`rs.conf()` method in :mongosh:`mongosh `. + :method:`rs.conf()` method in :binary:`~bin.mongosh`. .. code-block:: javascript @@ -159,14 +159,14 @@ Convert Secondary to Arbiter Running on a New Port Number #. Shut down the secondary. #. Remove the :term:`secondary` from the :term:`replica set` by calling - the :method:`rs.remove()` method in :mongosh:`mongosh `: + the :method:`rs.remove()` method in :binary:`~bin.mongosh`: .. code-block:: javascript rs.remove("<:port>") #. Verify that the replica set no longer includes the old secondary by - calling the :method:`rs.conf()` method in :mongosh:`mongosh `: + calling the :method:`rs.conf()` method in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/tutorial/convert-shard-standalone-to-shard-replica-set.txt b/source/tutorial/convert-shard-standalone-to-shard-replica-set.txt index 097d4bb3dcb..3b4c28e8ba5 100644 --- a/source/tutorial/convert-shard-standalone-to-shard-replica-set.txt +++ b/source/tutorial/convert-shard-standalone-to-shard-replica-set.txt @@ -50,7 +50,7 @@ Procedure :doc:`/reference/configuration-options` and the :binary:`~bin.mongod` manual page. -#. Connect :mongosh:`mongosh ` to the shard :binary:`~bin.mongod` instance. +#. Connect :binary:`~bin.mongosh` to the shard :binary:`~bin.mongod` instance. #. Use :method:`rs.initiate()` to initiate the new replica set: @@ -64,7 +64,7 @@ Procedure #. Disconnect from the instance. -#. Connect :mongosh:`mongosh ` to one of the sharded cluster's +#. Connect :binary:`~bin.mongosh` to one of the sharded cluster's :binary:`~bin.mongos` instances and retrieve the shard information: .. code-block:: javascript diff --git a/source/tutorial/convert-standalone-to-replica-set.txt b/source/tutorial/convert-standalone-to-replica-set.txt index d9e5c83fa73..eb359e715b7 100644 --- a/source/tutorial/convert-standalone-to-replica-set.txt +++ b/source/tutorial/convert-standalone-to-replica-set.txt @@ -48,7 +48,7 @@ Procedure :doc:`/reference/configuration-options` and the :binary:`~bin.mongod` manual page. -#. Connect :mongosh:`mongosh ` to the :binary:`~bin.mongod` instance. +#. Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongod` instance. #. Use :method:`rs.initiate()` to initiate the new replica set: diff --git a/source/tutorial/create-chunks-in-sharded-cluster.txt b/source/tutorial/create-chunks-in-sharded-cluster.txt index 881aa566322..0df62b50833 100644 --- a/source/tutorial/create-chunks-in-sharded-cluster.txt +++ b/source/tutorial/create-chunks-in-sharded-cluster.txt @@ -42,7 +42,7 @@ To split empty chunks manually, you can run the :dbcommand:`split` command: To create chunks for documents in the ``myapp.users`` collection using the ``email`` field as the :term:`shard key`, - use the following operation in :mongosh:`mongosh `: + use the following operation in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/tutorial/deploy-replica-set-for-testing.txt b/source/tutorial/deploy-replica-set-for-testing.txt index 1ed77801809..90f343997aa 100644 --- a/source/tutorial/deploy-replica-set-for-testing.txt +++ b/source/tutorial/deploy-replica-set-for-testing.txt @@ -105,7 +105,7 @@ Procedure configuration options, see :doc:`/reference/configuration-options`. #. Connect to one of your :binary:`~bin.mongod` instances through - :mongosh:`mongosh `. You will need to indicate which instance by + :binary:`~bin.mongosh`. You will need to indicate which instance by specifying its port number. For the sake of simplicity and clarity, you may want to choose the first one, as in the following command; @@ -113,9 +113,9 @@ Procedure mongosh --port 27017 -#. In :mongosh:`mongosh `, use :method:`rs.initiate()` to +#. In :binary:`~bin.mongosh`, use :method:`rs.initiate()` to initiate the replica set. You can create a replica set - configuration object in :mongosh:`mongosh ` environment, as + configuration object in :binary:`~bin.mongosh` environment, as in the following example: .. code-block:: javascript diff --git a/source/tutorial/deploy-replica-set-with-keyfile-access-control.txt b/source/tutorial/deploy-replica-set-with-keyfile-access-control.txt index 4ed59d3f608..27ac4b9a131 100644 --- a/source/tutorial/deploy-replica-set-with-keyfile-access-control.txt +++ b/source/tutorial/deploy-replica-set-with-keyfile-access-control.txt @@ -28,7 +28,7 @@ For this tutorial, each member of the replica set uses the same internal authentication mechanism and settings. Enforcing internal authentication also enforces user access control. To -connect to the replica set, clients like :mongosh:`mongosh ` need to +connect to the replica set, clients like :binary:`~bin.mongosh` need to use a :doc:`user account`. See :ref:`security-repSetDeploy-access-control`. diff --git a/source/tutorial/deploy-shard-cluster.txt b/source/tutorial/deploy-shard-cluster.txt index 96376237d3b..e1d3a84116c 100644 --- a/source/tutorial/deploy-shard-cluster.txt +++ b/source/tutorial/deploy-shard-cluster.txt @@ -174,19 +174,19 @@ command line parameter to specify the config servers. At this point, your sharded cluster consists of the :binary:`~bin.mongos` and the config servers. You can now connect to -the sharded cluster using :mongosh:`mongosh `. +the sharded cluster using :binary:`~bin.mongosh`. Connect to the Sharded Cluster ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Connect :mongosh:`mongosh ` to the :binary:`~bin.mongos`. +Connect :binary:`~bin.mongosh` to the :binary:`~bin.mongos`. Specify the ``host`` and ``port`` on which the ``mongos`` is running: .. code-block:: bash mongosh --host --port -Once you have connected :mongosh:`mongosh ` to the +Once you have connected :binary:`~bin.mongosh` to the :binary:`~bin.mongos`, continue to the next procedure to add shards to the cluster. @@ -195,7 +195,7 @@ the cluster. Add Shards to the Cluster ~~~~~~~~~~~~~~~~~~~~~~~~~ -In a :mongosh:`mongosh ` session that is connected to the +In a :binary:`~bin.mongosh` session that is connected to the :binary:`~bin.mongos`, use the :method:`sh.addShard()` method to add each shard to the cluster. @@ -217,7 +217,7 @@ collection's database. Enabling sharding for a database does not redistribute data but make it possible to shard the collections in that database. -From a :mongosh:`mongosh ` session that is connected to the +From a :binary:`~bin.mongosh` session that is connected to the :binary:`~bin.mongos`, use the :method:`sh.enableSharding()` method to enable sharding on the target database. Enabling sharding on a database makes it possible to shard collections within a database. @@ -243,7 +243,7 @@ Shard a Collection :ref:`enable sharding ` for the database where the collection resides. -To shard a collection, connect :mongosh:`mongosh ` to the +To shard a collection, connect :binary:`~bin.mongosh` to the :binary:`~bin.mongos` and use the :method:`sh.shardCollection()` method. .. note:: Sharding and Indexes @@ -280,7 +280,7 @@ as well as your ability to take advantage of certain sharding features such as :ref:`zones `. To learn how to choose an effective shard key, see :ref:`sharding-shard-key-selection`. -Starting in version 4.0, :mongosh:`mongosh ` +Starting in version 4.0, :binary:`~bin.mongosh` provides the method :method:`convertShardKeyToHashed()`. This method uses the same hashing function as the hashed index and can be used to see what the hashed value would be for a key. diff --git a/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt b/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt index 4f7ea67e304..8757c1d7963 100644 --- a/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt +++ b/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt @@ -29,7 +29,7 @@ The following tutorial uses a :ref:`keyfile ` to enable internal authentication. Enforcing internal authentication also enforces user access control. To -connect to the replica set, clients like :mongosh:`mongosh ` need to +connect to the replica set, clients like :binary:`~bin.mongosh` need to use a :doc:`user account`. See :ref:`security-shardClust-deploy-access-control`. diff --git a/source/tutorial/enforce-keyfile-access-control-in-existing-replica-set.txt b/source/tutorial/enforce-keyfile-access-control-in-existing-replica-set.txt index 2729756764d..fbb65106b6d 100644 --- a/source/tutorial/enforce-keyfile-access-control-in-existing-replica-set.txt +++ b/source/tutorial/enforce-keyfile-access-control-in-existing-replica-set.txt @@ -26,7 +26,7 @@ For this tutorial, each member of the replica set uses the same internal authentication mechanism and settings. Enforcing internal authentication also enforces user access control. To -connect to the replica set, clients like :mongosh:`mongosh ` need to +connect to the replica set, clients like :binary:`~bin.mongosh` need to use a :doc:`user account`. See :ref:`security-replSet-auth-access-control`. diff --git a/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster.txt b/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster.txt index e855a5fcab1..963e73999c7 100644 --- a/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster.txt +++ b/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster.txt @@ -29,7 +29,7 @@ The following tutorial uses a :ref:`keyfile ` to enable internal authentication. Enforcing internal authentication also enforces user access control. To -connect to the replica set, clients like :mongosh:`mongosh ` need to +connect to the replica set, clients like :binary:`~bin.mongosh` need to use a :doc:`user account`. See :ref:`security-shardClust-enforce-access-control`. diff --git a/source/tutorial/evaluate-operation-performance.txt b/source/tutorial/evaluate-operation-performance.txt index 9396a4b2b2a..f7512370a13 100644 --- a/source/tutorial/evaluate-operation-performance.txt +++ b/source/tutorial/evaluate-operation-performance.txt @@ -47,7 +47,7 @@ control the amount of information returned. .. example:: To use :method:`cursor.explain()` on a query for documents matching the expression ``{ a: 1 }``, in the collection named ``records``, use an operation that resembles the - following in :mongosh:`mongosh `: + following in :binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/tutorial/force-member-to-be-primary.txt b/source/tutorial/force-member-to-be-primary.txt index ed163276856..b0cdb1ae844 100644 --- a/source/tutorial/force-member-to-be-primary.txt +++ b/source/tutorial/force-member-to-be-primary.txt @@ -75,7 +75,7 @@ This procedure assumes this configuration: ] } -1. In a :mongosh:`mongosh ` session that is connected to the primary, +1. In a :binary:`~bin.mongosh` session that is connected to the primary, use the following sequence of operations to make ``m3.example.net`` the primary: @@ -147,10 +147,10 @@ Consider a :term:`replica set` with the following members: To force a member to become primary use the following procedure: -1. In :mongosh:`mongosh `, run :method:`rs.status()` to ensure your +1. In :binary:`~bin.mongosh`, run :method:`rs.status()` to ensure your replica set is running as expected. -#. In a :mongosh:`mongosh ` session that is connected to the +#. In a :binary:`~bin.mongosh` session that is connected to the :binary:`~bin.mongod` instance running on ``mdb2.example.net``, freeze ``mdb2.example.net`` so that it does not attempt to become primary for 120 seconds. @@ -159,7 +159,7 @@ To force a member to become primary use the following procedure: rs.freeze(120) -#. In a :mongosh:`mongosh ` session that is connected to the +#. In a :binary:`~bin.mongosh` session that is connected to the :binary:`~bin.mongod` running on ``mdb0.example.net``, step down this instance that the :binary:`~bin.mongod` is not eligible to become primary for 120 seconds: diff --git a/source/tutorial/geospatial-tutorial.txt b/source/tutorial/geospatial-tutorial.txt index 72899b6fc98..0935cdd7778 100644 --- a/source/tutorial/geospatial-tutorial.txt +++ b/source/tutorial/geospatial-tutorial.txt @@ -74,7 +74,7 @@ always improves performance of :query:`$geoWithin` and :query:`$geoIntersects` queries. Because this data is geographical, create a ``2dsphere`` index on each -collection using :mongosh:`mongosh `: +collection using :binary:`~bin.mongosh`: .. code-block:: javascript @@ -85,7 +85,7 @@ Exploring the Data ~~~~~~~~~~~~~~~~~~ Inspect an entry in the newly-created ``restaurants`` collection in -:mongosh:`mongosh `: +:binary:`~bin.mongosh`: .. code-block:: javascript @@ -178,7 +178,7 @@ Find all Restaurants in the Neighborhood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also query to find all restaurants contained in a given neighborhood. -Run the following in :mongosh:`mongosh ` to find the neighborhood +Run the following in :binary:`~bin.mongosh` to find the neighborhood containing the user, and then count the restaurants within that neighborhood: .. code-block:: javascript diff --git a/source/tutorial/install-mongodb-on-os-x.txt b/source/tutorial/install-mongodb-on-os-x.txt index 75662011c87..7b90a345037 100644 --- a/source/tutorial/install-mongodb-on-os-x.txt +++ b/source/tutorial/install-mongodb-on-os-x.txt @@ -130,7 +130,7 @@ The installation includes the following binaries: - The :binary:`~bin.mongod` server - The :binary:`~bin.mongos` sharded cluster query router -- :mongosh:`mongosh ` +- :binary:`~bin.mongosh` In addition, the installation creates the following files and directories at the location specified below, depending on your Apple @@ -251,7 +251,7 @@ You can also view the log file to see the current status of your Connect and Use MongoDB ~~~~~~~~~~~~~~~~~~~~~~~ -To begin using MongoDB, connect :mongosh:`mongosh ` to the +To begin using MongoDB, connect :binary:`~bin.mongosh` to the running instance. From a new terminal, issue the following: .. code-block:: bash diff --git a/source/tutorial/iterate-a-cursor.txt b/source/tutorial/iterate-a-cursor.txt index 3e35e866dea..2bc0c7a9d98 100644 --- a/source/tutorial/iterate-a-cursor.txt +++ b/source/tutorial/iterate-a-cursor.txt @@ -14,7 +14,7 @@ Iterate a Cursor in ``mongosh`` The :method:`db.collection.find()` method returns a cursor. To access the documents, you need to iterate the cursor. However, in -:mongosh:`mongosh `, if the returned cursor is not assigned to a +:binary:`~bin.mongosh`, if the returned cursor is not assigned to a variable using the ``var`` keyword, then the cursor is automatically iterated up to 20 times [#set-shell-batch-size]_ to print up to the first 20 documents in the results. @@ -25,7 +25,7 @@ access the documents or to use the iterator index. Manually Iterate the Cursor --------------------------- -In :mongosh:`mongosh `, when you assign the cursor returned from +In :binary:`~bin.mongosh`, when you assign the cursor returned from the :method:`find() ` method to a variable using the ``var`` keyword, the cursor does not automatically iterate. @@ -80,7 +80,7 @@ information on cursor methods. Iterator Index -------------- -In :mongosh:`mongosh `, you can use the +In :binary:`~bin.mongosh`, you can use the :method:`~cursor.toArray()` method to iterate the cursor and return the documents in an array, as in the following: @@ -123,7 +123,7 @@ Closure of Inactive Cursors By default, the server will automatically close the cursor after 10 minutes of inactivity, or if client has exhausted the cursor. To -override this behavior in :mongosh:`mongosh `, you can use +override this behavior in :binary:`~bin.mongosh`, you can use the :method:`cursor.noCursorTimeout()` method: .. code-block:: javascript diff --git a/source/tutorial/manage-client-side-encryption-data-keys.txt b/source/tutorial/manage-client-side-encryption-data-keys.txt index 897573aab35..e834253df95 100644 --- a/source/tutorial/manage-client-side-encryption-data-keys.txt +++ b/source/tutorial/manage-client-side-encryption-data-keys.txt @@ -13,12 +13,12 @@ Manage Data Encryption Keys .. versionadded:: 4.2 Client-side field level encryption uses data encryption keys for -encryption and decryption. The :mongosh:`mongosh ` helper method +encryption and decryption. The :binary:`~bin.mongosh` helper method :method:`getKeyVault()` returns a key vault object for creating, modifying, and deleting data encryption keys. This page documents client-side field level encryption using -:mongosh:`mongosh `, and does *not* refer to any official MongoDB +:binary:`~bin.mongosh`, and does *not* refer to any official MongoDB 4.2+ compatible driver. See the relevant :ref:`documentation ` for driver-specific data encryption key management methods and syntax. @@ -28,7 +28,7 @@ key management methods and syntax. Create a Data Encryption Key ---------------------------- -The following procedure uses :mongosh:`mongosh ` to create a +The following procedure uses :binary:`~bin.mongosh` to create a data encryption key for use with client-side field level encryption and decryption. For guidance on data encryption key management using a 4.2+ compatible driver, see the `driver documentation @@ -64,12 +64,12 @@ appropriate for your deployment: Manage a Data Encryption Key's Alternate Name --------------------------------------------- -The following procedure uses :mongosh:`mongosh ` to manage +The following procedure uses :binary:`~bin.mongosh` to manage the alternate names of a data encryption key. For guidance on data encryption key management using a 4.2+ compatible driver, see the `driver documentation `__ instead. -If you are still within your configured :mongosh:`mongosh ` session +If you are still within your configured :binary:`~bin.mongosh` session from the :ref:`field-level-encryption-data-key-create` steps above, you can skip directly to step 5. @@ -108,12 +108,12 @@ Remove a Data Encryption Key Deleting a data encryption key renders all fields encrypted using that key as permanently unreadable. -The following procedure uses :mongosh:`mongosh ` to remove a +The following procedure uses :binary:`~bin.mongosh` to remove a data encryption key from the key vault. For guidance on data encryption key management using a 4.2+ compatible driver, see the `driver documentation `__ instead. -If you are still within your configured :mongosh:`mongosh ` session +If you are still within your configured :binary:`~bin.mongosh` session from the :ref:`field-level-encryption-data-key-create` steps above, you can skip directly to step 5. @@ -163,7 +163,7 @@ driver in order to configure `, you must use the ``base64`` representation of the UUID string. -You can run the following operation in :mongosh:`mongosh ` to convert +You can run the following operation in :binary:`~bin.mongosh` to convert a ``UUID`` hexadecimal string to its ``base64`` representation: .. code-block:: javascript diff --git a/source/tutorial/manage-journaling.txt b/source/tutorial/manage-journaling.txt index 9659d7eca1e..c28261cde03 100644 --- a/source/tutorial/manage-journaling.txt +++ b/source/tutorial/manage-journaling.txt @@ -111,7 +111,7 @@ instance: the restart below. #. Perform a clean shutdown of the :binary:`~bin.mongod` - instance. For example, connect :mongosh:`mongosh ` to + instance. For example, connect :binary:`~bin.mongosh` to the instance and issue :method:`db.shutdownServer()`: .. code-block:: javascript @@ -149,7 +149,7 @@ instance: standalone without the journal. #. Perform a clean shutdown of the :binary:`~bin.mongod` - instance. For example, connect :mongosh:`mongosh ` to + instance. For example, connect :binary:`~bin.mongosh` to the instance and issue :method:`db.shutdownServer()`: .. code-block:: javascript @@ -292,7 +292,7 @@ instance: standalone without the journal. #. Perform a clean shutdown of the :binary:`~bin.mongod` - instance. For example, connect :mongosh:`mongosh ` to + instance. For example, connect :binary:`~bin.mongosh` to the instance and issue :method:`db.shutdownServer()`: .. code-block:: javascript diff --git a/source/tutorial/manage-mongodb-processes.txt b/source/tutorial/manage-mongodb-processes.txt index d3f7c37d3b4..3f33110ab31 100644 --- a/source/tutorial/manage-mongodb-processes.txt +++ b/source/tutorial/manage-mongodb-processes.txt @@ -22,7 +22,7 @@ The following examples assume the directory containing the :binary:`~bin.mongod` process is the primary database process that runs on an individual server. :binary:`~bin.mongos` provides a coherent MongoDB interface equivalent to a :binary:`~bin.mongod` from the perspective of a -client. The :mongosh:`mongosh ` binary provides the administrative +client. The :binary:`~bin.mongosh` binary provides the administrative shell. This document discusses the :binary:`~bin.mongod` process; however, @@ -132,7 +132,7 @@ instances using one of the following methods: Use ``shutdownServer()`` ~~~~~~~~~~~~~~~~~~~~~~~~ -Shut down the :binary:`~bin.mongod` from :mongosh:`mongosh ` using +Shut down the :binary:`~bin.mongod` from :binary:`~bin.mongosh` using the :method:`db.shutdownServer()` method as follows: .. code-block:: javascript @@ -253,7 +253,7 @@ Force Replica Set Shutdown If there is no up-to-date secondary and you want the primary to shut down, issue the :dbcommand:`shutdown` command with the ``force`` -argument, as in the following :mongosh:`mongosh ` operation: +argument, as in the following :binary:`~bin.mongosh` operation: .. code-block:: javascript diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index 76fa8c3704e..9c13fc4ba0a 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -54,7 +54,7 @@ Enable and Configure Database Profiling You can enable database profiling for :binary:`~bin.mongod` instances. -This section uses :mongosh:`mongosh ` helper +This section uses :binary:`~bin.mongosh` helper :method:`db.setProfilingLevel()` helper to enable profiling. For instructions using the driver, see your :driver:`driver documentation `. @@ -69,7 +69,7 @@ database after you enable profiling for that database. To enable profiling and set the profiling level, pass the profiling level to the :method:`db.setProfilingLevel()` helper. For example, to enable profiling for all database operations, consider the following -operation in :mongosh:`mongosh `: +operation in :binary:`~bin.mongosh`: .. code-block:: javascript @@ -260,7 +260,7 @@ Check Profiling Level ~~~~~~~~~~~~~~~~~~~~~ To view the :ref:`profiling level `, issue -the following from :mongosh:`mongosh `: +the following from :binary:`~bin.mongosh`: .. code-block:: javascript @@ -284,7 +284,7 @@ Disable Profiling ~~~~~~~~~~~~~~~~~ To disable profiling, use the following helper in -:mongosh:`mongosh `: +:binary:`~bin.mongosh`: .. code-block:: javascript @@ -427,9 +427,9 @@ Show the Five Most Recent Events ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On a database that has profiling enabled, the ``show profile`` helper -in :mongosh:`mongosh ` displays the 5 most recent operations +in :binary:`~bin.mongosh` displays the 5 most recent operations that took at least 1 millisecond to execute. Issue ``show profile`` -from :mongosh:`mongosh `, as follows: +from :binary:`~bin.mongosh`, as follows: .. code-block:: javascript @@ -481,7 +481,7 @@ must: For example, to create a new :data:`system.profile <.system.profile>` collection that is ``4000000`` bytes (4 MB), use the following sequence of operations in -:mongosh:`mongosh `: +:binary:`~bin.mongosh`: .. code-block:: javascript diff --git a/source/tutorial/map-reduce-examples.txt b/source/tutorial/map-reduce-examples.txt index 6f9c96fa00d..d5932464e4d 100644 --- a/source/tutorial/map-reduce-examples.txt +++ b/source/tutorial/map-reduce-examples.txt @@ -25,7 +25,7 @@ Map-Reduce Examples aggregation operators starting in version 4.4. Use these operators to define custom aggregation expressions in JavaScript. -In :mongosh:`mongosh `, the :method:`db.collection.mapReduce()` +In :binary:`~bin.mongosh`, the :method:`db.collection.mapReduce()` method is a wrapper around the :dbcommand:`mapReduce` command. The following examples use the :method:`db.collection.mapReduce()` method. diff --git a/source/tutorial/merge-chunks-in-sharded-cluster.txt b/source/tutorial/merge-chunks-in-sharded-cluster.txt index 36d35c97248..8121ed9b17a 100644 --- a/source/tutorial/merge-chunks-in-sharded-cluster.txt +++ b/source/tutorial/merge-chunks-in-sharded-cluster.txt @@ -29,7 +29,7 @@ Procedure Identify Chunk Ranges ~~~~~~~~~~~~~~~~~~~~~ -In :mongosh:`mongosh `, identify the :term:`chunk` +In :binary:`~bin.mongosh`, identify the :term:`chunk` ranges with the following operation: .. code-block:: javascript diff --git a/source/tutorial/migrate-chunks-in-sharded-cluster.txt b/source/tutorial/migrate-chunks-in-sharded-cluster.txt index 74c2b3a2d28..81d0f4140e2 100644 --- a/source/tutorial/migrate-chunks-in-sharded-cluster.txt +++ b/source/tutorial/migrate-chunks-in-sharded-cluster.txt @@ -33,7 +33,7 @@ between shards, see :ref:`sharding-balancing-internals` and :term:`shard key` for a collection named ``users`` in the ``myapp`` database, and that the value ``smith`` exists within the :term:`chunk` to migrate. Migrate the chunk using the following command in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. .. code-block:: javascript diff --git a/source/tutorial/model-monetary-data.txt b/source/tutorial/model-monetary-data.txt index 5304e396c5b..e30422edcc6 100644 --- a/source/tutorial/model-monetary-data.txt +++ b/source/tutorial/model-monetary-data.txt @@ -85,7 +85,7 @@ Unlike binary-based floating-point formats (i.e., the ``double`` BSON type), decimal128 does not approximate decimal values and is able to provide the exact precision required for working with monetary data. -From :mongosh:`mongosh ` ``decimal`` values are assigned and +From :binary:`~bin.mongosh` ``decimal`` values are assigned and queried using the ``NumberDecimal()`` constructor. The following example adds a document containing gas prices to a ``gasprices`` collection: diff --git a/source/tutorial/modify-chunk-size-in-sharded-cluster.txt b/source/tutorial/modify-chunk-size-in-sharded-cluster.txt index 3c2e4609fdd..4e265b1042f 100644 --- a/source/tutorial/modify-chunk-size-in-sharded-cluster.txt +++ b/source/tutorial/modify-chunk-size-in-sharded-cluster.txt @@ -21,7 +21,7 @@ megabytes, inclusive. To modify the chunk size, use the following procedure: #. Connect to any :binary:`~bin.mongos` in the cluster using - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. #. Issue the following command to switch to the :ref:`config-database`: diff --git a/source/tutorial/perform-incremental-map-reduce.txt b/source/tutorial/perform-incremental-map-reduce.txt index b48cf7dcf2e..3358eca93e5 100644 --- a/source/tutorial/perform-incremental-map-reduce.txt +++ b/source/tutorial/perform-incremental-map-reduce.txt @@ -21,7 +21,7 @@ Perform Incremental Map-Reduce :doc:`/reference/map-reduce-to-aggregation-pipeline`. To perform map-reduce operations, MongoDB provides the -:dbcommand:`mapReduce` command and, in :mongosh:`mongosh `, +:dbcommand:`mapReduce` command and, in :binary:`~bin.mongosh`, the :method:`db.collection.mapReduce()` wrapper method. If the map-reduce data set is constantly growing, you may want to diff --git a/source/tutorial/remove-documents.txt b/source/tutorial/remove-documents.txt index 52590b78a38..09c11ce6368 100644 --- a/source/tutorial/remove-documents.txt +++ b/source/tutorial/remove-documents.txt @@ -29,7 +29,7 @@ upper-right to set the language of the following examples. tabs: - id: shell content: | - This page uses the following :mongosh:`mongosh ` methods: + This page uses the following :binary:`~bin.mongosh` methods: - :method:`db.collection.deleteMany()` - :method:`db.collection.deleteOne()` diff --git a/source/tutorial/remove-replica-set-member.txt b/source/tutorial/remove-replica-set-member.txt index e522c21edbd..8ddaa229bc1 100644 --- a/source/tutorial/remove-replica-set-member.txt +++ b/source/tutorial/remove-replica-set-member.txt @@ -18,7 +18,7 @@ Remove a Member Using ``rs.remove()`` 1. Shut down the :binary:`~bin.mongod` instance for the member you wish to remove. To shut down the instance, connect using - :mongosh:`mongosh ` and use the :method:`db.shutdownServer()` + :binary:`~bin.mongosh` and use the :method:`db.shutdownServer()` method. #. Connect to the replica set's current :term:`primary`. To determine @@ -60,7 +60,7 @@ Procedure 1. Shut down the :binary:`~bin.mongod` instance for the member you wish to remove. To shut down the instance, connect using - :mongosh:`mongosh ` and use the :method:`db.shutdownServer()` + :binary:`~bin.mongosh` and use the :method:`db.shutdownServer()` method. #. Connect to the replica set's current :term:`primary`. To determine diff --git a/source/tutorial/remove-shards-from-cluster.txt b/source/tutorial/remove-shards-from-cluster.txt index c454a22b715..2aa69198002 100644 --- a/source/tutorial/remove-shards-from-cluster.txt +++ b/source/tutorial/remove-shards-from-cluster.txt @@ -22,7 +22,7 @@ hardware. To migrate, see :doc:`/tutorial/migrate-sharded-cluster-to-new-hardware` instead. To remove a shard, first connect to one of the cluster's -:binary:`~bin.mongos` instances using :mongosh:`mongosh `. Then use +:binary:`~bin.mongos` instances using :binary:`~bin.mongosh`. Then use the sequence of tasks in this document to remove a shard from the cluster. @@ -39,7 +39,7 @@ Ensure the Balancer Process is Enabled To successfully migrate data from a shard, the :term:`balancer` process **must** be enabled. Check the balancer state using the -:method:`sh.getBalancerState()` helper in :mongosh:`mongosh `. +:method:`sh.getBalancerState()` helper in :binary:`~bin.mongosh`. For more information, see the section on :ref:`balancer operations `. @@ -49,7 +49,7 @@ Determine the Name of the Shard to Remove ----------------------------------------- To determine the name of the shard, connect to a :binary:`~bin.mongos` -instance with :mongosh:`mongosh ` and either: +instance with :binary:`~bin.mongosh` and either: - Use the :dbcommand:`listShards` command, as in the following: diff --git a/source/tutorial/resync-replica-set-member.txt b/source/tutorial/resync-replica-set-member.txt index 58889964935..b7d3883d84b 100644 --- a/source/tutorial/resync-replica-set-member.txt +++ b/source/tutorial/resync-replica-set-member.txt @@ -81,7 +81,7 @@ perform an initial sync by restarting the instance without the contents of the 1. Stop the member's :binary:`~bin.mongod` instance. To ensure a clean shutdown, use the :method:`db.shutdownServer()` - method from :mongosh:`mongosh ` or on Linux systems, the + method from :binary:`~bin.mongosh` or on Linux systems, the :option:`mongod --shutdown` option. 2. (Optional) Make a backup of all data and sub-directories from the diff --git a/source/tutorial/rotate-encryption-key.txt b/source/tutorial/rotate-encryption-key.txt index 5783fad0669..d3e0321fcbb 100644 --- a/source/tutorial/rotate-encryption-key.txt +++ b/source/tutorial/rotate-encryption-key.txt @@ -47,7 +47,7 @@ For a replica set, to rotate out a member: --kmipServerName \ --kmipServerCAFile ca.pem --kmipClientCertificateFile client.pem -#. Connect :mongosh:`mongosh ` to the replica set's primary. +#. Connect :binary:`~bin.mongosh` to the replica set's primary. #. Add the instance to the replica set: @@ -116,7 +116,7 @@ to re-encrypt the entire data set. #. Step down the replica set primary. - Connect :mongosh:`mongosh ` to the primary and use + Connect :binary:`~bin.mongosh` to the primary and use :method:`rs.stepDown()` to step down the primary and force an election of a new primary: diff --git a/source/tutorial/rotate-key-replica-set.txt b/source/tutorial/rotate-key-replica-set.txt index d2e84ede2b4..953f65ae632 100644 --- a/source/tutorial/rotate-key-replica-set.txt +++ b/source/tutorial/rotate-key-replica-set.txt @@ -95,7 +95,7 @@ sequence of keys. Once all the keyfiles contain both the old and new keys, restart each member one at a time. -**For each secondary member**, connect :mongosh:`mongosh ` to the +**For each secondary member**, connect :binary:`~bin.mongosh` to the member and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -107,7 +107,7 @@ a. Use the :method:`db.shutdownServer()` method to shut down the member: b. Restart the member. -**For the primary**, connect :mongosh:`mongosh ` to the member and +**For the primary**, connect :binary:`~bin.mongosh` to the member and a. Use :method:`rs.stepDown()` to step down the member: @@ -151,7 +151,7 @@ Modify each member's keyfile to include only the new password. Once all the keyfiles contain the new key only, restart each member one at a time. -**For each secondary member**, connect :mongosh:`mongosh ` to the +**For each secondary member**, connect :binary:`~bin.mongosh` to the member and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -163,7 +163,7 @@ a. Use the :method:`db.shutdownServer()` method to shut down the member: b. Restart the member. -**For the primary**, connect :mongosh:`mongosh ` to the member and +**For the primary**, connect :binary:`~bin.mongosh` to the member and a. Use :method:`rs.stepDown()` to step down the member: diff --git a/source/tutorial/rotate-key-sharded-cluster.txt b/source/tutorial/rotate-key-sharded-cluster.txt index 2fb147bf43d..9a29ec2694c 100644 --- a/source/tutorial/rotate-key-sharded-cluster.txt +++ b/source/tutorial/rotate-key-sharded-cluster.txt @@ -100,7 +100,7 @@ Config Servers `````````````` **For each secondary of the config server replica set (CSRS)**, -connect :mongosh:`mongosh ` to the member and: +connect :binary:`~bin.mongosh` to the member and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -111,7 +111,7 @@ a. Use the :method:`db.shutdownServer()` method to shut down the member: b. Restart the member. -**For the primary**, connect :mongosh:`mongosh ` to the member and +**For the primary**, connect :binary:`~bin.mongosh` to the member and a. Use :method:`rs.stepDown()` to step down the member: @@ -133,7 +133,7 @@ Shard Replica Sets `````````````````` **For each secondary member of the shard replica sets**, connect -:mongosh:`mongosh ` to the member and: +:binary:`~bin.mongosh` to the member and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -145,7 +145,7 @@ a. Use the :method:`db.shutdownServer()` method to shut down the member: b. Restart the member. **For the primary of each shard replica set**, connect -:mongosh:`mongosh ` to the member and +:binary:`~bin.mongosh` to the member and a. Use :method:`rs.stepDown()` to step down the member: @@ -168,7 +168,7 @@ a. Use :method:`rs.stepDown()` to step down the member: `````````````````` **For each mongos/router instance**, connect -:mongosh:`mongosh ` to the :binary:`~bin.mongos` instance and: +:binary:`~bin.mongosh` to the :binary:`~bin.mongos` instance and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -208,7 +208,7 @@ Config Servers `````````````` **For each secondary of the config server replica set (CSRS)**, -connect :mongosh:`mongosh ` to the member and: +connect :binary:`~bin.mongosh` to the member and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -219,7 +219,7 @@ a. Use the :method:`db.shutdownServer()` method to shut down the member: b. Restart the member. -**For the primary**, connect :mongosh:`mongosh ` to the member and +**For the primary**, connect :binary:`~bin.mongosh` to the member and a. Use :method:`rs.stepDown()` to step down the member: @@ -241,7 +241,7 @@ Shard Replica Sets `````````````````` **For each secondary member of the shard replica sets**, connect -:mongosh:`mongosh ` to the member and: +:binary:`~bin.mongosh` to the member and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -253,7 +253,7 @@ a. Use the :method:`db.shutdownServer()` method to shut down the member: b. Restart the member. **For the primary of each shard replica set**, connect -:mongosh:`mongosh ` to the member and +:binary:`~bin.mongosh` to the member and a. Use :method:`rs.stepDown()` to step down the member: @@ -275,7 +275,7 @@ a. Use :method:`rs.stepDown()` to step down the member: `````````````````` **For each mongos/router instance**, connect -:mongosh:`mongosh ` to the :binary:`~bin.mongos` instance and: +:binary:`~bin.mongosh` to the :binary:`~bin.mongos` instance and: a. Use the :method:`db.shutdownServer()` method to shut down the member: diff --git a/source/tutorial/rotate-x509-membership-certificates.txt b/source/tutorial/rotate-x509-membership-certificates.txt index 99e3a4708c8..9424b577d90 100644 --- a/source/tutorial/rotate-x509-membership-certificates.txt +++ b/source/tutorial/rotate-x509-membership-certificates.txt @@ -67,7 +67,7 @@ procedure completes. To avoid these messages, you can set the override parameter on running members. -Connect :mongosh:`mongosh ` directly to each member of the +Connect :binary:`~bin.mongosh` directly to each member of the deployment and set the :parameter:`tlsX509ClusterAuthDNOverride` parameter to the new certificate ``DN``: @@ -112,7 +112,7 @@ member (see next step). Once you have modified the configuration for all the members, restart each secondary and then the primary. -**For each secondary member**, connect :mongosh:`mongosh ` to the +**For each secondary member**, connect :binary:`~bin.mongosh` to the member and: a. Use the :method:`db.shutdownServer()` method to shut down the member: @@ -127,7 +127,7 @@ b. Restart the member. Ensure the member has reached :replstate:`SECONDARY` state before restarting the next secondary. -**For the primary**, connect :mongosh:`mongosh ` to the member and +**For the primary**, connect :binary:`~bin.mongosh` to the member and a. Use :method:`rs.stepDown()` to step down the member: diff --git a/source/tutorial/split-chunks-in-sharded-cluster.txt b/source/tutorial/split-chunks-in-sharded-cluster.txt index 62facefb4e8..264df5e2657 100644 --- a/source/tutorial/split-chunks-in-sharded-cluster.txt +++ b/source/tutorial/split-chunks-in-sharded-cluster.txt @@ -42,7 +42,7 @@ Use :method:`sh.status()` to determine the current chunk ranges across the cluster. To split chunks manually, use the :dbcommand:`split` command with either -fields ``middle`` or ``find``. :mongosh:`mongosh ` provides the +fields ``middle`` or ``find``. :binary:`~bin.mongosh` provides the helper methods :method:`sh.splitFind()` and :method:`sh.splitAt()`. :method:`~sh.splitFind()` splits the chunk that contains the *first* diff --git a/source/tutorial/terminate-running-operations.txt b/source/tutorial/terminate-running-operations.txt index 0c90a12a183..517042dc71d 100644 --- a/source/tutorial/terminate-running-operations.txt +++ b/source/tutorial/terminate-running-operations.txt @@ -31,7 +31,7 @@ MongoDB interrupts the operation at the next :term:`interrupt point`. Terminate a Query ````````````````` -From :mongosh:`mongosh `, use the following method to set a +From :binary:`~bin.mongosh`, use the following method to set a time limit of 30 milliseconds for this query: .. code-block:: javascript diff --git a/source/tutorial/troubleshoot-kerberos.txt b/source/tutorial/troubleshoot-kerberos.txt index cb32db7e33b..4d7eecef550 100644 --- a/source/tutorial/troubleshoot-kerberos.txt +++ b/source/tutorial/troubleshoot-kerberos.txt @@ -90,7 +90,7 @@ Kerberos Trace Logging on Linux MIT Kerberos provides the ``KRB5_TRACE`` environment variable for trace logging output. If you are having persistent problems with MIT Kerberos on Linux, you can set ``KRB5_TRACE`` when starting your -:binary:`~bin.mongod`, :binary:`~bin.mongos`, or :mongosh:`mongosh ` instances to +:binary:`~bin.mongod`, :binary:`~bin.mongos`, or :binary:`~bin.mongosh` instances to produce verbose logging. For example, the following command starts a standalone :binary:`~bin.mongod` diff --git a/source/tutorial/troubleshoot-map-function.txt b/source/tutorial/troubleshoot-map-function.txt index ac242b19ed1..f0c5d99ff24 100644 --- a/source/tutorial/troubleshoot-map-function.txt +++ b/source/tutorial/troubleshoot-map-function.txt @@ -110,5 +110,5 @@ following prototype: The ``map`` function must meet various requirements. For a list of all the requirements for the ``map`` function, see :dbcommand:`mapReduce`, - or :mongosh:`mongosh ` helper method + or :binary:`~bin.mongosh` helper method :method:`db.collection.mapReduce()`. diff --git a/source/tutorial/troubleshoot-reduce-function.txt b/source/tutorial/troubleshoot-reduce-function.txt index ff630ebcfa1..70e0c95bc8b 100644 --- a/source/tutorial/troubleshoot-reduce-function.txt +++ b/source/tutorial/troubleshoot-reduce-function.txt @@ -33,7 +33,7 @@ must meet various requirements. This tutorial helps verify that the - The ``reduce`` function must be *idempotent*. For a list of all the requirements for the ``reduce`` function, see -:dbcommand:`mapReduce`, or :mongosh:`mongosh ` helper method +:dbcommand:`mapReduce`, or :binary:`~bin.mongosh` helper method :method:`db.collection.mapReduce()`. .. note:: diff --git a/source/tutorial/troubleshoot-replica-sets.txt b/source/tutorial/troubleshoot-replica-sets.txt index cda5da9f79d..8c01dc0402a 100644 --- a/source/tutorial/troubleshoot-replica-sets.txt +++ b/source/tutorial/troubleshoot-replica-sets.txt @@ -20,7 +20,7 @@ Check Replica Set Status To display the current state of the replica set and current state of each member, run the :method:`rs.status()` method in a -:mongosh:`mongosh ` session that is connected to the replica set's +:binary:`~bin.mongosh` session that is connected to the replica set's :term:`primary`. For descriptions of the information displayed by :method:`rs.status()`, see :doc:`/reference/command/replSetGetStatus`. @@ -44,7 +44,7 @@ will be inconsistent. To check the current length of replication lag: -- In a :mongosh:`mongosh ` session that is connected to the primary, +- In a :binary:`~bin.mongosh` session that is connected to the primary, call the :method:`rs.printSecondaryReplicationInfo()` method. Returns the ``syncedTo`` value for each member, @@ -255,7 +255,7 @@ A larger :term:`oplog` can give a replica set a greater tolerance for lag, and make the set more resilient. To check the size of the oplog for a given :term:`replica set` member, -connect to the member in :mongosh:`mongosh ` and run the +connect to the member in :binary:`~bin.mongosh` and run the :method:`rs.printReplicationInfo()` method. The output displays the size of the oplog and the date ranges of the diff --git a/source/tutorial/update-documents.txt b/source/tutorial/update-documents.txt index 7af47f165b3..73f542db208 100644 --- a/source/tutorial/update-documents.txt +++ b/source/tutorial/update-documents.txt @@ -33,7 +33,7 @@ upper-right to set the language of the following examples. tabs: - id: shell content: | - This page uses the following :mongosh:`mongosh ` methods: + This page uses the following :binary:`~bin.mongosh` methods: - :method:`db.collection.updateOne(\, \, \) ` diff --git a/source/tutorial/upgrade-revision.txt b/source/tutorial/upgrade-revision.txt index b0168194db9..125e994199a 100644 --- a/source/tutorial/upgrade-revision.txt +++ b/source/tutorial/upgrade-revision.txt @@ -178,7 +178,7 @@ Upgrade each secondary separately as follows: #. After upgrading a secondary, wait for the secondary to recover to the ``SECONDARY`` state before upgrading the next instance. To check the member's state, issue :method:`rs.status()` in - :mongosh:`mongosh `. + :binary:`~bin.mongosh`. The secondary may briefly go into ``STARTUP2`` or ``RECOVERING``. This is normal. Make sure to wait for the secondary to fully recover @@ -190,7 +190,7 @@ Upgrade the Primary 1. Step down the primary to initiate the normal :ref:`failover ` procedure. Using one of the following: - - The :method:`rs.stepDown()` helper in :mongosh:`mongosh `. + - The :method:`rs.stepDown()` helper in :binary:`~bin.mongosh`. - The :dbcommand:`replSetStepDown` database command. @@ -203,7 +203,7 @@ Upgrade the Primary failover procedure. #. Once the primary has stepped down, call the :method:`rs.status()` - method from :mongosh:`mongosh ` until you see that another + method from :binary:`~bin.mongosh` until you see that another member has assumed the ``PRIMARY`` state. #. Shut down the original primary and upgrade its instance by diff --git a/source/tutorial/use-database-commands.txt b/source/tutorial/use-database-commands.txt index 5170a3b7538..90f48c92489 100644 --- a/source/tutorial/use-database-commands.txt +++ b/source/tutorial/use-database-commands.txt @@ -37,9 +37,9 @@ specify the :dbcommand:`hello` command using the following Issue Commands -------------- -:mongosh:`mongosh ` provides a helper method for running +:binary:`~bin.mongosh` provides a helper method for running commands called :method:`db.runCommand()`. The following operation in -:mongosh:`mongosh ` runs the previous command: +:binary:`~bin.mongosh` runs the previous command: .. code-block:: javascript @@ -51,8 +51,8 @@ with :method:`db.runCommand()` is equivalent to a special query against the :term:`$cmd` collection. Many common commands have their own shell helpers or wrappers in -:mongosh:`mongosh ` and drivers, such as the -:method:`db.hello()` method in :mongosh:`mongosh `. +:binary:`~bin.mongosh` and drivers, such as the +:method:`db.hello()` method in :binary:`~bin.mongosh`. You can use the ``maxTimeMS`` option to specify a time limit for the execution of a command, see :ref:`terminate-long-running-commands` for diff --git a/source/tutorial/view-sharded-cluster-configuration.txt b/source/tutorial/view-sharded-cluster-configuration.txt index bf6c36cdbc1..16cb1a72b44 100644 --- a/source/tutorial/view-sharded-cluster-configuration.txt +++ b/source/tutorial/view-sharded-cluster-configuration.txt @@ -20,7 +20,7 @@ List Databases with Sharding Enabled To list the databases that have sharding enabled, query the ``databases`` collection in the :ref:`config-database`. A database has sharding enabled if the value of the ``partitioned`` -field is ``true``. Connect :mongosh:`mongosh ` to a +field is ``true``. Connect :binary:`~bin.mongosh` to a :binary:`~bin.mongos` instance and run the following operation to get a full list of databases with sharding enabled: