meteor:如何备份我的mongo数据库 [英] meteor: how can I backup my mongo database

查看:119
本文介绍了meteor:如何备份我的mongo数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何备份meteor mongo数据库?

How can I make a backup of my meteor mongo database?

如果我运行:

meteor mongo

mongodump命令在meteor mongoshell中不起作用

the mongodump command does not work inside the meteor mongoshell

推荐答案

首先你需要旋转流星。

然后如果你运行

meteor mongo

你会得到这样的输出:


MongoDB shell版本:2.2.1

MongoDB shell version: 2.2.1

连接到:127.0.0.1:3001/meteor

connecting to: 127.0.0.1:3001/meteor

Meteor db host位于127.0.0.1端口为3001.
退出mongo shell并从终端使用mongodump。

Meteor db host is at 127.0.0.1 with a port of 3001. Exit the mongo shell and use mongodump from your terminal.

mongodump -h 127.0.0.1 --port 3001 -d meteor

转储将位于您执行的文件夹中的dumps文件夹下上面的命令。

Dumps will be located under the dumps folder in the folder you executed the above command.

你可以用

You can import your db back to meteor with

mongorestore -h 127.0.0.1 --port 3001 -d meteor dump/meteor

这篇关于meteor:如何备份我的mongo数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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