3.0.2: make_bak_dir mkdir ...: File exists (17)

Jordan Russell jr-list-2008 at quo.to
Tue May 20 00:49:04 GMT 2008


Wayne Davison wrote:
> On Fri, May 16, 2008 at 12:07:47PM -0500, Jordan Russell wrote:
>> rsync: make_bak_dir mkdir "/backup/server/../server-before-5/var" failed: File exists (17)
>> rsync: keep_backup failed: "/backup/server/var/lib/rpcbind/rpcbind.file" -> "../server-before-5/var/lib/rpcbind/rpcbind.file": Success (0)
> 
> I tried to duplicate your failure, but rsync didn't fail for me.

Thanks for checking. Unfortunately, I haven't been able to either. The
errors do not re-appear if I manually put "var/lib/rpcbind" back in the
destination directory and run the script again.

(By the way, in case it makes any difference: both sides were upgraded
from 2.6.9 to 3.0.2, so it's using the new "delete-during" default.)

> The above errors indicate that the keep_backup() function tried to
> rename the file into the backup dir, got an ENOENT error (which is the
> only time it tries to call make_bak_dir()) and the attempt to make the
> parent directory of the file failed with an EEXIST error (and then the
> errno got reset to 0 due to the outputting of the error message, a bug
> that I have fixed).

I'm not sure if you caught this, but the "File exists" error was
actually returned on the directory two levels up from the file: "var".

> Is it possible that the file rpcbind.file caused an
> ETXTBSY errno when rsync tried to rename it?

Shouldn't be. On the receiving side, rsync is the only program that ever
touches the files. (And there's never more than one rsync instance
running at a time; the script is executed once per day from cron.)

I suspect the ENOENT result in keep_backup() must be correct because the
verbose output from the rsync run appears to indicate that
"rpcbind.file" -- the file that generated these errors -- was deleted
from the directory *first*:

...
deleting var/lib/rpcbind/rpcbind.file
deleting var/lib/rpcbind/portmap.file
cannot delete non-empty directory: var/lib/rpcbind
...

If I understand correctly, at that point, "var/lib/rpcbind" could not
already exist in the backup directory. (There are no references to
"var/lib/rpcbind" before that in the output.)

-- 
Jordan Russell


More information about the rsync mailing list