小编nes*_*.gp的帖子

Mongorestore,从流星生产服务器到本地

我已经找到了很多关于如何使用mongodump和mongorestore的良好指示,备份我的流星生产服务器并在需要时恢复备份:

meteor mongo --url myApp.meteor.com

mongodump -u client -h production-db-b2.meteor.io:27017 -d myApp_meteor_com -out dump/2014_10_21 -p [password from meteor mongo --url]

mongorestore -u client -h production-db-b2.meteor.io:27017 -d myApp_meteor_com dump/2014_10_21_v2/myApp_meteor_com -p [password from meteor mongo --url]
Run Code Online (Sandbox Code Playgroud)

我没有找到的解释是如何将备份转储恢复我的本地流星应用程序.我的app文件夹中有一个mongodump输出.我不确定我是否可以使用mongorestore,或者我是否应该做其他事情.

mongodb mongorestore mongodump meteor

23
推荐指数
4
解决办法
1万
查看次数

C:在scanf中匹配单个空格

我只想强制scanf读取单个空格,然后存储字符串的其余部分,直到在变量中找到逗号为止。我不能这样做:

char content[100];
fscanf(f, " %[^,\n],", content);
Run Code Online (Sandbox Code Playgroud)

因为content如果有未决的事情我不想被设置'\n'。有没有办法摆脱空白?

我到目前为止发现的解决方法:

char space;
fscanf(f, "%1[^\n]%[^,\n],", &space, content);
Run Code Online (Sandbox Code Playgroud)

很抱歉这个愚蠢的问题,谢谢您。

c

0
推荐指数
1
解决办法
207
查看次数

标签 统计

c ×1

meteor ×1

mongodb ×1

mongodump ×1

mongorestore ×1