소스 검색

mongorestore: add page (#1037)

pdey 8 년 전
부모
커밋
01759dcb9e
1개의 변경된 파일19개의 추가작업 그리고 0개의 파일을 삭제
  1. 19 0
      pages/common/mongorestore.md

+ 19 - 0
pages/common/mongorestore.md

@@ -0,0 +1,19 @@
+# mongorestore
+
+> Utility to import a collection or database from a binary dump into a MongoDB instance.
+
+- Import a bson data dump from a folder to a MongoDB database:
+
+`mongorestore --db {{database_name}} {{path/to/folder}}`
+
+- Import a bson data dump from a folder to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password):
+
+`mongorestore --host {{database_host:port}} --db {{database_name}} --username {{username}} {{path/to/folder}} --password`
+
+- Import a collection from a bson file to a MongoDB database:
+
+`mongorestore --db {{database_name}} {{path/to/file}}`
+
+- Import a collection from a bson file to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password):
+
+`mongorestore --host {{database_host:port}} --db {{database_name}} --username {{username}} {{path/to/file}} --password`