- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Tar extraction fails
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 05:29 AM
06-27-2007 05:29 AM
Tar extraction fails
/home/y7p/file.tar
to
/production/Y7P
the operation fails. There is no error message.
Here is the cmd:
$ tar xvf /home/y7p/file.tar /production/Y7P
If I mv or cp the file to /production/Y7P and then untar the operation works.
Note:
1)
I am performing this as user y7p
2)
Here is some info from /etc/fstab
/dev/vgtools/prod /production vxfs rw,suid,largefiles,delaylog,datainlog 0 2
/dev/vgtools/prod_Y7P /production/Y7P vxfs rw,suid,largefiles,delaylog,datainlog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
3) Here are relevent directory perms
drwxrwxrwx+ 4 root root 96 Jun 27 17:11 /production
# getacl /production
# file: /production
# owner: root
# group: root
user::rwx
user:y7p:rwx
group::rwx
group:users:rwx
class:rwx
other:rwx
AND
drwxrwxr-x+ 10 y7p users 1024 Jun 27 17:15 /production/Y7P
# getacl /production/Y7P
# file: /production/Y7P
# owner: y7p
# group: users
user::rwx
user:y7p:rwx
group::rwx
group:users:rwx
class:rwx
other:r-x
default:class:rwx
default:other:rwx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 05:33 AM
06-27-2007 05:33 AM
Re: Tar extraction fails
tar xvf /home/y7p/file.tar /production/Y7P
with try to extract a file / directory called /production/Y7P
You cannot do redirection with tar.
If the tar file was created relative then you can change directories and have the structure beneath. If the tar was created absolute you have no choice, it will have to be untar'd to the path it was tar'd with.
tar vtf /home/y7p/file.tar will show you the contents and paths.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 05:36 AM
06-27-2007 05:36 AM
Re: Tar extraction fails
My assumption was you are attempting a redirect, perhaps you really do want the one directory restored.
If you are looking for a specific file/dir the selection must match exactly what is in the tar file. tar vtf file.tar to see the contents. The extraction is not finding what you have told it to look for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 05:42 AM
06-27-2007 05:42 AM
Re: Tar extraction fails
I'm trying to untar the contents of file.tar, which includes a number of different subdirectories and files.
Here is a session:
DMC2 root@pkdh0085 [/root]
# su - y7p
DMC2 y7p@pkdh0085 [/home/y7p]
$ whoami
y7p
DMC2 y7p@pkdh0085 [/home/y7p]
$ ls
profile.back spam.txt
restoreResultProcessor-production-27.tar y7p
DMC2 y7p@pkdh0085 [/home/y7p]
$ tar xvf restoreResultProcessor-production-27.tar /production/Y7P
DMC2 y7p@pkdh0085 [/home/y7p]
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 05:51 AM
06-27-2007 05:51 AM
Re: Tar extraction fails
1 of 2 things. There is nothing in the tar file relevant to /production/Y7P or the tar was created with relative path and the command should be tar xtf /home/y7p/file.tar production/Y7P
The content listing will determine the course.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 06:01 AM
06-27-2007 06:01 AM
Re: Tar extraction fails
$ tar vtf /home/y7p/restoreResultProcessor-production-27.tar
rwxrwxrwx 0/0 0 Jun 27 16:38 2007 y7p/essrestore/
rwxrwxrwx 0/0 0 Jun 27 16:38 2007 y7p/essrestore/etc/
rwxrwxrwx 0/0 0 Jun 27 16:38 2007 y7p/essrestore/lib/
rwxrwxrwx 0/0 0 Jun 27 16:38 2007 y7p/essrestore/scripts/
rwxrwxrwx 0/0 684 Jun 27 16:38 2007 y7p/essrestore/etc/essRestore.cfg
rwxrwxrwx 0/0 1061 Jun 27 16:38 2007 y7p/essrestore/etc/log4j.properties
rwxrwxrwx 0/0 45386 Jun 27 16:38 2007 y7p/essrestore/lib/activation.jar
rwxrwxrwx 0/0 63980 Jun 27 16:38 2007 y7p/essrestore/lib/commons-lang-1.0.1.jar
rwxrwxrwx 0/0 38015 Jun 27 16:38 2007 y7p/essrestore/lib/commons-logging-1.0.4.jar
rwxrwxrwx 0/0 350627 Jun 27 16:38 2007 y7p/essrestore/lib/log4j-1.2.11.jar
rwxrwxrwx 0/0 280984 Jun 27 16:38 2007 y7p/essrestore/lib/mail.jar
rwxrwxrwx 0/0 7022 Jun 27 16:38 2007 y7p/essrestore/lib/restoreResult.jar
rwxrwxrwx 0/0 179 Jun 27 16:38 2007 y7p/essrestore/scripts/findRstrCDRCnt.sh
rwxrwxrwx 0/0 696 Jun 27 16:38 2007 y7p/essrestore/scripts/restoreResult.sh
rwxrwxrwx 0/0 84 Jun 27 16:38 2007 y7p/essrestore/scripts/runAglntEssRestore.sh
rwxrwxrwx 0/0 7188 Jun 27 16:38 2007 y7p/essrestore/scripts/y7pEssRestore.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 06:15 AM
06-27-2007 06:15 AM
Re: Tar extraction fails
Your listing shows a relative tar of y7p subdirectory ( notice the case as well )
If this is what you are looking for and you wish to extract into /production then:
cd /production
tar xvf source.tar y7p
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 06:22 AM
06-27-2007 06:22 AM
Re: Tar extraction fails
Thanks for your kind assistance.
In this case I'm attempting to create a sub directory y7p/ in the /production/Y7P/
Are you saying my cmd line for tar is incorrect?
$ tar xvf /home/y7p/file.tar /production/Y7P
(or from /home/y7p )
$ tar xvf file.tar /production/Y7P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 06:32 AM
06-27-2007 06:32 AM
Re: Tar extraction fails
Would it matter that this mount point is a SAN?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 06:52 AM
06-27-2007 06:52 AM
Re: Tar extraction fails
Here is the point.
There is no redirection in tar. The argument after the source file specifies a particular file or directory that is in the tar file not a destination for the extract.
In your case you will have to extact the lowercase y7p as it is then move then either rename the directory or move your newly extacted files to the directory of your choosing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 06:53 AM
06-27-2007 06:53 AM
Re: Tar extraction fails
Yes, your syntax is incorrect.
To do what you want to do:
# cd /production/Y7P
# tar -xvf /home/y7p/file.tar
That will extract the entire contents of your tar file into your current directory. This should solve your problem.
The problem with your syntax is that where you were specifying the /production/Y7P is where tar expects to find the files to extract. Since /production/Y7P doesn't exist in the tar file, it failed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 06:59 AM
06-27-2007 06:59 AM
Re: Tar extraction fails
I thought when I executed:
tar ./file.tar /some/directory/path/
it would work.
Curiously, it works when I use
tar ./file.tar /some/other/directory/path/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 07:44 PM
06-27-2007 07:44 PM
Re: Tar extraction fails
You can "redirect" on create:
$ tar -cvf file.tar -C pathx a1 a2
The files a1 and a2 are relative to pathx.
pax(1) will allow you to change the paths on extraction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2007 01:08 AM
06-28-2007 01:08 AM
Re: Tar extraction fails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2007 03:29 AM
06-28-2007 03:29 AM
Re: Tar extraction fails
Though its relative path is correct, when I extract it, as Patrick said, "the problem is that where you were specifying the /production/Y7P is where tar expects to find the files to extract. Since /production/Y7P doesn't exist in the tar file, it failed." That is /production wasn't in the paths in the tar file.
As a note... the reason why I said I could extract to other mount points is because the tar file I used to test this operation did not include relative paths, but a singl simple, since I didn't want to dump a sensitive tar file throughout the system.
As as second note... I'm pretty sure that GNU tar supports this sort of activity, and I think that was the source of my confusion.
Thanks for the help my hope is others may find this example useful.