Using Pax command (283 Views)
Reply
Occasional Advisor
dx12180
Posts: 11
Registered: ‎04-10-2013
Message 1 of 3 (283 Views)
Accepted Solution

Using Pax command

[ Edited ]

I want to learn how to extract just a single file from my tapes using the pax command. As of right now I have been using these command to write, list, and recover my data but am not sure how to just recover one file or directory from the back up tape. Does any one have any solution.

 

 

 

- Back up your files system

 

pax -vwf /dev/rmt/0m /home

 

- List the items on the disk

 

pax -f /dev/rmt/0m -v

 

- Extract your files from the disk

 

pax -r -pe -f /dev/rmt/0m

 

 


P.S. This thread has been moved  from Your Questions Regarding ITRC Forums (Legacy ITRC forum) to HP-UX > sysadmin - HP Forums Moderator

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,697
Registered: ‎03-06-2006
Message 2 of 3 (271 Views)

Re: Using pax command (to restore files)

>not sure how to just recover one file or directory from the back up tape.

>pax -v -f /dev/rmt/0m # List the items on the tape

 

You look at the output of the listing above and use that name.  If you want /home/foo/bar.out and directory /home/foo/SUB1:

pax -r -v -pe -f /dev/rmt/0m /home/foo/bar.out /home/foo/SUB1

 

Since you used an absolute path to store the files, you will get the files back in the same path unless you use the -s option:

pax -r -v -k -pe -f /dev/rmt/0m -s:/home/foo/:: /home/foo/bar.out /home/foo/SUB1

 

Use -k to make sure you have your -s patterns correct.  Also use a small archive to disk to make sure you are familiar with the options.

Please use plain text.
Occasional Advisor
dx12180
Posts: 11
Registered: ‎04-10-2013
Message 3 of 3 (222 Views)

Re: Using pax command (to restore files)

Thanks will monkey around with it and let you know!
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation