From 7864d26aa5388bbd8a9f964eea10e4c25be69ea2 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 29 Dec 2020 11:11:08 +0100 Subject: [PATCH] Removed vv because of rsync stuck --- docker-volume-backup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-volume-backup.sh b/docker-volume-backup.sh index cb7c1cc..e5e3551 100644 --- a/docker-volume-backup.sh +++ b/docker-volume-backup.sh @@ -1,4 +1,6 @@ #!/bin/bash +# If rsync stucks consider: +# @see https://stackoverflow.com/questions/20773118/rsync-suddenly-hanging-indefinitely-during-transfers backup_time="$(date '+%Y%m%d%H%M%S')"; backups_folder="/Backups/"; for docker_container_name in $(docker ps --format '{{.Names}}'); @@ -21,7 +23,7 @@ do mkdir -vp "$backup_dir_path"; fi docker run --rm --volumes-from "$docker_container_name" -v "$backups_folder:$backups_folder" "kevinveenbirkenbach/alpine-rsync" sh -c " - rsync -abvv --delete --delete-excluded --log-file=$log_path --backup-dir=$backup_dir_path '$source_path/' $destination_path"; + rsync -abP --delete --delete-excluded --log-file=$log_path --backup-dir=$backup_dir_path '$source_path/' $destination_path"; done echo "start container: $docker_container_name" && docker start "$docker_container_name"; done