Skip to content

Commit 02b66f9

Browse files
author
matthias_schaub
committed
Provide instruction on how to use the script
1 parent 45a5219 commit 02b66f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

postgres/scripts/backup.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/bin/bash
22

3-
SSH_REMOTE_HOST=username@hostname
3+
# Run this script like this:
4+
# PGPASSWORD=password SSH_REMOTE_HOST=username@hostname bash -c "./backup.sh"
5+
6+
# SSH_REMOTE_HOST=username@hostname
7+
# PGPASSWORD="backupuserpassword"
48
PGUSER="backup"
59
PGDATABASE="mapswipe"
6-
PGPASSWORD="backupuserpassword"
710

811
# Create a ssh tunnel in the background and save PID
912
ssh -Cfo ExitOnForwardFailure=yes -NL 1111:localhost:5432 ${SSH_REMOTE_HOST}

0 commit comments

Comments
 (0)