On 17Jul2007 11:16, Justin W <jlist@xxxxxxxxxx> wrote: > Justin W wrote: >> I've got a script I wrote up which backs up my computer using rsync. A >> short overview is that I created a file system image using dd, Don't you create filesystems with mkfs/e2mkfs ? You need to use dd to make a file to _hold_ the filesystem, but that's just a chunk of data; it's not a filesystem until you use mkfs. >> and now I >> mount the image and rsync from the server's HD to the image file. >> >> Periodically during large backups, I get the following error: >> >> rsync: connection unexpectedly closed (16931 bytes received so far) >> [sender] >> rsync error: error in rsync protocol data stream (code 12) at >> io.c(453) [sender=2.6.9] No other messages? >> When I Google for the problem, I get many results about a SSH connection >> timing out because of inactivity during the delete stage, but I'm not >> using SSH, so I don't get why I would have this problem: both the source >> and destination are local. Correct. >> Any ideas on how to debug this would be great. I've thought of using >> strace, but it'd result in a huge file which would have to be sorted >> through (as rsync isn't technically crashing, rsync would continue with >> a shutdown procedure and the logging wouldn't stop right at the point of >> failure). Half of rsync is crashing; it forks. Run "strace -f", and then look at the pid that _isn't_ the one printing the error message. > Actually, looking through my script, I had stuck an strace in there at some > point. I currently have a 165MB trace in my /tmp directory. Here's the > last few lines of it: [...] > write(1, "usr/lib/locale/nb_NO/LC_IDENTIFI"..., 39) = 39 [...] > select(6, [5], [], NULL, {60, 0}) = 1 (in [5], left {60, 0}) > read(5, "", 4) = 0 > write(2, "rsync: connection unexpectedly c"..., 76) = 76 > write(2, "\n", 1) = 1 [...] >> Attached is the backup script I use (the configuration file it loads in >> is very simple, so I'm not including that). Regrettably, that's just the code that prints the error message. See if "strace -f" is more informative. -- Cameron Simpson <cs@xxxxxxxxxx> DoD#743 http://www.cskk.ezoshosting.com/cs/ These aren't the droids you're looking for.