-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongorestore: add page #1037
mongorestore: add page #1037
Changes from 4 commits
6502ae7
147cf03
1c0b8c6
a093bfd
1a60885
80b10f3
487ec6b
0a6decd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 instance: | ||
|
||
`mongorestore --host {{database_host}} --port {{port}} --db {{database_name}} {{path/to/folder}}` | ||
|
||
- Import a bson data dump from a folder to a mongodb instance with user authentication; user will be prompted for password: | ||
|
||
`mongorestore -h {{database_host:port}} -d {{database_name}} --username {{username}} {{path/to/folder}} --password` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please expand the |
||
|
||
- Import a collection from a bson file to a mongodb instance: | ||
|
||
`mongorestore --host {{database_host}} --port {{port}} --db {{database_name}} {{path/to/file}}` | ||
|
||
- Import a collection from a bson file to a mongodb instance with user authentication; user will be prompted for password: | ||
|
||
`mongorestore -h {{database_host:port}} -d {{database_name}} -u {{username}} {{path/to/file}} -p` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, please expand the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel
--host
and--port
can be dropped here since they are anyways used in the next examples. Lets lay it slowly on the user 😄