Removed vv because of rsync stuck

This commit is contained in:
Kevin Veen-Birkenbach 2020-12-29 11:11:08 +01:00
parent 48fab870ce
commit 7864d26aa5

View File

@ -1,4 +1,6 @@
#!/bin/bash #!/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')"; backup_time="$(date '+%Y%m%d%H%M%S')";
backups_folder="/Backups/"; backups_folder="/Backups/";
for docker_container_name in $(docker ps --format '{{.Names}}'); for docker_container_name in $(docker ps --format '{{.Names}}');
@ -21,7 +23,7 @@ do
mkdir -vp "$backup_dir_path"; mkdir -vp "$backup_dir_path";
fi fi
docker run --rm --volumes-from "$docker_container_name" -v "$backups_folder:$backups_folder" "kevinveenbirkenbach/alpine-rsync" sh -c " 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 done
echo "start container: $docker_container_name" && docker start "$docker_container_name"; echo "start container: $docker_container_name" && docker start "$docker_container_name";
done done