-
-
Save mvdoc/1ad1303d533a7267839a to your computer and use it in GitHub Desktop.
Revisions
-
rawsyntax revised this gist
Oct 26, 2011 . 1 changed file with 10 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,14 +14,18 @@ # ----------------------------- rSync Options ------------------------------------------------ OPT="--inplace -vzP" MAX_RETRIES=10 RECURSE="Y" # -------------------- Shouldn't need to change anything bellow # -------------------- ------------------------------- read -p "Enter No. of retries to attempt [default: $MAX_RETRIES]" MAX_RETRIES MAX_RETRIES=${MAX_RETRIES:-10} read -p "Recursive flag ON? (y/n) [default: $RECURSE]" RECURSE RECURSE=${RECURSE:-"Y"} if [[ $RECURSE == "y" || $RECURSE == "Y" ]]; then RFLAG=r fi -
jmar71n revised this gist
May 31, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do echo "Waiting for Internet connection..." false until [ $? -eq 0 ]; do wget -q --tries=10 --timeout=5 http://www.google.com -O /tmp/index.google &> /dev/null done fi echo -
jmar71n revised this gist
May 2, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ OPT="--inplace -vzP" echo -n "Enter No. of retries to attempt... " read MAX_RETRIES echo -n "Recursive flag ON? (y/n) " read YN if [[ $YN == "y" || $YN == "Y" ]]; then RFLAG=r -
jmar71n revised this gist
May 2, 2010 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,11 @@ ### To avoid repeated password requests use public key authentication instead of passwords ### "ssh-keygen" (with no password), then "ssh-copy-id [email protected]" # ----------------------------- rSync Options ------------------------------------------------ OPT="--inplace -vzP" # -------------------- Shouldn't need to change anything bellow ------------------------------- echo -n "Enter No. of retries to attempt... " read MAX_RETRIES @@ -20,7 +25,7 @@ if [[ $YN == "y" || $YN == "Y" ]]; then RFLAG=r fi COM="rsync $OPT$RFLAG -e 'ssh -o \"ServerAliveInterval 10\"' $1 $2" echo echo "Using command: $COM" @@ -66,4 +71,4 @@ fi if [ $? -eq 0 ]; then echo "Finished after $COUNT retries!! Elapsed time: $ELAPSED" fi -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,7 +40,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do echo "Waiting for Internet connection..." false until [ $? -eq 0 ]; do ping -c 1 google.com > /dev/null done fi echo -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,7 +40,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do echo "Waiting for Internet connection..." false until [ $? -eq 0 ]; do ping -q -c 3 google.com > /dev/null done fi echo @@ -66,4 +66,4 @@ fi if [ $? -eq 0 ]; then echo "Finished after $COUNT retries!! Elapsed time: $ELAPSED" fi -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 1 addition and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,15 +37,10 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do COUNT=$(($COUNT+1)) if [ $COUNT -ne 1 ]; then echo echo "Waiting for Internet connection..." false until [ $? -eq 0 ]; do ping -q -c 3 google.com done fi echo -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,7 +56,6 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do rsync -vzP$RFLAG --inplace -e 'ssh -o "ServerAliveInterval 10"' $1 $2 done FINISH=$SECONDS if [[ $(($FINISH - $START)) -gt 3600 ]]; then ELAPSED="$((($FINISH - $START)/3600))hrs, $(((($FINISH - $START)/60)%60))min, $((($FINISH - $START)%60))sec" @@ -66,7 +65,6 @@ else ELAPSED="$(($FINISH - $START))sec" fi if [ $COUNT -eq $MAX_RETRIES -a $? -ne 0 ]; then echo "Hit maximum number of retries($MAX_RETRIES), giving up. Elapsed time: $ELAPSED" fi -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,7 +39,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do echo echo "Testing Internet connection..." false until [ $? -eq 0 ]; do ping -q -c 3 google.com if [ $? -eq 0 ]; then echo "Connected!!" -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,12 +60,10 @@ done FINISH=$SECONDS if [[ $(($FINISH - $START)) -gt 3600 ]]; then ELAPSED="$((($FINISH - $START)/3600))hrs, $(((($FINISH - $START)/60)%60))min, $((($FINISH - $START)%60))sec" elif [[ $(($FINISH - $START)) -gt 60 ]]; then ELAPSED="$(((($FINISH - $START)/60)%60))min, $((($FINISH - $START)%60))sec" else ELAPSED="$(($FINISH - $START))sec" fi -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,8 +51,9 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do echo echo "Attempt No. $COUNT / $MAX_RETRIES" echo ## Havn't got the quoting quite right above to just have $COM here. #$COM rsync -vzP$RFLAG --inplace -e 'ssh -o "ServerAliveInterval 10"' $1 $2 done -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,13 +55,19 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do #$COM done FINISH=$SECONDS if [[ $(($FINISH - $START)) -gt 3600 ]]; then ELAPSED="$((($FINISH - $START)/3600))hrs, $(((($FINISH - $START)/60)%60))min, $((($FINISH - $START)%60))sec" else if [[ $(($FINISH - $START)) -gt 60 ]]; then ELAPSED="$(((($FINISH - $START)/60)%60))min, $((($FINISH - $START)%60))sec" else ELAPSED="$(($FINISH - $START))sec" fi fi if [ $COUNT -eq $MAX_RETRIES -a $? -ne 0 ]; then echo "Hit maximum number of retries($MAX_RETRIES), giving up. Elapsed time: $ELAPSED" fi -
jmar71n revised this gist
Apr 28, 2010 . 1 changed file with 12 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,11 +25,12 @@ COM="rsync -vzP$RFLAG --inplace -e 'ssh -o \"ServerAliveInterval 10\"' $1 $2" echo echo "Using command: $COM" # Trap interrupts and exit instead of continuing the loop trap "echo Ctl+C Detected... Exiting!; exit;" SIGINT SIGTERM COUNT=0 START=$SECONDS # Set the initial exit value to failure false while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do @@ -54,10 +55,17 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do #$COM done FINISH=$SECONDS if [[ $(($FINISH - $START)) -gt 3600 ]]; then ELAPSED="$((($FINISH - $START)/3600))hrs, $(((($FINISH - $START)/60)%60))min" else ELAPSED="$(((($FINISH - $START)/60)%60))min, $((($FINISH - $START)%60))sec" fi if [ $COUNT -eq $MAX_RETRIES -a $? -ne 0 ]; then echo "Hit maximum number of retries($MAX_RETRIES), giving up. Elapsed time: $ELAPSED" fi if [ $? -eq 0 ]; then echo "Finished after $COUNT retries!! Elapsed time: $ELAPSED" fi -
jmar71n revised this gist
Apr 26, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,7 +48,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do done fi echo echo "Attempt No. $COUNT / $MAX_RETRIES" echo rsync -vzP$RFLAG --inplace -e 'ssh -o "ServerAliveInterval 10"' $1 $2 #$COM -
jmar71n revised this gist
Apr 26, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,7 +48,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do done fi echo echo "Attempt No. $COUNT/$MAX_RETRIES" echo rsync -vzP$RFLAG --inplace -e 'ssh -o "ServerAliveInterval 10"' $1 $2 #$COM -
jmar71n revised this gist
Apr 26, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do else echo "Ping failed trying again..." fi done fi echo echo "Attempt No. $COUNT" -
jmar71n revised this gist
Apr 26, 2010 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,10 +35,10 @@ false while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do COUNT=$(($COUNT+1)) if [ $COUNT -ne 1 ]; then echo echo "Testing Internet connection..." false while [ $? -ne 0 ]; do ping -q -c 3 google.com if [ $? -eq 0 ]; then echo "Connected!!" -
jmar71n revised this gist
Apr 26, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ COUNT=0 # Trap interrupts and exit instead of continuing the loop trap "echo Ctl+C Detected... Exiting!; exit;" SIGINT SIGTERM # Set the initial exit value to failure false while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do COUNT=$(($COUNT+1)) -
jmar71n revised this gist
Apr 26, 2010 . 1 changed file with 15 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,11 @@ #!/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 [email protected]:~/* ~/destination/path/ ### ### INPORTANT: ### To avoid repeated password requests use public key authentication instead of passwords @@ -16,11 +17,13 @@ read MAX_RETRIES echo -n "Recursive flag ON? (y/n)? " read YN if [[ $YN == "y" || $YN == "Y" ]]; then RFLAG=r fi COM="rsync -vzP$RFLAG --inplace -e 'ssh -o \"ServerAliveInterval 10\"' $1 $2" echo echo "Using command: $COM" COUNT=0 @@ -29,7 +32,6 @@ trap "echo Ctl+C Detected... Exiting!; exit;" SIGINT SIGTERM # Set the initial return value to failure false while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do COUNT=$(($COUNT+1)) if [ $COUNT -ne 1 ]; then @@ -40,19 +42,22 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do ping -q -c 3 google.com if [ $? -eq 0 ]; then echo "Connected!!" else echo "Ping failed trying again..." fi [ done fi echo echo "Attempt No. $COUNT" echo rsync -vzP$RFLAG --inplace -e 'ssh -o "ServerAliveInterval 10"' $1 $2 #$COM done if [ $COUNT -eq $MAX_RETRIES -a $? -ne 0 ]; then echo "Hit maximum number of retries($MAX_RETRIES), giving up." fi if [ $? -eq 0 ]; then echo "Finished after $COUNT retries!!" fi -
jmar71n revised this gist
Apr 17, 2010 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,8 @@ false while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do COUNT=$(($COUNT+1)) if [ $COUNT -ne 1 ]; then false while [ $? -ne 0 ]; do echo echo "Testing Internet connection..." @@ -41,6 +42,7 @@ while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do echo "Connected!!" fi done fi echo echo "Attempt No. $COUNT" echo -
jmar71n revised this gist
Apr 16, 2010 . 1 changed file with 21 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,11 +16,11 @@ read MAX_RETRIES echo -n "Recursive flag ON? (y/n)? " read YN if [[ $YN == "y" || $YN == "Y" ]]; then RFLAG=-r fi echo echo "Using command: rsync -vzP --inplace $RFLAG -e 'ssh -o "ServerAliveInterval 10"' $1 $2" COUNT=0 @@ -30,28 +30,27 @@ trap "echo Ctl+C Detected... Exiting!; exit;" SIGINT SIGTERM # Set the initial return value to failure false while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ]; do COUNT=$(($COUNT+1)) false while [ $? -ne 0 ]; do echo echo "Testing Internet connection..." ping -q -c 3 google.com if [ $? -eq 0 ]; then echo "Connected!!" fi done echo echo "Attempt No. $COUNT" echo rsync -vzP --inplace $RFLAG -e 'ssh -o "ServerAliveInterval 10"' $1 $2 done if [ $COUNT -eq $MAX_RETRIES ]; then echo "Hit maximum number of retries($MAX_RETRIES), giving up." fi if [ $? -eq 0 ]; then echo "Finished after $COUNT retries!!" fi -
jmar71n revised this gist
Apr 15, 2010 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,9 @@ if [[ $YN == "y" || $YN == "Y" ]]; then RFLAG=-r fi echo echo "Using command: rsync -vzP -e 'ssh -o "ServerAliveInterval 10"' $RFLAG $1 $2" COUNT=0 # Trap interrupts and exit instead of continuing the loop -
jmar71n revised this gist
Apr 15, 2010 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,7 +35,6 @@ do do echo echo "Waiting for internet connection to come up..." ping -c 3 google.com done echo -
jmar71n revised this gist
Apr 15, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,7 +41,7 @@ do echo echo "Attempt No. $COUNT" echo rsync -vzP -e 'ssh -o "ServerAliveInterval 10"' $RFLAG $1 $2 done if [ $COUNT -eq $MAX_RETRIES ] -
jmar71n revised this gist
Apr 15, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,7 +41,7 @@ do echo echo "Attempt No. $COUNT" echo rsync -vzP -e 'ssh -o "ServerAliveInterval 8"' $RFLAG $1 $2 done if [ $COUNT -eq $MAX_RETRIES ] -
jmar71n revised this gist
Apr 15, 2010 . 1 changed file with 13 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,21 +20,28 @@ if [[ $YN == "y" || $YN == "Y" ]]; then fi COUNT=0 # Trap interrupts and exit instead of continuing the loop trap "echo Ctl+C Detected... Exiting!; exit;" SIGINT SIGTERM # Set the initial return value to failure false while [ $? -ne 0 -a $COUNT -lt $MAX_RETRIES ] do COUNT=$(($COUNT+1)) false while [ $? -ne 0 ] do echo echo "Waiting for internet connection to come up..." echo ping -c 3 google.com done echo echo "Attempt No. $COUNT" echo rsync -vzP -e 'ssh -o "ServerAliveInterval 4"' $RFLAG $1 $2 done if [ $COUNT -eq $MAX_RETRIES ] @@ -45,4 +52,4 @@ fi if [ $? -eq 0 ] then echo "Finished after $COUNT retries!!" fi -
jmar71n revised this gist
Apr 15, 2010 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,10 +8,7 @@ ### ### INPORTANT: ### To avoid repeated password requests use public key authentication instead of passwords ### "ssh-keygen" (with no password), then "ssh-copy-id [email protected]" echo -n "Enter No. of retries to attempt... " read MAX_RETRIES @@ -28,6 +25,8 @@ echo echo "Using Command: $COM" echo # Trap interrupts and exit instead of continuing the loop trap "echo Ctl+C Detected... Exiting!; exit;" SIGINT SIGTERM # Set the initial return value to failure false -
jmar71n revised this gist
Apr 15, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ### Runs rsync, retrying on errors up to a maximum number of tries. ### ### Usage: ./rsync-retry.sh source destination ### Example: ./rsync-retry.sh [email protected]:~/* ~/destination/path/ ### ### INPORTANT: ### To avoid repeated password requests use public key authentication instead of passwords -
jmar71n revised this gist
Apr 14, 2010 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,5 +40,10 @@ done if [ $COUNT -eq $MAX_RETRIES ] then echo "Hit maximum number of retries($MAX_RETRIES), giving up." fi if [ $? -eq 0 ] then echo "Finished after $COUNT retries!!" fi -
jmar71n revised this gist
Apr 14, 2010 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,8 @@ ### Example: ./rsync-retry.sh [email protected]:~/* ~/destination/path ### ### INPORTANT: ### To avoid repeated password requests use public key authentication instead of passwords ### "ssh-keygen" (with no password), then "ssh-copy-id [email protected]" # Trap interrupts and exit instead of continuing the loop trap "echo Ctl+C Detected... Exiting!; exit;" SIGINT SIGTERM
NewerOlder