Skip to content

Instantly share code, notes, and snippets.

View mvdoc's full-sized avatar
😵‍💫

Matteo Visconti di Oleggio Castello mvdoc

😵‍💫
View GitHub Profile
#!/bin/bash
### ABOUT: See: http://gist.github.com/366269
### Runs rsync, retrying on errors up to a maximum number of tries.
### On failure script waits for internect connection to come back up by pinging google.com before continuing.
###
### Usage: $ ./rsync-retry.sh source destination
### Example: $ ./rsync-retry.sh user@server.example.com:~/* ~/destination/path/
###
### INPORTANT: