Advertisement
iklio

Rsync with resume

Sep 21st, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. while [ 1 ]
  4. do
  5.     rsync -avrvv --size-only --partial --progress user@host:/path_on_server localpath
  6.     if [ "$?" = "0" ] ; then
  7.         echo "rsync finished"
  8.         exit
  9.     else
  10.         echo "Rsync problem, retrying in 3 minutes"
  11.         sleep 180
  12.     fi
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement