[DOCS-7649] mongorestore bug Created: 14/Apr/16 Updated: 30/Oct/23 Resolved: 20/Oct/17 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | tools |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Allison Reinheimer Moore |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | collector-298ba4e7, docs-triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 14.04 server Location: https://docs.mongodb.org/manual/reference/program/mongorestore/#bin.mongorestore |
||
| Participants: | |
| Days since reply: | 7 years, 43 weeks, 6 days ago |
| 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. |
| Comments |
| Comment by Allison Reinheimer Moore [ 14/Apr/16 ] |
|
Thanks, and you're using MongoDB 2.4? |
| Comment by Alex Furnica [ 14/Apr/16 ] |
|
Of course.
Restore:
The problem was that the first time when I tried to restore, it restored correctly in mydb database, but after restarting mongodb server, removing restored db and tried again - it restored in _db database, even in - P.S. All theese commands I wrote in a bash script, and executed it. Now I tried it again, but direct from terminal. After that the problem temporary disappear.. |
| Comment by Allison Reinheimer Moore [ 14/Apr/16 ] |
|
alex025 Can you provide the mongorestore commands that you ran when you observed the expected and unexpected behaviour? I'm having some trouble understanding what issue you've had. Thanks! |