How to Export or Import Csv or Json file using command in MongoDB's Database Centos Server or Linux Server?

I am using a Centos Server & have installed mongodb Database and it’s working fine means storing data perfectly but i haven’t any admin panel or export function in my project to I want to export my data for checking json or csv format. So, how to export please guide me or have any options then suggest me.

To export in MongoDB, see the command mongoexport.

1 Like
  1. Check is mongoshell is installed

Command to check

Mongosh --help

  1. Use following commands to dump in json format data

Mongoexport --uri=“database-uri” --collection=''collection-name to export" --out=“path to our document”