mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Script to (atleast on OS X) pull the newest mongo dump and import it, maintaining users.
This commit is contained in:
parent
5f56053d8f
commit
96654bd08f
1 changed files with 8 additions and 0 deletions
8
bin/coco-pull-test-db
Executable file
8
bin/coco-pull-test-db
Executable file
|
@ -0,0 +1,8 @@
|
|||
DIR=`mktemp -dt coco`
|
||||
curl http://analytics.codecombat.com:8080/dump.tar.gz | tar -xC $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
|
Loading…
Reference in a new issue