From 3c18093e82afbfe496930e883ca88d5ecd8cd32f Mon Sep 17 00:00:00 2001 From: Muthu Chidambaram Date: Fri, 3 Nov 2023 15:10:04 -0500 Subject: [PATCH] [BACKPORT 2.18.4][PLAT-11216] Backup script failing on CentOS 7 Summary: Original commit: 29eb6b1fc77bdb3e0b6882c73d3cd92d8c08f8b9 / D29944 Restore was failing on prometheus directories because centos was taking single quotes as a literal. This diff removes the quotes so it treats prom_snapshot as a variable. This was a regression from https://phorge.dev.yugabyte.com/D29466 which is in 2.18.4 and 2.20.0 Test Plan: Backup restore on ubuntu and centos 7 wih change, ensure prometheus dir are moved properly. Reviewers: dshubin, sanketh Reviewed By: dshubin Subscribers: yugaware Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D29969 --- managed/devops/bin/yb_platform_backup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/managed/devops/bin/yb_platform_backup.sh b/managed/devops/bin/yb_platform_backup.sh index 9fe0ef77c84c..9aff45eea45f 100755 --- a/managed/devops/bin/yb_platform_backup.sh +++ b/managed/devops/bin/yb_platform_backup.sh @@ -635,8 +635,7 @@ restore_backup() { modify_service prometheus stop # Find snapshot directory in backup run_sudo_cmd "rm -rf ${PROMETHEUS_DATA_DIR}/*" - # snapshot_dir="${destination}/'${prom_snapshot:2}'*" - run_sudo_cmd "mv ${destination}/'${prom_snapshot:2}'* ${PROMETHEUS_DATA_DIR}" + run_sudo_cmd "mv ${destination}/${prom_snapshot:2}* ${PROMETHEUS_DATA_DIR}" if [[ "${yba_installer}" = true ]] && [[ "${migration}" = true ]]; then backup_targets=$(find "${yugabackup}" -name swamper_targets -type d) if [[ "$backup_targets" != "" ]] && [[ -d "$backup_targets" ]]; then