From: Steven Baltakatei Sandoval Date: Tue, 19 Mar 2024 14:12:51 +0000 (+0000) Subject: feat(user/rsync_tranches.sh):Update with manual initial delay X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/5c0e013534dc8c8e7dea47f15eba3371ea103f08 feat(user/rsync_tranches.sh):Update with manual initial delay --- diff --git a/user/rsync_tranches.sh b/user/rsync_tranches.sh index eed19f6..bcae90e 100644 --- a/user/rsync_tranches.sh +++ b/user/rsync_tranches.sh @@ -7,7 +7,7 @@ function rsync_tranches() { # Desc: Runs rsync in parallel across different files size ranges # Example: rsync_tranches -avu --progress --dry-run ./SOURCE/ ./DEST/ # Depends: rsync 3.2.7 - # Version: 0.1.0 + # Version: 0.1.1 local -a rsync_opts=(); local source dest; @@ -43,11 +43,11 @@ function rsync_tranches() { fi; # Tranche 1: 0 to 1MiB-1 - rsync --min-size='0' --max-size='1MiB-1' "${rsync_opts[@]}" "$source" "$dest"; + rsync --min-size='0' --max-size='1MiB-1' "${rsync_opts[@]}" "$source" "$dest" & + sleep 2; # Tranche 2: 1MiB to 2MiB-1 rsync --min-size='1MiB' --max-size='2MiB-1' "${rsync_opts[@]}" "$source" "$dest" & - sleep 1; # Tranche 3: 2MiB to 4MiB-1 rsync --min-size='2MiB' --max-size='4MiB-1' "${rsync_opts[@]}" "$source" "$dest" &