From 2d53923538bd61e0d15334862ab794280be93d67 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sun, 22 Aug 2021 20:26:47 +0200 Subject: [PATCH] removed reverse_container due to root cause in docker-compose file --- docker-volume-backup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-volume-backup.sh b/docker-volume-backup.sh index 5f3abcc..3270ea9 100644 --- a/docker-volume-backup.sh +++ b/docker-volume-backup.sh @@ -11,7 +11,6 @@ backup_repository_folder="$backups_folder$machine_id/$repository_name/"; for volume_name in $(docker volume ls --format '{{.Name}}'); do echo "start backup routine: $volume_name"; - reverse_containers="$(docker ps --filter volume="$volume_name" --format '{{.Names}}' | tac)"; containers="$(docker ps --filter volume="$volume_name" --format '{{.Names}}')"; containers_array=($containers) container=${containers_array[0]} @@ -41,7 +40,7 @@ do fi docker run --rm --volumes-from "$container" -v "$backups_folder:$backups_folder" "kevinveenbirkenbach/alpine-rsync" sh -c " rsync -abP --delete --delete-excluded --log-file=$log_path --backup-dir=$raw_backup_dir_path '$source_path/' $raw_destination_path"; - echo "start containers:" && docker start $reverse_containers; + echo "start containers:" && docker start $containers; done fi echo "end backup routine: $volume_name";