- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Recove a file or directory from pax format make_ta...
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
Discussions
Discussions
Forums
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
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-15-2010 09:33 AM
тАО06-15-2010 09:33 AM
With Pax type = tar I used this method:
mt -f /dev/rmt/0mn rew
mt -f /dev/rmt/0mn fsf 22
tar xvf /dev/rmt/0mn filename
Thanks,
Ray
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2010 10:06 AM
тАО06-15-2010 10:06 AM
Re: Recove a file or directory from pax format make_tape_recovery archive
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2010 10:08 AM
тАО06-15-2010 10:08 AM
Re: Recove a file or directory from pax format make_tape_recovery archive
You still need to skip the LIF on the tape. Then, using relative paths:
# pax -v -r -x pax -f /dev/rmt/0mn ./somefile
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2010 11:24 AM
тАО06-15-2010 11:24 AM
Re: Recove a file or directory from pax format make_tape_recovery archive
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1274661906327+28353475&threadId=831209
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2010 11:52 AM
тАО06-15-2010 11:52 AM
SolutionA check of the manpages (always a good thing) shows that the '-x
# # pax -v -r -f /dev/rmt/0mn ./somefile
...would show:
USTAR format archive extended
./somefile
...where "extended" indicates a 'pax' format as opposed to the default 'tar' format which simply says "USTAR format archive".
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2010 12:08 PM
тАО06-15-2010 12:08 PM
Re: Recove a file or directory from pax format make_tape_recovery archive
To skip the LIF, I always need these two lines:
mt -f /dev/rmt/0mn rew
mt -f /dev/rmt/0mn fsf 22
To restore /etc/hosts as an example, what would be the proper syntax to restore it the original location?
pax -v -r -x pax -f /dev/rmt/0mn etc/hosts
Then to an alternate location / name?
pax -v -r -x pax -f /dev/rmt/0mn -s,etc/hosts,tmp/hosts.xyz
Is the -v required in either of these examples?
PS - I read the man pages and then decided a post on the forums was in order ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2010 01:46 PM
тАО06-15-2010 01:46 PM
Re: Recove a file or directory from pax format make_tape_recovery archive
Try a small file near the start first.
>what would be the proper syntax to restore it the original location?
>pax -v -r -x pax -f /dev/rmt/0mn etc/hosts
You would need to be in /.
>Then to an alternate location / name?
>pax -v -r -x pax -f /dev/rmt/0mn -s,etc/hosts,tmp/hosts.xyz
I would typically never rename the file, just its path. This is something you should try by creating a small pax archive and extract it. Also add -k to prevent overwrite. I was trying to extract to a different directory recently and messed up the -s option and destroyed the originals.
>Is the -v required in either of these examples?
No, that's for verbose output. Good to use while testing or only one file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2010 02:30 PM
тАО06-15-2010 02:30 PM
Re: Recove a file or directory from pax format make_tape_recovery archive
> Hi James, It takes forever to run a test
Then create a 'pax' archive in a directory of your choice and play with that:
# cd /tmp; pax -v -w -x pax -f /var/tmp/tmpstuff
# cd /var/tmp && pax -v -r -f /tmp/tmpstuff ./filename
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 11:37 AM
тАО06-16-2010 11:37 AM
Re: Recove a file or directory from pax format make_tape_recovery archive
The plan is to convert all my make_tape_recovery and make_net_recovery operations to -m pax format over time.
Aside from physical labeling, is there a reliable way to determine the Pax type used to create make_tape_recovery archives? Something similar to frecover -V perhaps?
Also, is there a graceful way to stop pax from reading to the end of a tape once it has recovered the files? These LTO-4's go on forever!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 11:48 AM
тАО06-16-2010 11:48 AM
Re: Recove a file or directory from pax format make_tape_recovery archive
> Aside from physical labeling, is there a reliable way to determine the Pax type used to create make_tape_recovery archives?
This is a bit crude, but you can list the archive (and then kill the process after the first few lines are output):
# pax -v -L -f /dev/rmt/0mn
If you see: "USTAR format archive extended" then you know that this is a 'pax' archive. If you see "USTAR format archive" *without* the string "extended", then you know that the 'pax' archive used a 'tar' format.
Regards!
...JRF...
"