From 0866d70d6ab09f650e2455360fea97c543e88ecd Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Fri, 24 Jan 2025 15:48:16 +0300 Subject: [PATCH] PMM-13662 Fix backup from data container (#3486) --- get-pmm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-pmm.sh b/get-pmm.sh index a0fea34ea8..5c52d21874 100755 --- a/get-pmm.sh +++ b/get-pmm.sh @@ -469,6 +469,7 @@ start_pmm() { pmm_archive="$container_name-$(date "+%F-%H%M%S")" msg "\tExisting PMM Server found, renaming to $pmm_archive\n" run_docker "stop $container_name" || : + volume_name=$(run_docker "inspect -f '{{ range .Mounts }}{{ if and (eq .Type \"volume\") (eq .Destination \"/srv\" )}}{{ .Name }}{{ \"\n\" }}{{ end }}{{ end }}' $container_name") if [[ "$backup_data" == 1 ]]; then backup_pmm_data fi @@ -479,7 +480,6 @@ start_pmm() { docker_env_flags=$(migrate_env_vars "$docker_env_flags") migrate_pmm_data fi - volume_name=$(run_docker "inspect -f '{{ range .Mounts }}{{ if and (eq .Type \"volume\") (eq .Destination \"/srv\" )}}{{ .Name }}{{ \"\n\" }}{{ end }}{{ end }}' $container_name") run_docker "rename $container_name $pmm_archive\n" fi