From b12635eae657c6a08633f3aa3e8601096d33319c Mon Sep 17 00:00:00 2001 From: kemboi22 Date: Fri, 2 Aug 2024 01:48:06 +0300 Subject: [PATCH] feat: removed restore-database --- .../actions/restore-module/40restore_database | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100755 imageroot/actions/restore-module/40restore_database diff --git a/imageroot/actions/restore-module/40restore_database b/imageroot/actions/restore-module/40restore_database deleted file mode 100755 index bace5b0..0000000 --- a/imageroot/actions/restore-module/40restore_database +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# -# Copyright (C) 2022 Nethesis S.r.l. -# SPDX-License-Identifier: GPL-3.0-or-later -# - -set -e -o pipefail -exec 1>&2 # Redirect any output to the journal (stderr) - -mkdir -vp restore -cat - >restore/chibisafe_restore.sh <<'EOS' -# Read dump file from standard input: -pg_restore --no-owner --no-privileges -U postgres -d chibisafe -ec=$? -docker_temp_server_stop -exit $ec -EOS - -# Override the image /docker-entrypoint-initdb.d contents, to restore the -# DB dump file. The container will be stopped at the end - -podman run \ - --rm \ - --interactive \ - --network=none \ - --volume=./restore:/docker-entrypoint-initdb.d/:Z \ - --volume=postgres-data:/var/lib/postgresql/data:Z \ - --replace --name=restore_db \ - --env-file=database.env \ - --env TZ=UTC \ - "${POSTGRES_IMAGE}" < chibisafe.pg_dump - -# If the restore is successful, clean up: -rm -rfv restore/ chibisafe.pg_dump \ No newline at end of file