[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Rsync fails on local transfers



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, 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]

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.

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).

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(5, NULL, [4], [4], {60, 0})      = 1 (out [4], left {60, 0})
   write(4, "\222\1\0\0", 4)               = 4
   read(3, "\31\21\3
   \20\0\0\0H\0\0\0m\0\0\0\213\0\0\0\305\0\0\0\306"..., 402) = 402
   select(5, NULL, [4], [4], {60, 0})      = 1 (out [4], left {60, 0})
   write(4, "\31\21\3
   \20\0\0\0H\0\0\0m\0\0\0\213\0\0\0\305\0\0\0\306"..., 402) = 402
   select(5, NULL, [4], [4], {60, 0})      = 1 (out [4], left {60, 0})
   write(4, "\0\0\0\0", 4)                 = 4
   select(5, NULL, [4], [4], {60, 0})      = 1 (out [4], left {60, 0})
   write(4, " \231\37\271<7(k\332\215\325q\220\343:\200", 16) = 16
   close(3)                                = 0
   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
   rt_sigaction(SIGUSR1, {SIG_IGN}, NULL, 8) = 0
   rt_sigaction(SIGUSR2, {SIG_IGN}, NULL, 8) = 0
   wait4(8702, 0x7fff762db284, WNOHANG, NULL) = -1 ECHILD (No child
   processes)
   getpid()                                = 8701
   kill(8702, SIGUSR1)                     = -1 ESRCH (No such process)
   write(2, "rsync error: error in rsync prot"..., 86) = 86
   write(2, "\n", 1)                       = 1
   exit_group(12)                          = ?

Attached is the backup script I use (the configuration file it loads in
is very simple, so I'm not including that).

Justin W

Justin W


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]