如何将转储文件夹导入mongodb数据库? [英] How to import dump folder into mongodb database?

查看:72
本文介绍了如何将转储文件夹导入mongodb数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从远程服务器创建了 mongo dump ,并将 .bson .metadata 文件存储在文件夹中.

I have created a mongo dump from a remote server and .bson and .metadata files stored in to a folder.

我想将此文件夹导入到我的本地 mongodb 中.我正在使用 robomongo 作为 mongodb客户端ui .

I want to import this folder into my local mongodb. I am using robomongo as a mongodb client ui.

我得到了一些命令,它们一个接一个地导入json文件,但我想通过robomongo或cmd一次 import 所有文件.

I got some command which are importing json files one by one but I want import all the files at a time by robomongo or cmd.

推荐答案

mongodump 是用于创建数据库的二进制导出的实用程序. mongodump mongorestore 一起用作备份策略.

mongodump is a util for creating a binary export of the database. mongodump is used in conjunction with mongorestore as a backup strategy.

如果您想恢复 mongodump ,则需要使用

If you wanted to restore your mongodump then you would need to use mongorestore

或者,

您可以使用 mongoexport 进行导出,然后使用 mongoimport

You could take an export with mongoexport and then use mongoimport

这篇关于如何将转储文件夹导入mongodb数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆