rsync suddenly hanging indefinitely during transfers

后端 未结 13 1135
囚心锁ツ
囚心锁ツ 2021-01-30 20:34

For the past few years, I have been using an rsync one-liner to back up important folders on my Mac Mini desktop (OSX 10.9, 2.5 GHz i5, 4 GB RAM) to a FreeNAS box (0.7.2 Sabanda

13条回答
  •  时光说笑
    2021-01-30 20:50

    In my situation rsync was not actually failing.

    I have regular server backups which transfers large files over 500GB+ and have --append-verify or --checkusm over ssh parameters specified.

    What I have found upon analysis is that once the client side completes it's file checks then the server side checks start. Which means while the server is doing it's checks the client side will appear hanged and frozen - run htop on the server to rsync working away.

    This is likely a non issue if rsync is run in deamon mode on the server and using the rsync protocol instead of ssh for transfers.

    On related note, this very LONG wait would trigger SSH timeout and a rsync: connection unexpectedly closed (254 bytes received so far) [sender] error message, sollution is to add ClientAliveInterval 120 and ClientAliveCountMax 720 to /etc/ssh/sshd_config.

提交回复
热议问题