From 4fd0e0c29d3f8e58c182f6c5042307bbb15163b2 Mon Sep 17 00:00:00 2001 From: Alex Shumsky Date: Sun, 17 Nov 2024 23:53:51 +0300 Subject: [PATCH] rootfs-to-image: preserve sparse files when moving artefacts to final destination with rsync --- lib/functions/image/rootfs-to-image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/image/rootfs-to-image.sh b/lib/functions/image/rootfs-to-image.sh index 3bc9c7c08bb2..bae3a0b84c2e 100644 --- a/lib/functions/image/rootfs-to-image.sh +++ b/lib/functions/image/rootfs-to-image.sh @@ -215,7 +215,7 @@ function move_images_to_final_destination() { done else display_alert "Moving artefacts using rsync to final destination" "${version}" "info" - run_host_command_logged rsync -av --no-owner --no-group --remove-source-files "${DESTIMG}/${version}"* "${FINALDEST}" + run_host_command_logged rsync -av --sparse --no-owner --no-group --remove-source-files "${DESTIMG}/${version}"* "${FINALDEST}" run_host_command_logged rm -rfv --one-file-system "${DESTIMG}" fi return 0