Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar -cf /dev/rmt/0 /

Status
Not open for further replies.

tyagineeraj

IS-IT--Management
Mar 27, 2001
16
IN
if we backup complete file system using
tar -cf /dev/rmt/0 /

how would we restor because tar -tv shows
directories like
//usr/..
//etc/..

etc.
while restoring would it put //usr ?? / cannot be created under /

any idia?

thanks
neeraj
 
tar -xfA /dev/rmt/0
May work , may not, depending on whether you have absolute pathname capability. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
Neeraj,

That may work as it is. In my experience a double slash in a path eg. "cd /home//mlacey" is interpreted correctly as a single slash. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
i was having deja-vu then for a second (i'm sure i replied to this ...)

it'd be better for you though if you tar'd with respect to a directory rather than to it specifically, that way you can restore the files to a different place on your file system.

i.e. 'cd /;tar -cf /dev/rmt/0 .' would allow you to extract any of the files safely to any position.

on a linux system (with only one partition mounted) you could effectively recreate the file system by tar'ing the whole thing mounting a new disk as say '/mnt'; change directory to /mnt and then tar xf /dev/rmt/0 to extract everything back exactly the same.

makes giving files to people in tar/zip'ed format a lot more friendly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top