Given the following database and related collection scows.tasks, how do I export 2GB it for storage purposes so to make space?
I have been trying to do it using various ways but none of them worked:
mongoexport --verbose --db scows --collection tasks --out tasks.json --verbose
mongoexport -vvvv --db scows --username='my_username' --password='my_passwd' --collection tasks --out /home/to/Desktop/storageMongo/tasks.json -f 'my_passwd'
mongoexport --host=127.0.0.1 --db scows --collection tasks --out tasts.json
And in doing this I always got the same exact error:
2020-02-13T12:55:17.183-0500 will listen for SIGTERM, SIGINT, and SIGKILL 2020-02-13T12:55:20.690-0500 error connecting to db server: no reachable servers
Posts I used to solve the problem but that unfortunately didn't help me out:
1) I used this one but nothing happened
2) This also but same results as above
3) This source was useful but didn't help me find out the problem
4) And lastly this one to help me with the command but I always had the same error.
5) Also as mentioned in the official documentation I am using my Ubuntu 18.04
shell as terminal to input the command instead of the mongo
shell.
How do I properly export a collection from MongoDB to my computer?