Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. ```bash
  2. mongodump \
  3. --host mongo_host \
  4. --username username \
  5. --password password\
  6. --authenticationDatabase auth_db_name \
  7. --db db_name \
  8. --out dump_path
  9. ```
  10.  
  11. ```bash
  12. mongodump \
  13. --host mongo_host \
  14. --username username \
  15. --password password\
  16. --authenticationDatabase auth_db_name \
  17. --db db_name \
  18. --collection collection_to_dump\
  19. --out dump_path
  20. ```
  21.  
  22. ```bash
  23. mongorestore \
  24. --host mongo_host \
  25. --username username \
  26. --password password \
  27. --authenticationDatabase auth_db_name \
  28. --db db_name \
  29. dump_path/db_to_restore
  30. ```
  31.  
  32. ```bash
  33. mongorestore \
  34. --host mongo_host \
  35. --username username \
  36. --password password \
  37. --authenticationDatabase auth-db-name \
  38. --db db_name \
  39. --collection collection_name \
  40. dump_path/db_name/collection_name.bson
  41. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement