file restoration to new directory - tar command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers file restoration to new directory - tar command
# 1  
Old 07-19-2006
file restoration to new directory - tar command

hi,
i face some problem which need URGENT assistance.

am performing a restoration for recovery in an AIX UNIX server.
when i use the tar -tvf command to view the tape contents,
it gives me /ata1/mydir/myfile.

i understand that how the file was backed up determine whether we could restore them into new directory.
=> if it's ./ata1/mydir/myfile then we can put it in a new directory (all the ata1 directories above it will be created under whichever directory i'm in).
=> If it's listed as /ata1/mydir/myfile, then it's going to restore the file in the original directory .

is there any POSSIBLE way for me to restore the files from a tape to a new directory (let say /disk1/ata1/mydir/myfile).
as we no longer have /ata1 mounted in the system.

appreciate ur kind feedback.
thanks in advanced.
# 2  
Old 07-19-2006
Check out Perderabo's suggestion in this thread

Alternately, you can create a soft link of /ata1 to /opt or /export/home and then tar all the files onto that partition (it would create all the lower directories)
# 3  
Old 07-19-2006
Smilie
RTM, thank you very much.
it works with soft link.

thanks again.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to Tar file in a specific Directory

I'm trying to write a Unix script that will go to a specific directory (/tmp/Sanbox/logs) and tar.gz all the log files in that directory and delete the original files that are older than 2 days. So far I have this but it doesn't work. Any help would be appreciated. #!/bin/bash ... (7 Replies)
Discussion started by: Loc
7 Replies

2. AIX

Making Tar of directory and tar file is going to be placed

Quick question, is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?) sample: /opt/freeware/bin/tar -cvf - /oracle | gzip > /oracle/backup.tgz will the tar file backup.tgz also include backup.tgz ? i tried... (5 Replies)
Discussion started by: filosophizer
5 Replies

3. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies

4. Solaris

HOW TO extract.tar file to specific directory..?

Hi all, In Solaris howto extract tar file to specific folder. This is what we do in Linux, but how to do the same thing in Solaris ? -tar -xzvf /tmp/etc.tar.bz -C /tmp (Will extract in /tmp dir) 3.gzip COMPRESSION AND EXTRACTION -tar -czvf /tmp/etc.tar.bz /etc -du ... (5 Replies)
Discussion started by: manalisharmabe
5 Replies

5. Shell Programming and Scripting

Tar file with logging and directory via parameter

Hi all, I am fairly new to shell scripting and I am trying the following: My shell script creates a tar file with files with the ending ~. The directory - where the files and sub directories are located - comes as a parameter when I call the script. Files that are archived will be written in... (1 Reply)
Discussion started by: neg42
1 Replies

6. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

7. Shell Programming and Scripting

tar command dont tar to original directory

HI, if I have a tarfile called pmapdata.tar that contains tar -tvf pmapdata.tar -rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt -rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt -rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies

8. Shell Programming and Scripting

How to tar all executable file in a directory

Dear all I want to create a tar file which contains all executable files in a specific directory cd /appl/home/ file some_exe some_exe: 64-bit XCOFF executable or object module not stripped My current approach is to tar it one by one tar -cvf test.tar exefile1 tar -uvf test.tar... (2 Replies)
Discussion started by: on9west
2 Replies

9. Shell Programming and Scripting

TAR manipulation of file directory

I want to insert file to tar file (by tar command). The file is currently in a diffrenet directory and i want to be saved at the tar file as it was in other directory. I write the script in korn shell. How can i do it? (0 Replies)
Discussion started by: arielromi
0 Replies

10. UNIX for Advanced & Expert Users

extract a sub directory form a tar file

anyone know if it is possable to extract a subdirectory in a tar file. IE tarfile contains parent dir -sub dir A -sub dir B I want to extract sub dir B. (2 Replies)
Discussion started by: Optimus_P
2 Replies
Login or Register to Ask a Question