From b361e190a6cc6fc01b9609bf54ddf6f83f084f3e Mon Sep 17 00:00:00 2001 From: friedrich goerz Date: Wed, 3 May 2023 22:08:27 +0200 Subject: [PATCH] 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