Skip to content

mongoimport --drop does not drop all the collections #2005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

mongoimport --drop does not drop all the collections #2005

wants to merge 1 commit into from

Conversation

gianpaj
Copy link
Contributor

@gianpaj gianpaj commented Sep 22, 2014

For example in 2.6.4

If you specify the collection it will only drop that.

$ mongoimport -d test2 -c test --drop test.js
connected to: 127.0.0.1
2014-09-22T16:44:01.692+0100 dropping: test2.test
2014-09-22T16:44:01.715+0100 imported 1 objects

If you don't specify it. It will only drop the collection with the same name as the file you're importing.

$mongoimport -d test2 --drop test.js
connected to: 127.0.0.1
no collection specified!
using filename 'test' as collection.
2014-09-22T16:44:32.534+0100 dropping: test2.test
2014-09-22T16:44:32.537+0100 imported 1 objects

I had another collection in the test2 database and that was never dropped.

For example in 2.6.4

If you specify the collection it will only drop that.
```$ mongoimport -d test2 -c test --drop test.js
connected to: 127.0.0.1
2014-09-22T16:44:01.692+0100 dropping: test2.test
2014-09-22T16:44:01.715+0100 imported 1 objects
```

If you don't specify it. It will only drop the collection with the same name as the file you're importing.
```
$mongoimport -d test2 --drop test.js
connected to: 127.0.0.1
no collection specified!
using filename 'test' as collection.
2014-09-22T16:44:32.534+0100 dropping: test2.test
2014-09-22T16:44:32.537+0100 imported 1 objects
```
@tychoish
Copy link
Contributor

merged

@tychoish tychoish closed this Sep 23, 2014
@gianpaj gianpaj deleted the patch-3 branch September 23, 2014 14:46
mongo-cr-bot pushed a commit that referenced this pull request Oct 13, 2022
* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

* DOCSP-7419-tls-update

Co-authored-by: jason-price-mongodb <[email protected]>

Co-authored-by: jason-price-mongodb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants