Skip to content

Commit 71bf788

Browse files
Setting the right Postgres environment vars for wal-g
1 parent c2a722e commit 71bf788

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

postgres/wal-g/archive_command.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/bash
22

3+
export PGDATABSE=$POSTGRES_DB
4+
export PGUSER=$POSTGRES_USER
5+
export PGPASSWORD=$POSTGRES_PASSWORD
6+
37
wal-g wal-push $1

postgres/wal-g/make_basebackup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/bash
22

3+
export PGDATABSE=$POSTGRES_DB
4+
export PGUSER=$POSTGRES_USER
5+
export PGPASSWORD=$POSTGRES_PASSWORD
6+
37
wal-g backup-push /var/lib/postgresql/data

postgres/wal-g/restore_command.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/bash
22

3+
export PGDATABSE=$POSTGRES_DB
4+
export PGUSER=$POSTGRES_USER
5+
export PGPASSWORD=$POSTGRES_PASSWORD
6+
37
wal-g wal-fetch $1 $2

0 commit comments

Comments
 (0)