Retry rsync a couple times before failing

This commit is contained in:
Michael Vines
2018-09-08 11:10:26 -07:00
parent 9f5c86e60c
commit 1d6c4aacae
3 changed files with 17 additions and 5 deletions

12
net/scripts/rsync-retry.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
#
# rsync wrapper that retries a few times on failure
#
for i in $(seq 1 5); do
(
set -x
rsync "$@"
) && exit 0
echo Retry "$i"...
done