From 5f5c8e17142d1cf9912350adacc02fbd9828bcac Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Sun, 23 Jun 2024 12:05:58 +0200 Subject: [PATCH] backup and restore retry to different envs --- backup/pvc/bin/backup.sh | 12 ++++++------ backup/pvc/bin/restore.sh | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backup/pvc/bin/backup.sh b/backup/pvc/bin/backup.sh index ccd7b50bb..13d2f0963 100644 --- a/backup/pvc/bin/backup.sh +++ b/backup/pvc/bin/backup.sh @@ -6,18 +6,18 @@ source "$(dirname "$0")/utils.sh" [[ ! $# -eq 1 ]] && _log "ERROR" "Usage: $0 BACKUP_NUMBER" && exit 1 [[ -z "${BACKUP_DIR}" ]] && _log "ERROR" "Required 'BACKUP_DIR' env not set" && exit 1 [[ -z "${JENKINS_HOME}" ]] && _log "ERROR" "Required 'JENKINS_HOME' env not set" && exit 1 -RETRY_COUNT=${RETRY_COUNT:-3} -RETRY_INTERVAL=${RETRY_INTERVAL:-60} +BACKUP_RETRY_COUNT=${BACKUP_RETRY_COUNT:-3} +BACKUP_RETRY_INTERVAL=${BACKUP_RETRY_INTERVAL:-60} BACKUP_NUMBER=$1 TRAP_FILE="/tmp/_backup_${BACKUP_NUMBER}_is_running" # --> Check if another backup process is running (operator restart/crash) -for ((i=0; i Check if another restore process is running (operator restart/crash) TRAP_FILE="/tmp/_restore_${BACKUP_NUMBER}_is_running" trap "rm -f ${TRAP_FILE}" SIGINT SIGTERM -for ((i=0; i