From b3867dc1cd802ad59e2919293a83aeefaf4d40f8 Mon Sep 17 00:00:00 2001 From: friedrich goerz Date: Wed, 3 May 2023 22:08:27 +0200 Subject: [PATCH 1/2] DEV-1029: added debugging stuff to hopefully get more insights - bugfix3 --- templates/cm_pg_backup_scripts.yaml | 12 +++++------- templates/cm_postgres_bkp.yaml | 2 +- values_nsodev.yaml | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/templates/cm_pg_backup_scripts.yaml b/templates/cm_pg_backup_scripts.yaml index 32d3382..7bfe3a9 100644 --- a/templates/cm_pg_backup_scripts.yaml +++ b/templates/cm_pg_backup_scripts.yaml @@ -1,15 +1,13 @@ apiVersion: v1 data: - nsodevops_postgres_backup_wrapper.sh: | - #!/bin/bash - - - - envdir "/run/etc/wal-e.d/env" bash -x /nsoscripts/postgres_backup.sh "/home/postgres/pgdata/pgroot/data" >> /tmp/backup_cron_`date +%F`.log postgres_backup.sh: | #!/bin/bash - # fgoerz + DEBUG_LOG="/tmp/pg_backup_`date +%F`.log" + echo "Plz check $DEBUG_LOG for debugging purpose. EVERY output will be redirected!" + # fgoerz DEV-1029 + # pipe all output to file for debugging purpose + exec 2>&1 1>$DEBUG_LOG function log { diff --git a/templates/cm_postgres_bkp.yaml b/templates/cm_postgres_bkp.yaml index fb33881..ae2d9b6 100644 --- a/templates/cm_postgres_bkp.yaml +++ b/templates/cm_postgres_bkp.yaml @@ -10,7 +10,7 @@ data: AWS_REGION: "" AWS_S3_FORCE_PATH_STYLE: "true" # needed for MinIO BACKUP_NUM_TO_RETAIN: "7" -# BACKUP_SCHEDULE: "00 2 * * *" + BACKUP_SCHEDULE: "00 2 * * *" CLONE_USE_WALG_RESTORE: "true" USE_WALG_BACKUP: "true" USE_WALG_RESTORE: "true" diff --git a/values_nsodev.yaml b/values_nsodev.yaml index f268417..72af017 100644 --- a/values_nsodev.yaml +++ b/values_nsodev.yaml @@ -82,7 +82,8 @@ smardigo-connect: - postgres - name: pg-backup-script - mountPath: /nsoscripts + mountPath: /scripts/postgres_backup.sh + subPath: postgres_backup.sh volumeSource: configMap: name: pg-backup-script From 5ad77f83d55711b676e5c9bb4a1100260004220e Mon Sep 17 00:00:00 2001 From: friedrich goerz Date: Wed, 3 May 2023 22:09:15 +0200 Subject: [PATCH 2/2] DEV-1029: added debugging stuff to hopefully get more insights - bugfix3 --- templates/cm_postgres_bkp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/cm_postgres_bkp.yaml b/templates/cm_postgres_bkp.yaml index ae2d9b6..d59b35d 100644 --- a/templates/cm_postgres_bkp.yaml +++ b/templates/cm_postgres_bkp.yaml @@ -18,4 +18,4 @@ data: WAL_S3_BUCKET: postgres WAL_BUCKET_SCOPE_PREFIX: "" WAL_BUCKET_SCOPE_SUFFIX: "" - CRONTAB: "['* * * * * /nso_scripts/backup-monitoring.sh','00 2 * * * /nsoscripts/nsodevops_postgres_backup_wrapper.sh']" + CRONTAB: "['* * * * * /nso_scripts/backup-monitoring.sh']"