- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to recovery the specify file?
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
05-22-2002 04:50 PM
05-22-2002 04:50 PM
Can you help me?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 05:05 PM
05-22-2002 05:05 PM
SolutionWith the tar command you have used to create the tar archive (tar cvf xxx.tar /xxx) I see no easy way to extract it directly to /yyy/aaa.
Using the hpux version of tar command extracting the file "tar xvf xxx.tar /xxx/aaa/bbb.pl" will be keeping with the leading / so you won't be able to restore it elsewhere.
What I would suggest is to create the tar file with the following command:
cd /xxx; tar cvf ../xxx.tar .
This will create a tar file with all the files in the current directory which is now /xxx because of the cd.
Now to extract the file you just need to cd in the /yyy directory and then execute the following tar command:
tar xvf /xxx.tar ./aaa/bbl.pl
Note that now your files are prefixed with ./ instead of /xxx/ this way they could be extracted in the current directory.
regards
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 05:10 PM
05-22-2002 05:10 PM
Re: how to recovery the specify file?
cd /somedirectory
tar cvf /dev/rmt/XXX somefile
Now you can cd to a different directory and restore the file. tar provides no option to override the path saved with the file. You might to look at fbackup for a more fully featured backup tool.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 05:10 PM
05-22-2002 05:10 PM
Re: how to recovery the specify file?
If you have created the tar file using absolute path names you will not be able to.
You can if you created the file in the relative directory
tar cvf
Regards
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 05:16 PM
05-22-2002 05:16 PM
Re: how to recovery the specify file?
To recover a file from the tar tape:
If the tar archive has been backed using
absolute path names then tar will want to
restore it to the same directory.
You have two options.
1. Recover the file to a different system.
2. Move the existing file to another file
name and then recover it from tape using
# tar xvf /dev/rmt/0m /xxx/filename (substitute you your tape device)
If you must use 'tar' always backup with
using the ./directory instead of /directory
HTH
~Michael~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 05:54 PM
05-22-2002 05:54 PM
Re: how to recovery the specify file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 06:14 PM
05-22-2002 06:14 PM
Re: how to recovery the specify file?
I notice you are a new member of the forums
You can assign points to your replies by clicking on the 'assign points' tab
A pleasure to help you
Regards
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 10:47 PM
05-22-2002 10:47 PM
Re: how to recovery the specify file?
Hi,
Here is a method you may use. It may be useful
if you receive a tar-tape written with
absolute path:
1- Logon as root
2- cd to directory : cd /newdir
3- cp tar to newdir
cp /sbin/tar /newdir
It is important that you copy
/sbin/tar and not /usr/bin/tar as
/sbin/tar does not depend on shared
libs
4- make sure about tar owner
and group : chown bin:bin tar
5- copy the device-file /dev/rmt/0m /newdir
6- chroot /newdir tar xvf 0m
will copy all files and the directory
structure to /newdir
Regards
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 10:48 PM
05-22-2002 10:48 PM
Re: how to recovery the specify file?
Regards,