[Top][All Lists]
[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: |
Sat, 11 Sep 2004 20:33:09 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
"Felix E. Klee" <address@hidden> writes:
>Hi,
>
>when I try to restore an listed-incremental backup where in an
>incremental step
>
> a directory A is to be renamed into B and a file A is to be created
>
>then I get an error message
>
> tar: A: Cannot open: File exists.
>
>I assume that this error is caused because tar tries to create the new
>file before doing the renaming.
I assume, that tar does no renaming at all. To know that for certain,
look at the file list of "2.tar". The file 2store/B/a is an archive
member, and so is 2store/B, isn't it? If tar tried to rename 2store/A
into 2store/B, there would be no need to store 2store/B/a into "2.tar".
Further, as far as I know, there is no renaming information in a tape
archive.
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).
>To reproduce the problem, run the attached file. Using "tar (GNU tar)
>1.14" running on Slackware 9.1, it produces the following output.
>
> tar: 2store/a: Cannot open: File exists
(Should be "tar: 2store/A: Cannot open: File exists." As you mentioned
already.)
This error message is caused by (2).
> tar: Error exit delayed from previous errors
>
>Am I doing something wrong? If not, is there a workaround?
I don't know, whether option "--recursive-unlink" could help. But
beware! Quoting the tar info:(tar)Recursive Unlink:
`--recursive-unlink'
When this option is specified, try removing files and directory
hierarchies before extracting over them. _This is a dangerous
option!_
If you specify the `--recursive-unlink' option, `tar' removes
_anything_ that keeps you from extracting a file as far as current
permissions will allow it. This could include removal of the contents
of a full directory hierarchy.
--
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
- [Bug-tar] Incremental restore seems to first create then rename, Felix E. Klee, 2004/09/10
- Re: [Bug-tar] Incremental restore seems to first create then rename, Joerg Schilling, 2004/09/12
- Re: [Bug-tar] Incremental restore seems to first create then rename, Felix E. Klee, 2004/09/13
- Re: [Bug-tar] Incremental restore seems to first create then rename, Joerg Schilling, 2004/09/15
- Re: [Bug-tar] Incremental restore seems to first create then rename, Felix E. Klee, 2004/09/17