[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Rdiff-backup-bugs] [bug #26847] Eliminating "AF_UNIX path too long" whe
From: |
Joe Steele |
Subject: |
[Rdiff-backup-bugs] [bug #26847] Eliminating "AF_UNIX path too long" when backing up sockets |
Date: |
Fri, 19 Jun 2009 20:02:17 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 |
URL:
<http://savannah.nongnu.org/bugs/?26847>
Summary: Eliminating "AF_UNIX path too long" when backing up
sockets
Project: rdiff-backup
Submitted by: j_steele
Submitted on: Fri 19 Jun 2009 08:02:12 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Currently, rdiff-backup (v. 1.2.8) will attempt to back up socket files by
using socket() and bind() to recreate the socket file on the destination
system. I suggest using os.mknod() instead. The main advantage for mknod()
is that it can create socket type files using paths of arbitrary length,
whereas bind() is limited to a maximum of 107 characters. A disadvantage is
that os.mknod() is only available for python >= 2.3.
Using mknod() instead of bind() should help to eliminate the error:
SpecialFileError somewhere/foo/bar/socket Socket error: AF_UNIX path too
long
I've attached a file to this bug report that contains a patch to rpath.py
which seems to work for me. It's written so that if mknod() fails, the
program reverts to its current behavior for creating sockets using bind().
By the way, I don't see where anyone has ever mentioned it, but one of the
reasons the "AF_UNIX path too long" error occurs is because, sooner or later,
the socket changes (e.g., when a daemon is restarted) and another backup is
run, creating an increment/snapshot file that looks something like this:
/somewhere-else/my-backup/rdiff-backup-data/increments/somewhere/foo/bar/socket.2009-06-12T19:35:55-04:00.snapshot
At 114 characters, this path will generate the "AF_UNIX path too long" error
when passed to bind(), even though the lengths of the paths for the original
socket (/somewhere/foo/bar/socket) and the backup destination
(/somewhere-else/my-backup) are not particularly long.
Another approach for eliminating these errors would be to do what the tar
command does -- ALWAYS ignore sockets when backing up (don't even permit them
to be optionally backed up). After all, there really isn't much point in
backing up sockets.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 19 Jun 2009 08:02:12 PM GMT Name: rpath.py.patch.txt Size: 788B
By: j_steele
<http://savannah.nongnu.org/bugs/download.php?file_id=18293>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?26847>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Rdiff-backup-bugs] [bug #26847] Eliminating "AF_UNIX path too long" when backing up sockets,
Joe Steele <=