Debian 11 - System Hang When Using rsync with --delete Option Over SSH
I'm confused about I'm having trouble with I've hit a wall trying to I'm trying to implement I'm following best practices but I'm relatively new to this, so bear with me. I'm experiencing a critical scenario with rsync on Debian 11 where the system hangs indefinitely when I try to run an rsync command with the `--delete` option over SSH. The command I use is as follows: ```bash rsync -avz --delete -e 'ssh -p 22' /local/dir/ user@remote:/remote/dir/ ``` During execution, it seems to start copying files correctly, but then it stops progressing after a seemingly random amount of time. The SSH connection doesn't drop, but I want to interact with the terminal anymore, and the system becomes unresponsive. I've tried monitoring the system performance using `htop`, but it shows that the CPU and memory usage remain within normal ranges. The scenario occurs whether I run it from a local terminal or through a screen session. I've also checked the `rsync` version, and I am using `rsync 3.1.3` on the local machine and `rsync 3.1.2` on the remote server. Additionally, I've run `dmesg` and `journalctl -xe` but there are no relevant behavior messages indicating what might be causing this behavior. To troubleshoot, I attempted to run the rsync command without the `--delete` option, and it completed successfully. I also tried using the `-n` (dry run) option with `--delete` to check what would be deleted, and it worked without hanging. This behavior leads me to believe that there might be an scenario with how `rsync` is attempting to handle deletions over SSH. Does anyone have any insights into why this might be happening or any potential workarounds to prevent the system from hanging when using the `--delete` option? Could this be related to the SSH configuration or rsync's handling of files during deletion? Any ideas what could be causing this? This is part of a larger CLI tool I'm building. For reference, this is a production microservice. Cheers for any assistance! I'm coming from a different tech stack and learning Bash. What's the correct way to implement this? I'm coming from a different tech stack and learning Bash. Am I approaching this the right way?