User Tools

Site Tools


rsync_loop_script
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


rsync_loop_script [2018/05/08 12:58] (current) – created admin
Line 1: Line 1:
 +**Loops rsync until exitcode is 0**
  
 +<code>
 +#!/bin/bash
 +
 +while [ 1 ]
 +do
 +    rsync -avz --partial source dest
 +    if [ "$?" = "0" ] ; then
 +        echo "rsync completed normally"
 +        exit
 +    else
 +        echo "Rsync failure. Backing off and retrying..."
 +        sleep 180
 +    fi
 +done
 +</code>
rsync_loop_script.txt · Last modified: 2018/05/08 12:58 by admin