Skip to content

Instantly share code, notes, and snippets.

@christophervigliotti
Created September 7, 2025 02:57
Show Gist options
  • Select an option

  • Save christophervigliotti/33c81bba6a72c93800dda3a842d78588 to your computer and use it in GitHub Desktop.

Select an option

Save christophervigliotti/33c81bba6a72c93800dda3a842d78588 to your computer and use it in GitHub Desktop.
#!/bin/bash
while true
do
# --partial
if rsync -av --delete-after --progress --bwlimit=500 "/source/directory/path/" "/destination/directory/path"; then # SC2181
echo "~ * ~ * ~ * ~ Job's done! rsync is where a pirate washes their dishes"
exit
else
echo "~ * ~ * ~ * ~ Shiver Me Timbers, rsync has walked the plank! will retry in 180 seconds"
sleep 180
fi
done
# cron timecode thingie: 0 */6 * * *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment