- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- restoring tar backup
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
тАО01-20-2008 04:02 AM
тАО01-20-2008 04:02 AM
restoring tar backup
I have a tar backup in tape. I want exclude some files and directories while restoring the tar backup. I cannot find a command for the same in the net. Expecting some gud solution from you people.
Sajith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2008 04:22 AM
тАО01-20-2008 04:22 AM
Re: restoring tar backup
assuming tar file is in the tape ( /dev/rmt/omn )
tar xvf /dev/rmt/0mn /path_of_the file
eg. you want to restore /tmp/myfile on the tape
then
tar xvf /dev/rmt/omn/ /tmp/myfile,
you can look at tape archive list by
tar tvf /dev/rmt/omn
Hasan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2008 05:12 AM
тАО01-20-2008 05:12 AM
Re: restoring tar backup
You could also list all of the files you want to restore by using "tv" as Hasan mentioned.
You could also use pax(1) to read your tarfile. It has a -c option to exclude patterns.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2008 11:44 AM
тАО01-20-2008 11:44 AM
Re: restoring tar backup
> net.
"man tar" would be my first resource.
> You could also use pax(1) [...]
Or GNU "tar":
[...]
--exclude=pattern
--exclude-from=file
[...]
http://www.gnu.org/software/tar/
http://www.gnu.org/software/tar/manual/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2008 05:07 AM
тАО01-21-2008 05:07 AM
Re: restoring tar backup
Sajith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2008 05:30 PM
тАО01-21-2008 05:30 PM
Re: restoring tar backup
http://docs.hp.com/en/B2355-60130/pax.1.html
You need:
$ pax -r -f /dev/rmt/0mn -c pattern ...
You can leave out the "-r" (for read) to see if your exclude patterns are correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2008 12:57 AM
тАО01-22-2008 12:57 AM
Re: restoring tar backup
you could perhaps use the -w option for tar, e.g.:
# tar -xvwf /dev/whatever/..
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2008 02:58 AM
тАО01-22-2008 02:58 AM
Re: restoring tar backup
That might work. But you may have to have a file with the appropriate number "y" and "n" to match which file is being restored. And would tar read from stdin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2008 04:28 AM
тАО01-22-2008 04:28 AM
Re: restoring tar backup
the -w option on the command line causes tar to prompt the user for each file in the archive.
(although I would have expected an -i option for something like that)
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2008 02:14 AM
тАО01-24-2008 02:14 AM
Re: restoring tar backup
my tar backup contains a lot of files and directories. I don't think it is possible to type n and y for these much files..
Sajith