codecombat/bin/coco-pull-test-db
2015-10-26 15:46:07 -04:00

8 lines
300 B
Text
Executable file

DIR=`mktemp -dt cocoXXXXXXXXXX`
curl http://analytics.codecombat.com:8080/dump.tar.gz | tar -xzC $DIR
mongoexport --db coco --collection users --out $DIR/users.json
mongorestore --drop --batchSize 100 $DIR/dump
mongoimport --db coco --upsert -c users $DIR/users.json
cat $DIR/users.json
rm -r $DIR