File tree Expand file tree Collapse file tree 4 files changed +24
-14
lines changed Expand file tree Collapse file tree 4 files changed +24
-14
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ RUN ${PACKAGER} -y install --nodocs \
2525 less \
2626 openssl \
2727 vim \
28+ glibc-langpack-en \
2829 && ${PACKAGER} -y clean all ;
2930
3031# Add PostgreSQL-Repo to Base
Original file line number Diff line number Diff line change 6262
6363# For Usage of pgBackrest
6464if [ " $USE_PGBACKREST " = " true" ]; then
65- CMD=" /scripts/patroni_wait.sh -t 3600 -- /scripts/pgbackrest_backup .sh"
65+ CMD=" /scripts/patroni_wait.sh -t 3600 -- /scripts/postgres/init_pgbackrest .sh"
6666 if [ " $( id -u) " = " 0" ]; then
6767 su postgres -c " PATH=$PATH $CMD " &
6868 else
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Check Structure
3+ echo " Initialise pgBackRest ... "
4+ if [ -d " /home/postgres/pgdata/pgbackrest/log" ]; then
5+ echo " Skip: Folder structure already exists ... "
6+ else
7+ mkdir -p /home/postgres/pgdata/pgbackrest/log
8+ echo " Created: Folder structure was created"
9+ fi
10+ # Create Stanza and run Init-Backup
11+ stanza=$( pgbackrest info --output=json)
12+ if [ " $stanza " == " []" ]; then
13+ pgbackrest stanza-create --stanza=db
14+ pgbackrest backup --type=full --stanza=db --repo=1
15+ echo " Finished: pgBackRest is ready for use"
16+ else
17+ backupCount=$( pgbackrest info --output=json | jq ' .[0].backup' | jq length)
18+ if [ " $backupCount " == " 0" ]; then
19+ pgbackrest backup --type=full --stanza=db --repo=1
20+ echo " Finished: pgBackRest is ready for use"
21+ fi
22+ fi
You can’t perform that action at this time.
0 commit comments