-
Notifications
You must be signed in to change notification settings - Fork 0
/
DATATRANSFER
23 lines (17 loc) · 995 Bytes
/
DATATRANSFER
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Data transfer instructions:
#Connect to EC2, requires the proper key (new.pem)
#which you'll need to use (chmod 400 new.pem) on
ssh -i new.pem ec2-user@ec2-184-72-146-181.compute-1.amazonaws.com
#select the different sessions currently going on
screen -r
#export data to json
mongo/bin/mongoexport --db reddit --collection pics --out pics.json
mongo/bin/mongoexport --db reddit --collection fitness --out fitness.json
#getting the data into your computer (run on local terminal)
scp -i new.pem ec2-user@ec2-184-72-146-181.compute-1.amazonaws.com:pics.json ../Dropbox/SYDE\ 461\ \&\ 462//data/pics.json
scp -i new.pem ec2-user@ec2-184-72-146-181.compute-1.amazonaws.com:fitness.json ../Dropbox/SYDE\ 461\ \&\ 462//data/fitness.json
#run local mongod instance
mongo/bin/mongod --dbpath data/db
#putting into your local mongod instance
../../../mongo/bin/mongoimport --db reddit --collection travel travel.json
../../../mongo/bin/mongoimport --db reddit --collection fitness fitness.json