forked from Joystream/orion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport.sh
More file actions
executable file
·19 lines (15 loc) · 1.05 KB
/
export.sh
File metadata and controls
executable file
·19 lines (15 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
cd $SCRIPT_PATH
source ../.env
DOCKER_COMPOSE="docker-compose -f ../docker-compose.yml"
echo "Exporting video views..."
$DOCKER_COMPOSE exec orion_db psql -p ${DB_PORT} -U postgres -d ${DB_NAME} -c "\copy processor.video_view_event to '/persisted_data/video_view_event' csv;"
echo "Exporting channel follows..."
$DOCKER_COMPOSE exec orion_db psql -p ${DB_PORT} -U postgres -d ${DB_NAME} -c "\copy processor.channel_follow to '/persisted_data/channel_follow' csv;"
echo "Exporting reports..."
$DOCKER_COMPOSE exec orion_db psql -p ${DB_PORT} -U postgres -d ${DB_NAME} -c "\copy processor.report to '/persisted_data/report' csv;"
echo "Exporting gateway config..."
$DOCKER_COMPOSE exec orion_db psql -p ${DB_PORT} -U postgres -d ${DB_NAME} -c "\copy gateway_config to '/persisted_data/gateway_config' csv;"
echo "Exporting NFT featuring requests..."
$DOCKER_COMPOSE exec orion_db psql -p ${DB_PORT} -U postgres -d ${DB_NAME} -c "\copy processor.nft_featuring_request to '/persisted_data/nft_featuring_request' csv;"