25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Rsync input/output error(5)- Easy fix!

by | Oct 9, 2019

Is your backup failing with the rsync input/output error(5)?

Unfortunately, it is a common error while executing rsync commands. This error mainly occurs due to disk defects, insufficient permissions and so on.

At Bobcares, we often receive requests to fix the rsync input/output error(5) as part of Server Management Services.

So today, let’s get deep into this error and see how our Support Engineers fix it for our customers.

 

What is the rsync input/output error(5)?

As we all know, rsync is popular for its faster file copying capability. It is preferred mainly due to the large variety of options it provides while copying data.

Recently, one of our customers approached us with a rsync error. He was running a daily backup scrit with rsync.

But, a few days back, during backup, one of his files throwed the error.

rsync: read errors mapping "/home/folder/file.ext": Input/output error (5)

In general, this error indicated the impossibility of rsync to read or write a file.

This error occurs due to many reasons. Let’s discuss some top reasons that cause this error and see their respective fixes too.

 

Causes and fix Rsync input/output error

Finding the ultimate reason that causes the rsync input/output error(5) can be a bit tricky. From our expertise in managing servers, our Dedicated Engineers see that it occurs mainly due to disk defects, insufficient privileges, etc. Let’s take a detailed look on each of them.

 

1. Disk defects

In general, disk defects in the source or target directory can cause this rsync error.

To check whether these disk defects cause the error, we try to copy the files manually. If the files copies successfully, then we can make sure that the source of error is disk defects in the source directory.

We repeat this operation at a later time. This time we will write into a different section of the disk and this will resolve the error.

Also, if we have a bad sector in our SRC directory, we exclude it using the command.

rsync -av --exclude='/home/my_name/directory_with_corrupt_files/*'

Here, the rsync process skips the copying of the files specified in this directory.

 

2. Insufficient privileges

Similarly, the wrong privileges on the files or folders can also cause this error. In such cases, our Support Engineers always recommend using the root account on both SRC and TGT machines.

In case if we don’t have the root access, we check whether the rsync files are accessible for us. If not, then we modify the permissions and ownership of the files. This gives adequate peivileges to the user performing the rsync operation.

 

3. File lock by anti-virus programs

The input/output error in rsync can also occur due to file lock by anti-virus programs.

An anti-virus locks files for some time. Thus, Rsync may not be able to access the file. This can also cause the input/output error.

Retrying the same command after sometime resolves the error in most cases. Or, we may have to disable anti-virus program temporarily or even skip directories in use by antivirus.

 

[Need assistance to fix the input/output rsync error(5)?- We’ll help you.]

 

Conclusion

In short, the rsync input/output error(5) occurs mainly due to disk defects, insufficient privileges and so on. Today’s write-up discussed this error in detail and we also saw how our Support Engineers fix it for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

4 Comments

  1. German

    Hello. I’m did have this problem with file name. Excuse me for my english.

    Reply
    • Arya MA

      Hi there,

      Do you still get errors while using rsync? If you still find problems, we’ll be happy to talk to you on chat (click on the icon at right-bottom).

      Reply
  2. Craig Davidson

    Hello. I am using rsync on unraid and I get the error pasted below. Are you able to help? The drive im writing to has always worked before but suddenly stopped working. The size of the drive is 4tb and has 900gb of spare space. The drive is writable as I just copied a movie over manually. Thanks.

    Script location: /tmp/user.scripts/tmpScripts/Master Backup/script
    Note that closing this window will abort the execution of this script
    Please wait.. I am working here
    sending incremental file list
    rsync: [generator] recv_generator: mkdir “/mnt/disks/MASTER_BACKUP/ALLPHOTOSMASTER/allphotos” failed: Input/output error (5)
    *** Skipping any contents from this failed directory ***
    allphotos/

    sent 638,688 bytes received 1,071 bytes 85,301.20 bytes/sec
    total size is 217,352,067,145 speedup is 339,740.54
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]
    Please wait.. I am working here
    sending incremental file list
    rsync: [generator] recv_generator: mkdir “/mnt/disks/MASTER_BACKUP/ALLVIDEOSMASTER/allvideos” failed: Input/output error (5)
    *** Skipping any contents from this failed directory ***
    allvideos/

    sent 147,423 bytes received 588 bytes 59,204.40 bytes/sec
    total size is 990,185,692,518 speedup is 6,689,946.64
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]

    Reply
    • Hiba Razak

      Hi,
      Please contact our support team through live chat (click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF