-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: mongorestore
When we use the option archive it could be nice to de-archive just one database inside another database which have a different name.
The actual use case is this one:
1. I have a mongo database created by a SaaS, this service give one database
2. I dump this database as an archive (Archive is used because of the necessity to dump it as a stream using stdout)
3. I want to restore my database to a new created database created from SaaS wich have a different database name than the original one
4. I'm blocked cause it's not possible with --archive option when restoring, it wants to create a database with the name from the original database which is not possible to use
Behavior of the option --targetDb in mongorestore:
- this can only be used when using --archive option
- This option make mongorestore to restore just one database at once
- If you have more than one database in archive and user use --targetDb it will fail, in this case it will ask to set also the option --db
- else mongorestore will take the only database set in archive and restore it in the database set in --targetDb
- duplicates
-
TOOLS-1073 mongorestore does not restore data in new database when --archive is used
- Closed
-
TOOLS-1234 mongorestore namespace renaming support
- Closed
- links to