We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c93188d commit 4436bc5Copy full SHA for 4436bc5
postgres/scripts/v1_to_v2/copy_to_csv.sh
@@ -4,12 +4,13 @@
4
USER=mapswipe-workers
5
NAME=mapswipe
6
[email protected]
7
+PGPASSWORD=yourpass
8
9
# Create a ssh tunnel in the background and save PID
10
ssh -Cfo ExitOnForwardFailure=yes -NL 1111:localhost:5432 ${SSH_REMOTE_HOST}
11
PID=$(pgrep -f 'NL 1111:')
12
-psql -p 1111 -h localhost -U ${USER} -d ${NAME} -a -f copy_to_csv.sql
13
-psql -p 1111 -h localhost -U ${USER} -d ${NAME} -a -f copy_results_to_csv.sql
+PGPASSWORD=$PGPASSWORD psql -p 1111 -h localhost -U ${USER} -d ${NAME} -a -f copy_to_csv.sql
14
+PGPASSWORD=$PGPASSWORD psql -p 1111 -h localhost -U ${USER} -d ${NAME} -a -f copy_results_to_csv.sql
15
16
kill ${PID}
0 commit comments