use --sparse flag for rsync
This commit is contained in:
parent
f25103d216
commit
34588bc299
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue