/usr/bin/rsync returned 12 while processing / protocol data stream (code 12)

I get /usr/bin/rsync returned 12 while processing and protocol data stream (code 12) error from my script. How can I fix this on Linux.

ERRORS error in rsync protocol data stream (code 12)

Log file attached:

root@aws-ec2-backup:/etc/ rsync error: error in rsync protocol data stream (code 12) at io.c(235) [Receiver=3.1.3]

root@aws-ec2-backup:/etc/ ERROR: /usr/bin/rsync returned 12 while processing root@aws-ec2-backup:/etc/

root@aws-ec2-backup:/etc/ NO STATS DATA
root@aws-ec2-backup:/root/ rsync error: error in rsync protocol data stream (code 12) at io.c(235) [Receiver=3.1.3]

root@aws-ec2-backup:/root/ ERROR: /usr/bin/rsync returned 12 while processing root@aws-ec2-backup:/root/

root@aws-ec2-backup:/root/ NO STATS DATA
root@aws-ec2-backup:/home/ rsync error: error in rsync protocol data stream (code 12) at io.c(235) [Receiver=3.1.3]

root@aws-ec2-backup:/home/ ERROR: /usr/bin/rsync returned 12 while processing root@aws-ec2-backup:/home/

root@aws-ec2-backup:/home/ NO STATS DATA
root@aws-ec2-backup:/var/spool/cron/ rsync error: error in rsync protocol data stream (code 12) at io.c(235) [Receiver=3.1.3]

root@aws-ec2-backup:/var/spool/cron/ ERROR: /usr/bin/rsync returned 12 while processing root@aws-ec2-backup:/var/spool/cron/

root@aws-ec2-backup:/var/spool/cron/ NO STATS DATA

What is going here? Can any Linux guru help me regarding this issue?

To fix this error install rsync package on your remote server aws-ec2-backup.

Installing rsync on Debian and Ubuntu Linux to fix “rsync returned 12 while processing / protocol data stream (code 12)” error

sudo apt update
sudo apt install rsync

Other distros such as CentOS / Fedora / RHEL will use the dnf:

sudo dnf install rsync

Does this solve your problem?

@monk - That solved it. :smile:
why don’t they say:
rsync not found
Something like:
install rsync on remote server
instead of error codes? Are these error code documented somewhere? :t_rex:


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki