Last active
May 19, 2023 02:55
-
-
Save pzelasko/76eaa20f8108722b13d654b665a5ac63 to your computer and use it in GitHub Desktop.
Parallel rsync for downloading a directory from remote server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
host="$1" | |
source_dir="$2" | |
target_dir="$3" | |
ssh "$host" ls "$source_dir" | parallel -j8 -v --sshdelay 0.2 rsync -raz --progress "$host":"$source_dir"/{} "$target_dir"/{} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment