mongodb-database-tools是MongoDB数据库工具的命令行的工具,用于工作与MongoDB部署。可以使用mongodumpmongoimport很方便的导入导出备份数据。

该数据库工具包括以下的二进制文件:

Binary Import / Export

mongodump

Creates a binary export of the contents of amongoddatabase.

mongorestore

Restores data from amongodumpdatabase dump into amongodormongos

bsondump

ConvertsBSONdump files intoJSON.

Data Import / Export

mongoimport

Imports content from anExtended JSON, CSV, or TSV export file.

mongoexport

Produces aJSONorCSVexport of data stored in amongodinstance.

Diagnostic Tools

mongostat

Provides a quick overview of the status of a currently runningmongodormongosinstance.

mongotop

Provides an overview of the time amongodinstance spends reading and writing data.

GridFS Tools

mongofiles

Supports manipulating files stored in your MongoDB instance inGridFSobjects.

下载地址:https://www.mongodb.com/try/download/database-tools

解压

tar zxvf mongodb-database-tools-rhel70-x86_64-100.6.1.tgz

移动到目录,这里可以和mongo放到一个目录,方便管理查找

mv mongodb-database-tools-rhel70-x86_64-100.6.1 /usr/local/mongodb/tools

配置环境变量:vi /etc/profile在末尾添加

export MONGODB_TOOLS=/usr/local/mongodb/tools
PATH=$PATH:$MONGODB_TOOLS/bin

因为我已经给mongo添加了变量,所以,这里我直接指定PATH

使其立即生效:source /etc/profile

配置完成。

附:https://www.mongodb.com/docs/database-tools/

到此这篇关于centos离线安装mongodb-database-tools方法详解的文章就介绍到这了,更多相关centos离线安装mongodb-database-tools内容请搜索萤火虫技术以前的文章或继续浏览下面的相关文章希望大家以后多多支持萤火虫技术!

点赞(299) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部