Skip to content

Commit

Permalink
[PLAT-10806] Searching custom path for active software
Browse files Browse the repository at this point in the history
Summary: Issue with replicated to YBA-installer migration where searching for the version failed because we had a custom install root and we had previously hardcoded /opt/yugabyte. This diff uses the argument data_dir (which in the YBA-installer case is the BaseInstall/installRoot) when finding the realpath of the active directory.

Test Plan: Run backup/restore with custom install root.

Reviewers: dshubin, sanketh

Reviewed By: dshubin

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D29227
  • Loading branch information
mchiddy committed Oct 11, 2023
1 parent 43a9a37 commit 0467a72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion managed/devops/bin/yb_platform_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ restore_backup() {

metadata_regex="**/yugaware/conf/${VERSION_METADATA}"
if [[ "${yba_installer}" = true ]]; then
version=$(basename $(realpath /opt/yugabyte/software/active))
version=$(basename $(realpath ${data_dir}/software/active))
metadata_regex="**/${version}/**/yugaware/conf/${VERSION_METADATA}"
fi
current_metadata_path=$(find ${destination} -wholename ${metadata_regex})
Expand Down
2 changes: 2 additions & 0 deletions managed/yba-installer/cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ func RestoreBackupScript(inputPath string, destination string, skipRestart bool,
}
if migration {
args = append(args, "--migration")
// Disable version checking in case of version upgrades during migration.
args = append(args, "--disable_version_check")
}
if useSystemPostgres {
args = append(args, "--use_system_pg")
Expand Down

0 comments on commit 0467a72

Please sign in to comment.