[DOCS-5672] mongorestore with --drop option Created: 18/Jun/15  Updated: 24/Feb/16  Resolved: 22/Jun/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: mongodb-3.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 8 years, 34 weeks, 2 days ago

 Description   

http://docs.mongodb.org/manual/reference/program/mongorestore/#cmdoption--drop

The --drop option for mongorestore states "Modifies the restoration procedure to drop every collection from the target database before restoring the collection from the dumped backup."

This should be reworded based on the current behavior. The --drop will not affect collections in the target database, if they are not in the dump. For example:

  1. Create DB abc
  2. Create collections c1 & c2 and populate
  3. mongodump abc
  4. Create collection c3 and populate
  5. Add documents to c1 & c2
  6. mongorestore abc --drop

The collections c1 & c2 will be restored from the dump, but c3 will still exist with the documents.

CC: mpobrien Please confirm this is the expected behavior.



 Comments   
Comment by Githook User [ 22/Jun/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-5672 clarify --drop for mongorestore
Branch: master
https://github.com/mongodb/docs/commit/dbf7a43408b47ec90374f3c98535db5ac7489bce

Comment by Githook User [ 22/Jun/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-5672 clarify --drop for mongorestore
Branch: v2.6
https://github.com/mongodb/docs/commit/d02f5d909ebee93edba8b957973d65c5ea843eca

Comment by Githook User [ 22/Jun/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-5672 clarify the --drop option for mongorestore
Branch: v2.4
https://github.com/mongodb/docs/commit/643acf3874a594a884e62b8789711d0f60f1bd16

Generated at Thu Feb 08 07:50:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.