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: Joerg Schilling
Subject: Re: [Bug-tar] Incremental restore seems to first create then rename
Date: Wed, 15 Sep 2004 19:47:33 +0200
User-agent: nail 11.2 8/15/04

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

> On Sun, 12 Sep 2004 21:29:03 +0200 Joerg Schilling wrote:
> > Check 'star' ftp://ftp.berlios.de/pub/star/alpha/
> > 
> > star-1.5a47 introduced a incremental restore that just does what you
> > like...
>
> I already considered that tool. Today, I tried it out, and it handles
> the test cases I originally threw at GNU tar flawlessly. What I haven't
> tested yet, is pattern matching. Hopefully, this allows me to include
> only parts of the directory tree when doing dumps (I don't want to back
> up temporary directories, etc.). Anyways, at first sight, star looks
> like a very powerful TAR implementation.

As long as you do not rename files from the hidden part of the tree into
the non hiden part, it should be possible although I did not yet
test this. Note that the incremental restore is quite new and I did like to 
be ready before I travel to the US.

> I read it, but star does not behave entirely as documented. See the
> attached example script as an example. Here's what happens:
>
> 1. A text file 2store/C/y is created (and some other files).
> 2. The level 0 dump of the directory 2store is performed.
> 3. The file 2store/C/y is removed and, immediately afterwards, the text
>    file 2store/C/z is created. In the following, I assume that it gets
>    the same inode number as 2store/C/y (if it doesn't, then the bug
>    probably doesn't occur).
> 4. The level 1 dump of 2store is performed.
> 5. The restore of the level 0 dump is performed in the directory
>    restore.  
> 6. The restore of the level 1 dump is performed in the directory
>    restore.
> 7. Now everything is correctly restored, but: The directory
>    restore/star-tmpdir is empty. According to AN-1.5a47, it should contain
>    a file with the contents of 2store/C/y.

Star does have a directory preparation phase where it scans file names and
inode numbers. if it detects disappeared files, it moves them to /star-tmpdir.
This is done as star cannot knw at this point whether the files has been removed
or rename to a different dir.

The second action in the directory preparation is to try to link/rename fils to 
the current directory that are not present.

Then the directory content is updated with the incremental directory content
from the archive. At this time, star detects whether a new file with the
sam name and inode number has been appeared. If this turns out to be true, 
star unconditionally removed this file. It it is a directory, the content is 
moved to /star-tmpdir and then the directoy is removed.

After star is finished, it removes all empty directories and all fles with 
link count > 1 from /star-tmpdir. Future versions of star will remove all files
from /star-tmpdir when no error did ocur.

Does this help?


Jörg

-- 
 EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
       address@hidden           (uni)  If you don't have iso-8859-1
       address@hidden   (work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling 
ftp://ftp.berlios.de/pub/schily




reply via email to

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