From 83ccde118372f5f74b1efd4a0f96ea0eb8678e84 Mon Sep 17 00:00:00 2001 From: matthias Date: Wed, 5 Jun 2024 11:48:45 +0200 Subject: [PATCH 1/3] pgbackrest s3-init fix --- .gitignore | 6 +++++- scripts/postgres/init_pgbackrest.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9839ee2..fa93bd9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,8 @@ launcher/ferretdb #Exporter_v2 docker/exporter_v2 -launcher/exporter_v2 \ No newline at end of file +launcher/exporter_v2 + +# logical backup +docker/logical_backup/ +scripts/logical_backup/ \ No newline at end of file diff --git a/scripts/postgres/init_pgbackrest.sh b/scripts/postgres/init_pgbackrest.sh index 5aa2b68..b818eb8 100755 --- a/scripts/postgres/init_pgbackrest.sh +++ b/scripts/postgres/init_pgbackrest.sh @@ -19,7 +19,7 @@ else # Create Stanza and run Init-Backup stanza=$(pgbackrest info --output=json) if [ "$stanza" == "[]" ]; then - pgbackrest stanza-create --stanza=db1 + pgbackrest stanza-create --stanza=db pgbackrest backup --type=full --stanza=db --repo=1 echo "Finished: pgBackRest is ready for use" else From 2ef0c019473893a540fdca30e44f8d7847ab45c3 Mon Sep 17 00:00:00 2001 From: matthias Date: Thu, 6 Jun 2024 10:36:12 +0200 Subject: [PATCH 2/3] fixing ca-certificate errors in pgbackrest-image --- docker/pgbackrest/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/pgbackrest/Dockerfile b/docker/pgbackrest/Dockerfile index b9febdf..06be7b0 100644 --- a/docker/pgbackrest/Dockerfile +++ b/docker/pgbackrest/Dockerfile @@ -82,6 +82,13 @@ COPY --from=builder /usr/lib64 /usr/lib64 # CA COPY --from=builder /usr/bin/ca-legacy /usr/bin/ca-legacy COPY --from=builder /usr/bin/update-ca-trust /usr/bin/update-ca-trust +# grep +COPY --from=builder /etc/profile.d /etc/profile.d +COPY --from=builder /usr/bin/grep /usr/bin/grep +COPY --from=builder /usr/libexec /usr/libexec +# COPY --from=builder /usr/bin/update-ca-trust /usr/bin/update-ca-trust +# COPY --from=builder /usr/bin/update-ca-trust /usr/bin/update-ca-trust + # p11-kit COPY --from=builder /etc/pkcs11 /etc/pkcs11 COPY --from=builder /usr/libexec/p11-kit /usr/libexec/p11-kit @@ -95,6 +102,7 @@ COPY --from=builder /usr/share/pki /usr/share/pki COPY --from=builder /etc/ssl /etc/ssl COPY --from=builder /etc/pkcs11 /etc/pkcs11 + # libraries COPY --from=builder /usr/bin/nss_wrapper.pl /usr/bin/nss_wrapper.pl # COPY --from=builder /usr/lib64/libnss_wrapper.so /usr/lib64/libnss_wrapper.so From ba2c4ae0f00312379f55d6ab8c876e016d237e8c Mon Sep 17 00:00:00 2001 From: Ants Aasma Date: Thu, 6 Jun 2024 14:12:08 +0300 Subject: [PATCH 3/3] Add missing /usr/bin/trust file --- docker/pgbackrest/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/pgbackrest/Dockerfile b/docker/pgbackrest/Dockerfile index 06be7b0..3160f35 100644 --- a/docker/pgbackrest/Dockerfile +++ b/docker/pgbackrest/Dockerfile @@ -102,6 +102,8 @@ COPY --from=builder /usr/share/pki /usr/share/pki COPY --from=builder /etc/ssl /etc/ssl COPY --from=builder /etc/pkcs11 /etc/pkcs11 +# p11-kit-trust +COPY --from=builder /usr/bin/trust /usr/bin/ # libraries COPY --from=builder /usr/bin/nss_wrapper.pl /usr/bin/nss_wrapper.pl @@ -109,6 +111,8 @@ COPY --from=builder /usr/bin/nss_wrapper.pl /usr/bin/nss_wrapper.pl COPY --from=builder /usr/share/man/man1 /usr/share/man/man1 COPY --from=builder /usr/bin/envsubst /usr/bin/envsubst +RUN /usr/bin/update-ca-trust extract + # add postgres user and group #RUN groupadd postgres -g 26 && useradd postgres -u 26 -g 26