1

I'm sending a big file to a remote server with rsync through SSH. I have a problem, it gets interrupted very often. So I wanted to let the rsync problem auto retry when that fails.

I read this linux - Resume rsync over SSH after broken connection? - Super User and I'm trying something like this:

while ( ! rsync -avz --append --partial -h --info=progress2  -e 'ssh -p 6001' -r src user@host:'dist' ); do sleep 5; done

But this does not work properly, since the rsync script does not exit but something prevents its exiting.

Connection to [host] closed by remote host.

So I need to quit the program manually typing ctrl-C and rerun the rsync script manually...

^C^Crsync error: unexplained error (code 255) at rsync.c(644) [sender=3.1.2]

So, what's the problem here?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.