export.sh 727 B

123456789101112131415
  1. #!/bin/bash
  2. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  3. cd $SCRIPT_PATH
  4. docker exec -t mongo mongoexport -d orion -c videoEvents -o videoEvents.json --jsonArray
  5. docker exec -t mongo mongoexport -d orion -c featuredContent -o featuredContent.json
  6. docker exec -t mongo mongoexport -d orion -c reportedVideos -o reportedVideos.json --jsonArray
  7. docker exec -t mongo mongoexport -d orion -c reportedChannels -o reportedChannels.json --jsonArray
  8. mkdir data 2>/dev/null || true
  9. docker cp mongo:videoEvents.json data/videoEvents.json
  10. docker cp mongo:featuredContent.json data/featuredContent.json
  11. docker cp mongo:reportedVideos.json data/reportedVideos.json
  12. docker cp mongo:reportedChannels.json data/reportedChannels.json
  13. echo "OK"