Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- db=product_db
- user=user1
- password=password1
- for bson_file in `ls *.bson`
- do
- echo "importing $bson_file"
- collection=$(basename $(pwd))
- bson_path="$(pwd)/$bson_file"
- mongorestore -u $user -p $password -d $db -c $collection $bson_path
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement