Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. USERNAME="..."
  2. PASS="..."
  3. LIMIT="$1"
  4.  
  5. rm -rf export.zip
  6.  
  7. declare -a coll=("credits" "duels" "histories" "inventories" "reservations" "rounds" "shops" "skins" "transactions" "transfers" "users")
  8.  
  9. for i in "${coll[@]}"
  10. do
  11.     echo "Exporting ${i}"
  12.     $(mongoexport --username "$USERNAME" --password "$PASS" --db 500 --collection "$i" --limit "$LIMIT" --out "$i.json")
  13. done
  14. zip -r export.zip *.json
  15. rm -rf *.json
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement