Skip to content

DOCSP-977: adds --outFile and --bsonFile options to bsondump docs #3161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions source/includes/options-bsondump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,37 @@ description: |
optional: true
---
program: bsondump
name: bsonFile
directive: option
description: |
.. versionadded:: 3.4

Specifies a path to a :term:`BSON file` to dump to JSON. {{role}} is
an alternative to the positional :option:`<bsonFilename>` option.

By default, {{program}} reads from standard input.
optional: true
---
program: bsondump
name: <bsonFilename>
directive: option
description: |
The final argument to {{program}} is a document containing
:term:`BSON`. This data is typically generated by
{{program}} or by MongoDB in a :term:`rollback` operation.
optional: true
---
program: bsondump
name: outFile
directive: option
description: |
.. versionadded:: 3.4

Specifies the path of the file to which {{program}} should write
its output JSON data.

By default, {{program}} writes to standard output.
optional: true
---
program: bsondump
name: pretty
Expand Down
12 changes: 9 additions & 3 deletions source/reference/program/bsondump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,24 @@ Options

.. include:: /includes/option/option-bsondump-pretty.rst

.. include:: /includes/option/option-bsondump-bsonFile.rst

.. include:: /includes/option/option-bsondump-<bsonFilename>.rst

.. include:: /includes/option/option-bsondump-outFile.rst

Use
---

.. versionchanged:: 3.4

By default, :program:`bsondump` outputs data to standard output. To
create corresponding :term:`JSON` files, you will need to use the
shell redirect. See the following command:
create corresponding :term:`JSON` files, you can use the
:option:`--outFile` option:

.. code-block:: sh

bsondump collection.bson > collection.json
bsondump --outFile collection.json collection.bson

Use the following command (at the system shell) to produce debugging
output for a :term:`BSON` file:
Expand Down