LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-07-2012, 10:59 PM   #1
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Rsync error 23


A few days ago I had to abort rsync the hard way, by shutting down the machine it was running on (as I was late for work...), in the middle of syncing and since then it gives me an error 23 (that is: partial transfer due to error). Doh, I knew that already. However, I can't seem to find a way to resolve this, I already re-sync'd the directory it was chewing on at the time of the interruption, but to no avail. Effectively, how do I tell rsync to stop looking for the files it wants to sync? I've tried the man-page but it doesn't seem to have anything related in it and a www search on the net showed up some threads, but no solutions (as did a search here on LQ).

Before the intervention rsync worked fine and permissions haven't changed, so I doubt that'll be a cause...

TIA!
 
Old 01-08-2012, 05:36 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
Lightbulb




I would delete the destination and then try

Code:
rsync -avzt source destination ( add e option & ssh if remote)
Not exactly clear as to the current error. If this does not work please post more specifics as to current error when an attempt is made.

Hope this helps.
 
Old 01-08-2012, 08:58 AM   #3
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Original Poster
Rep: Reputation: 124Reputation: 124
Thanks for your reply. I use rsync with the -rdtvu options to a destination on my network via a trusted-key ssh connection. Deleting the destination will be a PITA to restore, given that's about 40 GB in size, with some 350,000 files, so it would take quite a while, even with the Gbit network I have... I'll give it a try though...
 
Old 01-08-2012, 03:54 PM   #4
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
If I had an rsync operation to redo because it was previously interrupted, I would generally do this:

Code:
rsync --stats -aHPSv -B8192 /my/source/directory/. user@desthost:/my/destination/directory
I generally skip doing compression unless I have a slow network. Compression leaves me with a speed ceiling slightly less than 100mbps, so things can go faster w/o it on a local LAN, especially a gigabit one. Over the internet, compression is usually a definite plus.

I use -H to maintain original hardlinking relationships. Otherwise the target could end up using more space.

I use -S to make sparse files where lots of binary zero bits exist in the files.

I use the /. suffix on the source to ensure I don't get a duplication of the tree inside itself. Normally / alone should do this, but I've had cases where it failed to. But /. has always worked for me.

I use the --stats option for fun.

Sometimes things can get stuck when the destination has a non-empty directory where a non-directory exists in the source. It seems rsync is paranoid about deleting the directory on the destination just to move a file or symlink in its place.
 
Old 01-08-2012, 05:35 PM   #5
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Original Poster
Rep: Reputation: 124Reputation: 124
Thanks for chipping in I did remove the destination folder, then re-sync'd the lot using the -ardtvuz options. Took well over 5 hrs to get everything over... The error I get is:
Code:
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
3.0.7 was probably a directory containing the 3.0.7 kernel (I'm now on 3.1.3, compiled from source on Debian Squeeze) but it's no longer on the source side (don't know why, can't recall compiling a 3.0.7 kernel, but I did a 3.0.0-rc7 once...) nor anywhere else on my systems...

So, it all comes down to convincing rsync to give up on the 3.0.7 directory, but I can't find anything related?
 
Old 01-09-2012, 07:43 PM   #6
Bertical
Member
 
Registered: Oct 2008
Location: Kingdom of Mercia
Distribution: Slackware
Posts: 83

Rep: Reputation: 14
Looking at the source code for rsync ( in log.c ) shows that the number in the square brackets at the end of the error message is the version of rsync. Error 23 is defined in errcode.h as a "partial transfer". I would rerun rsync and the log file should show which file caused the problem ( use --log-file=FILE ).
 
Old 01-09-2012, 07:46 PM   #7
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Original Poster
Rep: Reputation: 124Reputation: 124
Ah, I didn't know that. Thanks! I'll rerun rsync with the log-file option then

[edit: bingo, found the culprit:
Code:
rsync: readlink_stat("/home/<user>/.local/share/Trash/expunged/501191218/sessionstore.json") failed: Stale NFS file handle (116)
Unfortunately, I can't seem to remove it as it keeps getting back... I'll try via the terminal and if required as root... BRB!]
[edit2: rm can't remove it, it complains about a stale NFS file handle, even as root it won't budge! So, in effect this turns from an rsync problem into an NFS issue... Great! :-\ (NOT!!!)]

Last edited by Dutch Master; 01-09-2012 at 08:01 PM. Reason: adding more results
 
Old 03-02-2014, 08:57 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
This is a old thread, but didn't actually have a resolution and still has relevance. I have found that on large files (14G-ish or more) the z option (compress) messes up the transfer. I've had the exact symptoms as the poster happen on a few computers and removing the -z option solved the problem. Generally, I'm transferring .tgz files, so I really don't need compression. I don't know if the latest version of rsync has solved this problem, but as of 3.0.8, removing the -z option did the trick.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync error saghi Linux - General 4 10-06-2009 11:44 PM
rsync error saghi General 1 10-06-2009 06:24 AM
error with rsync DJE007 Linux - Networking 3 09-20-2009 11:51 PM
rsync error: IO error encountered - skipping file deletion lwainscott Linux - General 1 08-21-2009 12:15 PM
rsync error tajamari Linux - Software 1 07-25-2007 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration