From 34588bc29979775b439e5de0f8f3dc5029ee3747 Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 22 Apr 2024 16:47:01 +0200 Subject: [PATCH] use --sparse flag for rsync --- migrabrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrabrator.py b/migrabrator.py index 8bbaa3b..ed7bdc0 100755 --- a/migrabrator.py +++ b/migrabrator.py @@ -65,7 +65,7 @@ def copy_files_between_servers(source_server, source_dir, destination_server, de subprocess.run(['ssh-copy-id', '-f' ,'-i', public_key_path, destination_server], check=True, capture_output=True) # Run rsync over SSH on the source server to copy files to the destination server - source_rsync_cmd = f'rsync -az --delete --info=progress2 -e "ssh -i {source_key_file} -o StrictHostKeyChecking=accept-new" {source_dir} {destination_server}:{destination_dir}' + source_rsync_cmd = f'rsync -az -S --delete --info=progress2 -e "ssh -i {source_key_file} -o StrictHostKeyChecking=accept-new" {source_dir} {destination_server}:{destination_dir}' print(source_rsync_cmd) run_ssh(source_server, source_rsync_cmd) # Remove the SSH key pair from the source server