mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-07 11:32:16 +00:00
added more examples for import and export of wind data
This commit is contained in:
1 parent
d895151c26
commit
435c12b2f7
1 file changed
+11
-1
@@ -1,6 +1,10 @@
|
||||
Cloning wind data from one MongoDB instance to another
|
||||
------------------------------------------------------
|
||||
|
||||
10200: MongoDB "dev" instance
|
||||
10201: MongoDB "test" instance
|
||||
10202: MontoDB "prod" instance
|
||||
|
||||
connect to the mongo shell:
|
||||
e.g. /opt/mongodb/bin/mongo --port 10202
|
||||
|
||||
@@ -17,7 +21,13 @@ First, export the WIND_TRACKS collection from one database. For example...
|
||||
or with an additional query parameter if only want to export the wind of a specific race
|
||||
|
||||
/opt/mongodb/bin/mongoexport --port 10202 -d winddb -c WIND_TRACKS -q "{ 'EVENT_NAME': /Arenal Training Camps Regatta 2012/, 'RACE_NAME': /Laser/}" > /tmp/wind-tracks-dev.json
|
||||
|
||||
|
||||
|
||||
Example for export wind from prod and import it to test
|
||||
/opt/mongodb/bin/mongoexport --port 10202 -d winddb -c WIND_TRACKS -q "{ EVENT_NAME: 'Kieler Woche 2012 (LASER)'}" > /tmp/wind-tracks-dev.json
|
||||
/opt/mongodb/bin/mongoimport --port 10201 -d winddb -c WIND_TRACKS /tmp/wind-tracks-dev.json
|
||||
|
||||
|
||||
|
||||
To import the resulting JSON file into the DB instance call:
|
||||
/opt/mongodb/bin/mongoimport --port 10201 -d winddb -c WIND_TRACKS /tmp/wind-tracks-dev.json
|
||||
|
||||
Reference in new issue
Block a user