[DOCS-12579] mongorestore docs show deprecated example with --archive and --db Created: 28/Mar/19 Updated: 30/Oct/23 Resolved: 13/Jul/19 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Nic Cottrell | Assignee: | Kay Kim (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Days since reply: | 4 years, 30 weeks, 4 days ago | ||||||||||||||||||||||||||||
| Epic Link: | DOCSP-1769 | ||||||||||||||||||||||||||||
| Description |
DescriptionIn this section Restore from compressed data
which gives
it feels like we should skip the --db part of the example, or is this a bug in mongorestore in 4.0? Scope of changesImpact to Other DocsMVP (Work and Date)Resources (Scope or Design Docs, Invision, etc.) |
| Comments |
| Comment by Githook User [ 13/Jul/19 ] | |
|
Author: {'name': 'Kay Kim', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}Message: | |
| Comment by Githook User [ 13/Jul/19 ] | |
|
Author: {'name': 'Kay Kim', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}Message: | |
| Comment by Githook User [ 13/Jul/19 ] | |
|
Author: {'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}Message: | |
| Comment by Githook User [ 13/Jul/19 ] | |
|
Author: {'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}Message: | |
| Comment by Githook User [ 13/Jul/19 ] | |
|
Author: {'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}Message: | |
| Comment by Githook User [ 12/Jul/19 ] | |
|
Author: {'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}Message: | |
| Comment by Githook User [ 12/Jul/19 ] | |
|
Author: {'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}Message: | |
| Comment by Patrick Freed [ 01/Apr/19 ] | |
|
The example in the ticket description here is working as intended and should be emitting a deprecation warning. Restoring from an archive can be thought of as the same as restoring from a directory (we preserve the structure within the archive). When restoring from a directory, the subdirectories are named according to the collection they were dumped from. Additionally, there are metadata files that can also identify the namespaces that were dumped. The db and collection options are only used when restoring an isolated .bson file since it lacks the directory structure and metadata file. In such a case, the user needs to provide a place for the data to go since it can't be inferred from context. When the required context does exist however, we use nsInclude instead to filter down the possible namespaces to restore. In summary, -d and -c provide a destination to restore to when one cannot be inferred from what is being restored (i.e. raw .bson files or stdin without archive). nsInclude is used to choose namespaces to restore from among ones that can be found in a given dump (in a directory or archive). The second example involving piping from stdin is indeed a bug and should not be emitting a warning, since mongorestore will be expecting raw bson from stdin without the aforementioned structure or metadata. If fact, -d and -c are required when reading from stdin without archive for this reason. Note that when using the archive option when reading from stdin, the deprecation warning should be emitted for the same reasons it's emitted when using archive and reading from disk. This example is also deprecated for using -d with a directory based dump:
| |
| Comment by Patrick Freed [ 29/Mar/19 ] | |
|
We're currently in the process of rewriting most of the tools, and we have a catch all ticket (TOOLS-2218) that tracks the work of updating the docs to match. I've already finished the work on mongorestore, so I'll take some time Monday to go through it and vet the current state of its docs. | |
| Comment by David Golden [ 29/Mar/19 ] | |
|
patrick.freed, could you please help out on this, as you just worked on mongorestore? | |
| Comment by Ravind Kumar (Inactive) [ 28/Mar/19 ] | |
|
We'll have to dig into this a bit, I think. Thanks for raising. |