bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Incremental restore seems to first create then rename


From: Helmut Waitzmann
Subject: Re: [Bug-tar] Incremental restore seems to first create then rename
Date: Tue, 14 Sep 2004 19:24:49 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"Felix E. Klee" <address@hidden> writes:

>On Sat, 11 Sep 2004 20:33:09 +0200 Helmut Waitzmann wrote:

>> So, what tar tries to do is:
>> (1) remove the file 2store/A (which fails, because 2store/A is a directory,
>>     not a file),
>> (2) create a file 2store/A (which fails, because 2store/A exist already
>>     and is a directory),
>> (3) create a directory 2store/B and a file 2store/B/a (which successes).
>
>This explanation doesn't seem to be correct. When I don't create the
>text file 2store/A in between backups, the directory is deleted upon
>restoring 2.tar. Here's some verbose output from tar, illustrating this
>case:
>
>2store/
>tar: Deleting `2store/A'
>2store/B/
>2store/B/a

My tar (tar (GNU tar) 1.13.25) doesn't delete the directory.  It reports
the error

   tar: 2store/A: Cannot remove: Is a directory

instead.

>In the case that the text file A is created in between backups (see my
>original script), then I get the following verbose output upon restoring
>2.tar. It seems that tar tries to create the file 2store/A before
>removing the directory of the same name. To me, this looks like an
>obvious bug: Directories should be removed before files are created.

Yes, ... but only if they are in the way of non-directories to be
extracted.

>2store/
>2store/B/
>2store/A
>tar: 2store/A: Cannot open: File exists
>2store/B/a
>tar: Error exit delayed from previous errors
>
>> I don't know, whether option "--recursive-unlink" could help.  But
>> beware!  Quoting the tar info:(tar)Recursive Unlink:
>> 
>> [...]
>
>As can be inferred from the documentation, this option is not applicable
>for incremental restores: If the contents of a directory are only
>partially updated during a restore, then files is lost. For example,
>suppose that the text file 2store/C/y is added before the second backup,
>but the text file 2store/C/x is left unchanged. When restoring the data
>incrementally, then 2store/C/x is deleted during the "recursive unlink
>phase" of the second restore. See also the attached script, which
>illustrates that problem.

So that's different with tar (GNU tar) 1.13.25:  The file 2store/C/x is
not deleted with that old version of GNU tar.
-- 
Wenn Sie mir E-Mail schreiben, stellen |  When writing me e-mail, please
Sie bitte vor meine E-Mail-Adresse     |  precede my e-mail address with
meinen Vor- und Nachnamen, etwa so:    |  my full name, like
Helmut Waitzmann <address@hidden>, (Helmut Waitzmann) address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]