88set -e -o pipefail
99exec 1>&2 # Redirect any output to the journal (stderr)
1010
11- mkdir -vp restore
12- cat - > restore/zitadel_restore.sh << 'EOS '
13- # Read dump file from standard input:
14- pg_restore --no-owner --no-privileges -U postgres -d zitadel
15- ec=$?
16- docker_temp_server_stop
17- exit $ec
18- EOS
11+ # mkdir -vp restore
12+ # cat - >restore/zitadel_restore.sh <<'EOS'
13+ # # Read dump file from standard input:
14+ # pg_restore -U postgres -d zitadel
15+ # ec=$?
16+ # docker_temp_server_stop
17+ # exit $ec
18+ # EOS
1919
2020# Override the image /docker-entrypoint-initdb.d contents, to restore the
2121# DB dump file. The container will be stopped at the end
2222
23- podman run \
24- --rm \
25- --interactive \
26- --network=none \
27- --volume=./restore:/docker-entrypoint-initdb.d/:Z \
28- --volume=postgres-data:/var/lib/postgresql/data:Z \
29- --replace --name=restore_db \
30- --env-file=database.env \
31- --env TZ=UTC \
32- " ${POSTGRES_IMAGE} " < zitadel.pg_dump
33-
34- # If the restore is successful, clean up:
35- rm -rfv restore/ zitadel.pg_dump
23+ # podman run \
24+ # --rm \
25+ # --interactive \
26+ # --network=none \
27+ # --volume=./restore:/docker-entrypoint-initdb.d/:Z \
28+ # --volume=postgres-data:/var/lib/postgresql/data:Z \
29+ # --replace --name=restore_db \
30+ # --env-file=database.env \
31+ # --env TZ=UTC \
32+ # "${POSTGRES_IMAGE}" <zitadel.pg_dump
33+ #
34+ # # If the restore is successful, clean up:
35+ # rm -rfv restore/ zitadel.pg_dump
0 commit comments