From fc09e21519110fdf58b4db70eae76ef9c6848b80 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Mon, 12 Oct 2020 12:25:57 +0200 Subject: [PATCH] Implemented cloning --- scripts/backup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/backup.sh b/scripts/backup.sh index f9b0e49..55fc9b6 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -29,6 +29,11 @@ do rsync -ab --delete --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")"; + if [ "$destination_path" == "$first_destination_path" ] + then + echo "Cloning first to latest..." + rsync -a "$native_backups_mount_prefix$first_destination_path" "$native_backups_mount_prefix$latest_destination_path" + fi done echo "start container: $docker_container_name" && docker start "$docker_container_name" done