mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 19:55:24 +02:00
mongorestore: add page (#1037)
This commit is contained in:
parent
13fea84d7e
commit
01759dcb9e
1 changed files with 19 additions and 0 deletions
19
pages/common/mongorestore.md
Normal file
19
pages/common/mongorestore.md
Normal file
|
@ -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`
|
Loading…
Add table
Reference in a new issue