Details
-
Bug
-
Resolution: Incomplete
-
Major - P3
-
None
-
Ubuntu 14.04 server
MongoDB version 2.4.9 last package from apt-get
*Location*: https://docs.mongodb.org/manual/reference/program/mongorestore/#bin.mongorestore
*User-Agent*: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
*Referrer*: https://docs.mongodb.org/manual/tutorial/backup-and-restore-tools/
*Screen Resolution*: 1920 x 1080
*repo*: docs
*source*: reference/program/mongorestore
Ubuntu 14.04 server MongoDB version 2.4.9 last package from apt-get *Location*: https://docs.mongodb.org/manual/reference/program/mongorestore/#bin.mongorestore *User-Agent*: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 *Referrer*: https://docs.mongodb.org/manual/tutorial/backup-and-restore-tools/ *Screen Resolution*: 1920 x 1080 *repo*: docs *source*: reference/program/mongorestore
Description
I dumped my database with mongodump and then tried to restore it with mongorestore on other server with other mongodb installation. But I found unexpected behavior: first time when I runned mongorestore the database was restored correctly, but after I restarted mongodb server (there was need to change the bind IP), removed imported database and tried to import it again, it was imported without specified in --db argument database name but as parent directory name of backup. Then, I changed command for restore and tried again - and mongorestore restored correctly.
I tested some variants of mongorestore command (including ommiting the --db argument and leaving the backup directory as last argument) and found that after restarting the mongodb daemon it doesn't matter what is changed in command - correct restoring is always after changing command.