LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-19-2004, 12:17 PM   #1
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Rep: Reputation: 153Reputation: 153
Backups and Restores


I've done a backup as -

tar -czv -f /dev/st0 .

and then a restore as -

tar -xkpszv -f /dev/st0


After the restore I've lost the symbolic links and permissions to

/etc/rc.d/rc6.d


The permissions flags (ls -l) are set to


---------- 1 root root 0 2004-04-19 17:35 K10Cups

whereas it should be

lrwxrwxrwx 1 root root 14 2004-03-10 12:30 K10Cups -> ../init.d/cups

What have I done wrong?
 
Old 04-19-2004, 12:30 PM   #2
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
I use tar -cvpzf

-p, --same-permissions, --preserve-permissions
 
Old 04-20-2004, 11:45 AM   #3
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Original Poster
Rep: Reputation: 153Reputation: 153
I don't know whether it's the wrong combination of flags or not because it appears that not all links have been damaged.

If the link is represented in ls as -

vmlinuz -> vmlinuz.2.4.20-30.9 or

rc0.d -> rc.d/rc6.d

these are OK

if represented as

K10cups -> ../init/cups

these have failed. Presumably when extracting the links tar is not keen on the relative path!

I have the correct links within the tar, inspecting the tar with the list (t) option, as

./etc/rc0.d/K10cups - ../init/cups

I feel the urge to write a script to correct the problem.


What I want to know for peace of mind is how to avoid this problem in the future. As a small test I tried tared to a file instead of tape and restored it didn't appear to create the same problem!!

Any suggestions welcome!!!!!

AK
 
Old 04-22-2004, 03:34 AM   #4
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Original Poster
Rep: Reputation: 153Reputation: 153
Well I now know what I did wrong! Or at least I've now restored using tar without any other intervention and all links are there.

The first attempt at restore was with -

tar -xkpszv -- no-same-owner --same-owner

The second attempt as restore was with I believe -

tar -xkpszv

The third and successful attempt was with

tar -xzv

However, what may be the real reason the third attempt was successful was that on the second attempt I had chopped the restore after it had restored the partition I was interested in. I knew that the tape on it dumps for slackware, redhat, mandrake, fedora and more slackware. I was recovering as root in slackware and thought from inspecting the output from when the tar was created that the dump of the redhat partition was in one contiguous block on the tape and that if I chopped the restore are the last file in the redhat partiton I would save myself a considreable amount of time.

On the last and successful attempt to restore (with the verbose option) and after stdout had listed the last file in the redhat partition I inspected /etc/rc.d/rc6.d and it had tthe same problem as before ----------.

I fired of the previous note and went to the pub to drown my sorrows leaving the restore running. When I got back rechecked and found that the issue had resolved itself and all the symbolic links were present and correct.

Should have gone back to the pub to celebrate!

Tar must do something at the end of the backup in respect of symbolic links.

AK
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Alsa restores mixer settings on reboot Dswissmiss Linux - Software 2 10-20-2005 05:51 PM
kde 'restores' windows at start up. rgiggs Mandriva 1 05-29-2004 06:21 AM
KDE restores programs on startup which shouldn't be restored diam0nd Linux - General 1 04-21-2004 05:10 PM
backups AZDAVE Linux - General 1 11-06-2003 12:05 PM
mandrake 8.2 session dir restores itself khutze Linux - Software 0 07-30-2002 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration