Skip to content

Instantly share code, notes, and snippets.

@rammanokar
Last active February 21, 2020 04:26
Show Gist options
  • Save rammanokar/62887e203c772f96e50319c1cac6a3b0 to your computer and use it in GitHub Desktop.
Save rammanokar/62887e203c772f96e50319c1cac6a3b0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
#usage:
# rsync_folder_with_retry_sleep.sh /usr/hdp /data/usr/
#/usr/hdp folder will be synced to /data/usr/hdp
src=$1
dest=$2
RC=1
while [[ $RC -ne 0 ]]
do
rsync -avzh $src $dest
RC=$?
sleep 120
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment