Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. db=product_db
  4. user=user1
  5. password=password1
  6.  
  7. for bson_file in `ls *.bson`
  8. do
  9. echo "importing $bson_file"
  10. collection=$(basename $(pwd))
  11. bson_path="$(pwd)/$bson_file"
  12. mongorestore -u $user -p $password -d $db -c $collection $bson_path
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement