From 0f6acc783468eb2675e3d728332af6879f15ea9f Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Mon, 12 Oct 2020 12:42:35 +0200 Subject: [PATCH] Added --delete-excluded --- scripts/backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/backup.sh b/scripts/backup.sh index 8b2a584..78cd802 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -28,9 +28,9 @@ do docker run --rm --volumes-from "$docker_container_name" -v "$native_backups_mount:$docker_backups_mount" "kevinveenbirkenbach/alpine-rsync" sh -c " test -d $source_path && mkdir -p \"$destination_path\" && - rsync -ab --delete --backup-dir=\"$backup_dir_path\" $source_path $destination_path || + rsync -ab --delete --delete-excluded --backup-dir=\"$backup_dir_path\" $source_path $destination_path || mkdir -p \"$(dirname "$destination_path")\" && - rsync -ab --delete --backup-dir=\"$(dirname "$backup_dir_path")\" $source_path $(dirname "$destination_path")"; + rsync -ab --delete --delete-excluded --backup-dir=\"$(dirname "$backup_dir_path")\" $source_path $(dirname "$destination_path")"; if [ "$destination_path" == "$first_destination_path" ] then echo "Cloning first to latest..."