Skip to content

Commit

Permalink
[BACKPORT 2.18.4][PLAT-11216] Backup script failing on CentOS 7
Browse files Browse the repository at this point in the history
Summary:
Original commit: 29eb6b1 / 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
  • Loading branch information
mchiddy committed Nov 6, 2023
1 parent 77c3f32 commit 3c18093
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions managed/devops/bin/yb_platform_backup.sh
Expand Up @@ -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
Expand Down

0 comments on commit 3c18093

Please sign in to comment.