Rsync error: some files could not be transferred (code 23).
Got this error message and looking for a fix?
Basically, the rsync error code 23 denotes ‘partial transfer due to error‘. This happens due to file permission problems.
At Bobcares, we often get requests to fix rsync errors, as a part of our Server Management Services.
Today, let’s see how our Support Engineers fix the rsync error 23 for our customers.
What does rsync error code 23 mean?
Rsync stands for remote sync. Actually, Rsync is a fast, flexible and secure file synchronization tool.
But in many situations, the file transfer via Rsync ends up in errors.
Usually, the error code 23 denotes a partial transfer. This code does not provide the reason for the incomplete transfer.
So, the error code 23 is basically a status code denoting an incomplete file transfer. The reason for this can be permission denial, input/output errors, typos in rsync command and so on.
A typical error shows up as:
How we fix rsync error code 23?
The Dedicated Engineers at Bobcares debug and fix rsync errors for our customers. Now let’s see a few situations were our customers got the rsync error code 23.
1. Error code 23 due to permission denial
In the first instance, a customer executed a rsync command to transfer files within his system.
Here the command was:
rsync -avz /home/user_name /home/guest/backup
But, this command ended up in error code 23. Our Support Engineers re-executed the rsync command with -av options. Then we got an error message:
rsync: link_stat "xxxx/xxxxx/xxx" failed: Permission denied (13).
So, the partial file transfer was because of the permission denied error. Hence we fixed the permissions of the files and folders to resolve the error.
2. To find the files that are not transferred
Again, one of the major challenges in failed Rsync transfer is to find the files that didn’t transfer.
To overcome this problem, users always monitor the rsync operations by executing the command:
rsync -av --progress
Usually, this command gives an entire terminal output along with the errors. The rsync operation ends up in error code 23. But, from a large number of output lines, it may be difficult to find the reason for error code 23.
In this situation, our Support Engineers execute the rsync command again with option-n
.
Basically, the option-n
denotes dry run, that is, it performs a trial run with no changes made. Thus we could actually see the files that are not transferred. And we could fix errors with these files.
A snippet from one of our servers :
root@awsxxx:~# rsync -azhv -e "ssh -p 2212" --dry-run /home/bobcares/test_200719 --delete-after --dry-run root@5x.136.xxx.121:/home/bobcares/test_200719
building file list ... done
created directory /home/bobcares/test_200719
test_200719/
test_200719/test
sent 79 bytes received 70 bytes 298.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
Similarly, we could also use the option-q
to suppress non-error messages.
Finally, we also make sure that typos in the rsync command do not cause the error.
[Still having trouble in fixing rsync errors? – We’ll fix it for you.]
Conclusion
In short, the rsync error code 23 denotes partial transfer due to error. The error can be anything from typos in the rsync command to permission denial of files. Today, we saw how our Support Engineers sort out the error code 23.
0 Comments