Bug 5923

Summary: Restore cannot restore files with symlinks.
Product: [Retired] Red Hat Linux Reporter: dwmalone
Component: dumpAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: cks-rhbugzilla, dickson
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-05 18:49:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dwmalone 1999-10-13 21:32:09 UTC
When I try to restore a dump with symlinks in it I get
the following messages for each symlink:

% rpm -qf `which restore`
dump-0.4b4-11
% gunzip -c ~/GravesLocal.gz | /sbin/restore xf -
/sbin/restore: ./man: cannot create special file: Operation
not permitted
/sbin/restore: ./mmdf/table/mmdfdbm.db: cannot create
special file: Operation not permitted

It after extracting the files it then thinks it wants
to change tapes on a pipe and aborts, which leaves all
the files with the wrong permissions and wrong ownership.
Restore from another Linux box can successfully restore
the dump file, as can restore on FreeBSD.

Comment 1 Chris Siebenmann 1999-10-21 05:41:59 UTC
This is a bug new in RedHat 6.1; the RedHat 6.0 restore will
restore things fine.

(I also think that this is a fairly severe bug: dump-based backups
cannot be restored easily on RedHat 6.1 machines.)


------- Additional Comments From   11/04/99 08:26 -------
I mailed this to bugzilla, thinking it would get added as a comment,
but didn't. So here goes again.

> + This is a bug new in RedHat 6.1; the RedHat 6.0 restore will
> +restore things fine.

I've just had a quick look - this looks easy enough to fix. A
return was removed in the middle of a switch/case statement, so
the link case was falling through to the special file case.

The mistake seems to be in dump-0.4b4-alpha.patch.

        David.

--- dump-0.4b4/restore/tape.c.redhat    Thu Oct 21 11:51:34 1999
+++ dump-0.4b4/restore/tape.c   Thu Oct 21 11:52:02 1999
@@ -576,6 +576,7 @@
                if (linkit(lnkbuf, name, SYMLINK) == FAIL)
                        return (FAIL);
                (void) chown(name, luid, lgid);
+               return(GOOD);
        }

        case IFCHR:

Comment 2 Bill Nottingham 2000-02-05 18:48:59 UTC
*** Bug 4815 has been marked as a duplicate of this bug. ***

Comment 3 Bill Nottingham 2000-02-05 18:49:59 UTC
Fixed in the current dump in Raw Hide.

Comment 4 Bill Nottingham 2000-02-05 18:50:59 UTC
*** Bug 6950 has been marked as a duplicate of this bug. ***