Rsync in a loop

#!/bin/bash
# By Sileep Kumar M S <sileepkumar@gmail.com>

while [ 1 ]
do

rsync -avz --progress --partial -e 'ssh -c blowfish' root@server:/home /
    if [ "$?" = "0" ] ; then
        echo "rsync completed normally"
        exit
    else
        echo "rsync failed. Retrying.."
        sleep 120
    fi
done

Popular posts from this blog

MySQL table conversion

Add addon-domain, sundomain and parked domains via shell in a Cpanel server

Cpanel Migration Script