Chapter 2: Importing and exporting error


I am using Ubuntu 20.04 to run the sample code provided in chapter 2 importing and exporting. I am getting an error while using the command

mongodump --uri “mongodb+srv://”

2021-03-17T11:18:13.795+0000 writing sample_supplies.sales to
2021-03-17T11:18:13.833+0000 Failed: error writing data for collection sample_supplies.sales to disk: error reading collection: Failed to parse: { find: “sales”, skip: 0, snapshot: true, $db: “sample_supplies” }. Unrecognized field ‘snapshot’.

How can I resolve it


1 Like

I have just tried your command (replacing the shown double quotes with normal double quotes) and it worked.

mongodump --uri "mongodb+srv://"

So it was the quotes, or not enough disk space, or wrong permissions.

1 Like

Hi @vinu_thomas, hope you are doing well.
First of all welcome to our community.
Thank you @steevej for your response, I believe it will certainly fix the issue.
In case you have any doubts, please feel free to ask and I will try my best to answer your query.

Thanks. Regards.
Sourabh Bagrecha,
Curriculum Services Engineer.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.