4
我有一個簡單的mongodb數據庫。我正在使用mongodump傾倒。MongoDB FailedToParse:值不好的字符
dump命令
mongodump --db user_profiles --out /data/dumps/user-profiles
這裏是user_profiles數據庫的內容。它有一個集合(USER_DATA)組成如下:
{ "_id" : ObjectId("555a882a722f2a009fc136e4"), "username" : "thor", "passwd" : "*1D28C7B35C0CD618178988146861D37C97883D37", "email" : "[email protected]", "phone" : "4023331000" }
{ "_id" : ObjectId("555a882a722f2a009fc136e5"), "username" : "ironman", "passwd" : "*626AC8265C7D53693CB7478376CE1B4825DFF286", "email" : "[email protected]", "phone" : "4023331001" }
{ "_id" : ObjectId("555a882a722f2a009fc136e6"), "username" : "hulk", "passwd" : "*CB375EA58EE918755D4EC717738DCA3494A3E668", "email" : "[email protected]", "phone" : "4023331002" }
{ "_id" : ObjectId("555a882a722f2a009fc136e7"), "username" : "captain_america", "passwd" : "*B43FA5F9280F393E7A8C57D20648E8E4DFE99BA0", "email" : "[email protected]", "phone" : "4023331003" }
{ "_id" : ObjectId("555a882a722f2a009fc136e8"), "username" : "daredevil", "passwd" : "*B91567A0A3D304343624C30B306A4B893F4E4996", "email" : "[email protected]", "phone" : "4023331004" }
使用mongorestore
mongorestore --host db-test --port 27017 /remote/dumps/user-profiles
我得到的轉儲複製到一個NFS,然後試圖將轉儲裝載到測試服務器後,以下錯誤:
Mon May 18 20:19:23.918 going into namespace [user_profiles.user_data]
assertion: 16619 code FailedToParse: FailedToParse: Bad characters in value: offset:30
如何解決這個FailedToParse錯誤
隨意接受你自己的答案。 –
我必須等兩天才能回答我自己的問題,但我計劃。謝謝。 –