From cafd49f216097ace9cab35d1784d73fc3f7f3e5b Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Mon, 12 Oct 2020 13:36:03 +0200 Subject: [PATCH] Implemented log --- scripts/backup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/backup.sh b/scripts/backup.sh index 4b6b3bf..d8a4e54 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -11,6 +11,7 @@ do do application_path="$docker_backups_mount$(cat /etc/machine-id)/docker/$docker_container_name/"; destination_path="$application_path""latest""$source_path"; + log_path="$application_path""log.txt"; backup_dir_path="$application_path""diffs/$backup_time$source_path"; if [ -d "$native_backups_mount_prefix$destination_path" ] then @@ -21,7 +22,7 @@ do mkdir -vp "$native_backups_mount_prefix$backup_dir_path"; fi docker run --rm --volumes-from "$docker_container_name" -v "$native_backups_mount:$docker_backups_mount" "kevinveenbirkenbach/alpine-rsync" sh -c " - rsync -ab --delete --delete-excluded --backup-dir=\"$(dirname "$backup_dir_path")\" $source_path $destination_path"; + rsync -abvv --delete --delete-excluded --log-file=$log_path --backup-dir=$(dirname "$backup_dir_path") $source_path $destination_path"; done echo "start container: $docker_container_name" && docker start "$docker_container_name" done