Guest User

Untitled

a guest
Dec 19th, 2017
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import os
  2.  
  3. host = ""
  4. username = ""
  5. password = ""
  6. directory_to_export = ""
  7. database = ""
  8.  
  9.  
  10. all_collections = []
  11.  
  12.  
  13. command = "mongoexport --host {} --username {} --password {} --db {} --collection {} --pretty --out {}/{}.json"
  14.  
  15. for c in all_collections:
  16. os.system(command.format(host, username, password, database, c, directory_to_export, c))
Add Comment
Please, Sign In to add comment