Skip to content

Instantly share code, notes, and snippets.

@nathanpc
Created September 30, 2023 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanpc/3287edbc377bbaca45bf63afcc1aa8d2 to your computer and use it in GitHub Desktop.
Save nathanpc/3287edbc377bbaca45bf63afcc1aa8d2 to your computer and use it in GitHub Desktop.
Transfer a large collection of files between two hosts

Rsync Wrapper

If you wish to transfer a large number of big files between two hosts and have had issues with rsync stability in the past. Then just call it with these arguments and also wrapped in a nice retry loop:

RC=1; while [[ $RC -ne 0 ]]; do rsync -avP --progress local/ remote.server:/somewhere; RC=$?; sleep 1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment