mongorestore

MongoDB mongorestore failure: locale::facet::_S_create_c_locale name not valid

白昼怎懂夜的黑 提交于 2019-11-28 02:48:11
I created a dump with mongodump on computer A (ubuntu 12.04 server). I moved it to computer B (ubuntu 12.04 server) and typed: mongorestore -db db_name --drop db_dump_path It failed and it reported: connected to: 127.0.0.1 terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted I've successfully accomplished this operation before and this strange behavior has never occurred. What do I need to do to fix this? On my distro "locale-gen" was not installed and it turned out all I had to do is set the LC_ALL environment

How to use the dumped data by mongodump?

a 夏天 提交于 2019-11-27 17:47:28
I have used mongodump to dump my database of mongodb, it created some bson files under dump/mydb But I don't know how to use them. I tried mongoimport , but seems it can't import bson data. Then how to use these bson files? How to import them to another mongodb? Justin Jenkins You need to use mongorestore , not mongoimport ... which is used for things like importing json, or csv, etc. From the back-up-with-mongodump docs: mongodump reads data from a MongoDB database and creates high fidelity BSON files which the mongorestore tool can use to populate a MongoDB database. mongodump and

How to restore the dump into your running mongodb

╄→гoц情女王★ 提交于 2019-11-27 12:15:11
问题 I want to load data/restore dump data in mongoDB using mongorestore. I am trying to command mongorestore dump but it giving me error Sat Sep 21 16:12:33.403 JavaScript execution failed: SyntaxError: Unexpected identifier How can we restore or put data into mongoDB?? Please give me the steps. 回答1: mongodump: To dump all the records: mongodump -db databasename To limit the amount of data included in the database dump, you can specify --db and --collection as options to mongodump. For example:

Mongorestore, from meteor production server to local

▼魔方 西西 提交于 2019-11-27 12:11:09
问题 I've found plenty of good instructions on how to use mongodump and mongorestore, to back up my meteor production server and restore the backup if need be: 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] What I haven't

MongoDB mongorestore failure: locale::facet::_S_create_c_locale name not valid

蹲街弑〆低调 提交于 2019-11-27 04:58:53
问题 I created a dump with mongodump on computer A (ubuntu 12.04 server). I moved it to computer B (ubuntu 12.04 server) and typed: mongorestore -db db_name --drop db_dump_path It failed and it reported: connected to: 127.0.0.1 terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted I've successfully accomplished this operation before and this strange behavior has never occurred. What do I need to do to fix this? 回答1: On