[DOCS-10706] mongorestore --db database --collection collection deprecation warning Created: 22/Aug/17  Updated: 30/Oct/23  Resolved: 29/Mar/19

Status: Closed
Project: Documentation
Component/s: tools
Affects Version/s: 3.4.7
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Torsten Spindler Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: docs-triage, mongorestore
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates DOCS-12579 mongorestore docs show deprecated exa... Closed
Participants:
Days since reply: 4 years, 45 weeks, 5 days ago

 Description   

When specifying --db and --coll without pointing to a bson dump file, a deprecation warning is shown on the command line:

the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead

This deprecation warning is missing from https://docs.mongodb.com/manual/reference/program/mongorestore for the two options.



 Comments   
Comment by Ravind Kumar (Inactive) [ 29/Mar/19 ]

This ticket duplicates DOCS-12579. I'll integrate comments here into that ticket and try to tackle as soon as possible.

Comment by Nic Cottrell [ 28/Mar/19 ]

Strangely, when specifying --db AND --archive you still give the deprecation warning even when doing the exact example from the bottom of the mongorestore doc page:

mongorestore --gzip --archive=test.20150715.gz --db test 

Comment by Asya Kamsky [ 28/Dec/17 ]

That page also does not mention that --dir can take stdin as an option (it only mentions stdin for --archive). The deprecation warning is only when -d and -c are combined with stdin as input. And it's not clear that it is correct to deprecate - see TOOLS-1918.

Generated at Thu Feb 08 08:01:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.