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

Useful 'sed' examples

Usable scripts for Cpanel Servers

Cpanel Migration Script