Sample Header Ad - 728x90

how to run mongo export on macbook?

1 vote
2 answers
2555 views
I am using mongodb Atlas (M0), which does not provide db backup feature. I am creating a nodejs script that will export all the collections automatically periodically. So far I have done the following: - created a programmatic api from my login. - whitelisted my ip - installed mongocli - created a default profile using public and private api keys. And command looks like this: mongoexport --uri mongodb+srv://${mongoUser}:${mongoPass}@mongoprojectname.lok0l.mongodb.net/${database} --collection ${collection} --type ${fileType} --out ${fileName} --profile default I am not able to figure out how to run this command. If I run this command in my terminal I get this error: /bin/sh: mongoexport: command not found\n
Asked by Jasmohan Singh (21 rep)
Feb 22, 2021, 08:16 AM
Last activity: Jan 22, 2025, 08:00 AM