How to Fix: Copying files of Windows partition using rsync gives readlink_stat(...) Input/output error (5)
rsync error copying files from Windows partition to Ubuntu
📋 Table of Contents
The error 'readlink_stat(...) Input/output error (5)' occurs when rsync is unable to access certain files due to permissions or file system issues. This issue affects users who try to copy files from a Windows partition using rsync on an Ubuntu system.
This problem can be frustrating as it prevents the successful transfer of large amounts of data, causing delays and potential data loss. In this guide, we will explore the root causes of this error and provide two methods for resolving the issue.
🔍 Why This Happens
- The primary reason for this error is that rsync requires read access to the files it is trying to copy. On a Windows partition, some files may have permissions set in a way that prevents rsync from accessing them. This can be due to various reasons such as file system issues, corrupted file metadata, or incorrect permissions settings.
- An alternative reason for this error could be that the files being copied are symbolic links or have other special properties that cause rsync to fail. In some cases, the underlying file may not exist or is inaccessible due to other factors.
🛠️ Step-by-Step Verified Fixes
Using rsync with the --skip-permissions option
- Step 1: To resolve this issue using the --skip-permissions option, run the following command: `sudo rsync -axHAWXS --numeric-ids --skip-permissions --exclude-volumes /media/windows /mnt/windows-backup`. This will tell rsync to skip files with permissions issues and continue copying the rest of the files.
- Step 2: This method may resolve the issue if file system permissions are the primary cause of the error. However, it's essential to note that skipping permissions can lead to data corruption or loss if not used carefully.
- Step 3: After running this command, verify that the files have been successfully copied by checking the destination directory.
Using rsync with the --ignore-unknown-extension option
- Step 1: Another method to resolve this issue is to use the --ignore-unknown-extension option. This tells rsync to ignore files with unknown extensions, which may be causing the error.
- Step 2: Run the following command: `sudo rsync -axHAWXS --numeric-ids --ignore-unknown-extension /media/windows /mnt/windows-backup`. This will instruct rsync to skip files with unknown extensions and continue copying the rest of the files.
- Step 3: This method may resolve the issue if file extensions are causing the error. However, it's essential to note that ignoring unknown extensions can lead to data loss if not used carefully.
🎯 Final Words
To summarize, the 'readlink_stat(...) Input/output error (5)' error occurs when rsync is unable to access certain files due to permissions or file system issues. By using the --skip-permissions option or the --ignore-unknown-extension option, you can resolve this issue and successfully copy files from a Windows partition using rsync on an Ubuntu system.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Fix Pc crashes shortly after launching game (rainbow six siege). Compl
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: New PC build- no signal and no clue
Fix New PC build- no signal and no clue. Complete troubleshooting guid