optimized

This commit is contained in:
Kevin Veen-Birkenbach 2020-10-12 13:01:26 +02:00
parent a05bf52e54
commit 4105c9b3b8

View File

@ -26,7 +26,7 @@ do
mkdir -vp "$native_backups_mount_prefix$backup_dir_path"; mkdir -vp "$native_backups_mount_prefix$backup_dir_path";
fi fi
docker run --rm --volumes-from "$docker_container_name" -v "$native_backups_mount:$docker_backups_mount" "kevinveenbirkenbach/alpine-rsync" sh -c " 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=\"$($backup_dir_path)\" $source_path $destination_path"; rsync -ab --delete --delete-excluded --backup-dir=\"$(dirname $backup_dir_path)\" $source_path $destination_path";
if [ "$destination_path" == "$first_destination_path" ] if [ "$destination_path" == "$first_destination_path" ]
then then
echo "Cloning first to latest..." echo "Cloning first to latest..."