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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

backup using TAR

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi

I did backup on DLT tape using TAR command. I did 100 files. Now i want some specific files to restore how should i do that....

thax in advance
 
Look my last response of thread: thread60-326640

If you only have one or two (well ... say not too many) files to extract just put their name on the 'tar xvf' command. The name is the full name seen with 'tar tv'.

Code:
tar tv myArchive.tar
Code:
myTopDir/mySubDir/myWantedFile1
myTopDir/mySubDir/myWantedFile2
...
anotherDir/anotherSubDir/myUnwantedFile93768
Code:
tar xvf myArchive.tar myTopDir/mySubDir/myWantedFile1 myTopDir/mySubDir/myWantedFile2


Beware that if you give absolute path name when creating the archive the extracted files will be created at this same absolute path. To avoid this look thread: thread60-306911
 
Just for clarification, be aware that the way the second command above has pasted into the reply isn't how to enter the command. Use:

tar xvf myArchive.tar <path>/myfile1 <path>/myfile2 ...etc

ie, all on the same line. Sorry if this was obvious, but just wanted to be sure fl23 would understand. Right - back to Monday morning!!

 
thank you so much for all your help dchoulette and kencunningham.

reg
 
thank you so much for all your help dchoulette and kencunningham.

reg
 
I have one more question....on backup using TAR.

When i do backup today it backus up req files and when i try to do some other files next day then it is over writing the existing files..what is the command i need to give to avoid this..

I think we need to give &quot;n&quot; no rewind switch but how it works when u unmount the tape and remount it and want to take a backup appending the existing files on it..pls give me clear instructions..

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top