Mongodb: Difference between revisions

From Halfface
Jump to navigation Jump to search
Line 6: Line 6:
=list databases=
=list databases=
  show dbs
  show dbs
=mongodump=
mongodump -ssl --host "database/mongo.inter.net" -u username -p P@ssw0rd --authenticationDatabase admin --db "database" -out=/tmp/database_2020-10-20"

Revision as of 08:53, 30 October 2020

connect

mongo

run command(list cluster information)

mongo --ssl --host mongo.inter.net --quiet -u admin -p P@ssW0rd --authenticationDatabase admin --eval 'rs.status();'

list databases

show dbs

mongodump

mongodump -ssl --host "database/mongo.inter.net" -u username -p P@ssw0rd --authenticationDatabase admin --db "database" -out=/tmp/database_2020-10-20"