MongoDB Collection export error Path collision at tokens

Viewed 1942

I am trying to export my collections from Atlas to my Local MongoDB with MongoDB Compass tool. The issue is I can export some collections but my user collection returning error.

Error is: Path collision at tokens.0BUo4-zWowM9ldTIUbs57Q remaining portion 0BUo4-zWowM9ldTIUbs57Q

Any help appreciated, thanks.

MongoDB Compass version is 1.28.1

2 Answers

This error occurs because there are two different types. Probably you have your token set as an object, or as an empty string.

The solution to use Mongo Compass is manually unchecking the "Root level field" that marks as a string. Check the following example:

The error occurs because the field "Fotos_da_OcorrĂȘncia" can be an empty string "" or and object {bucketName: "", comment: "", elementId: ""}.

When i uncheck the Root Level Field it exports normally. Fields Example

Exported

By some search, I saw some other people facing similar problem. So it may be caused by some bug on MongoDB Compass version is 1.28.1. Workaround solution was using command line interface like below.

mongodump --uri="<connection-string>" --out /path/to/export
Related