发布于 2015-09-14 15:10:54 | 153 次阅读 | 评论: 0 | 来源: 网络整理

Synopsis

The bsondump converts BSON files into human-readable formats, including JSON. For example, bsondump is useful for reading the output files generated by mongodump.

Options

bsondump
 
--help

Returns a basic help and usage text.

--verbose, -v

Increases the amount of internal reporting returned on the command line. Increase the verbosity with the -v form by including the option multiple times, (e.g. -vvvvv.)

--version

Returns the version of the bsondump utility.

--objcheck

Validates each BSON object before outputting it in JSON format. Use this option to filter corrupt objects from the output. This option has some performance impact.

--filter '<JSON>'

Limits the documents that bsondump exports to only those documents that match the JSON document specified as '<JSON>'. Be sure to include the document in single quotes to avoid interaction with your system’s shell environment.

--type <=json|=debug>

Changes the operation of bsondump from outputting “JSON” (the default) to a debugging format.

<bsonfilename>

The final argument to bsondump is a document containing BSON. This data is typically generated by mongodump or by MongoDB in a rollback operation.

Usage

By default, bsondump outputs data to standard output. To create corresponding JSON files, you will need to use the shell redirect. See the following command:

bsondump collection.bson > collection.json

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

bsondump --type=debug collection.bson
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务