MongoDB Shell

mongo show dbs use <your_db_name> show collections db.myCollection.find() db.myCollection.find().pretty() db.studentdata.getIndexes() db.studentdata.dropIndex({student_name: 1}) db.studentdata.dropIndexes() mongodump -d database_name -o directory_to_store_dumps mongorestore -d database_name directory_backup_where_mongodb_tobe_restored