- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Tar backup on HP-UX
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
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
тАО02-16-2010 12:54 AM
тАО02-16-2010 12:54 AM
Tar backup on HP-UX
I am unable to extract tar backup from tape drive. Please find the putty output below and suggest:-
# mt -f /dev/rmt/c0t0d0BESTnb status
Drive: HP Ultrium 3-SCSI
Format:
Status: [41114400] BOT online compression immediate-report-mode
File: 0
Block: 0
# tar cvf /dev/rmt/c0t0d0BESTnb /tmp/test
a /tmp/test/docdev.text 1 blocks
a /tmp/test/2swlist_product.txt 1 blocks
a /tmp/test/docdevio.text 35 blocks
a /tmp/test/nickel 156 blocks
a /tmp/test/getsysinfo.sh 44 blocks
a /tmp/test/nickel.docdev.tar.gz 1039 blocks
# mt -f /dev/rmt/c0t0d0BESTnb rewind
# tar tvf /dev/rmt/c0t0d0BESTnb
rwxrwxrwx 0/3 0 Feb 16 13:23 2010 /tmp/test/
rw-rw-rw- 0/3 52 Aug 25 17:04 2009 /tmp/test/docdev.text
rw-rw-rw- 0/3 512 Aug 25 11:30 2009 /tmp/test/2swlist_product.txt
rw-rw-rw- 0/3 17828 Aug 25 17:06 2009 /tmp/test/docdevio.text
rwxr-xr-x 0/3 79452 Jun 6 17:08 2006 /tmp/test/nickel
rwxr-xr-x 0/3 22213 Mar 12 12:22 2009 /tmp/test/getsysinfo.sh
rw-rw-rw- 0/3 531485 Sep 29 12:18 2009 /tmp/test/nickel.docdev.tar.gz
rwxrwxrwx 0/3 0 Feb 16 13:23 2010 /tmp/test/testbk/
# pwd
/tmp/EMC
# mt -f /dev/rmt/c0t0d0BESTnb rewind
# mt -f /dev/rmt/c0t0d0BESTnb status
Drive: HP Ultrium 3-SCSI
Format:
Status: [41114400] BOT online compression immediate-report-mode
File: 0
Block: 0
# pwd
/tmp/EMC
# ll
total 16
drwxr-xr-x 7 root root 8192 Apr 22 2009 emcgrab
# tar xvf /dev/rmt/c0t0d0BESTnb
x /tmp/test/docdev.text, 52 bytes, 1 tape blocks
x /tmp/test/2swlist_product.txt, 512 bytes, 1 tape blocks
x /tmp/test/docdevio.text, 17828 bytes, 35 tape blocks
x /tmp/test/nickel, 79452 bytes, 156 tape blocks
x /tmp/test/getsysinfo.sh, 22213 bytes, 44 tape blocks
x /tmp/test/nickel.docdev.tar.gz, 531485 bytes, 1039 tape blocks
# pwd
/tmp/EMC
# ls
emcgrab
# ll
total 16
drwxr-xr-x 7 root root 8192 Apr 22 2009 emcgrab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2010 01:24 AM
тАО02-16-2010 01:24 AM
Re: Tar backup on HP-UX
Well, it seem you have extract some files without any problems. You don't have errors so perhaps you have them in
ll /tmp/test/
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2010 01:52 AM
тАО02-16-2010 01:52 AM
Re: Tar backup on HP-UX
Kindly look carefully. There is no any file in pwd and there is "x" sign while extracting files using tar -xvf command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2010 04:05 AM
тАО02-16-2010 04:05 AM
Re: Tar backup on HP-UX
Please provide the absolute path while restoring data
Regards
Sanjeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2010 06:10 AM
тАО02-16-2010 06:10 AM
Re: Tar backup on HP-UX
The files got restored to the /tmp/test directory. They did NOT get restored to your current directory. That's not how tar works.
Try these commands:
# cd /tmp/test
# tar cvf /dev/rmt/c0t0d0BESTnb .
rewind the tape if you want
do the 'tar tvf' if you want
# cd /tmp/EMC
# tar xvf /dev/rmt/c0t0d0BESTnb
Now check /tmp/EMC and you will probably see files there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2010 06:13 AM
тАО02-16-2010 06:13 AM
Re: Tar backup on HP-UX
x /tmp/test/docdev.text, 52 bytes, 1 tape blocks
means that the file was extracted from tape.
If there is an 'a' in the first position it means it was archived to tape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2010 06:14 AM
тАО02-16-2010 06:14 AM
Re: Tar backup on HP-UX
"pwd" is a command, not a directory.
No files are extracted into your current
working directory because you specified an
absolute path ("/tmp/test") when you created
the archive. Thus, when you extracted the
files in the usual way, "tar" put them where
the paths in the archive told it to put them.
For example:
x /tmp/test/docdev.text
If you would like to extract the files to a
different path, then use a relative path when
you create the archive. For example:
( cd /tmp/test ; tar cf /dev/rmt/c0t0d0BES . )
Notice the difference in the paths in the
archive. ("tar tv" can be useful, too.)
cd /tmp/EMC
mt [...]
tar xfv /dev/rmt/c0t0d0BES
Note that "pax" and GNU "tar" offer options
which would let you override the paths stored
in the archive, but, if you're making the
archive yourself, it's easy to do it so that
any "tar"-like program can extract the files
to any desired destination.
> Please provide the absolute path while
> restoring data
How, exactly, would suggest that one do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2010 07:17 AM
тАО02-16-2010 07:17 AM
Re: Tar backup on HP-UX
To get a relative path, you can also use -C directory:
tar -cvf /dev/rmt/c0t0d0BESTnb -C /tmp/test .
>Sharma: Please provide the absolute path while restoring data
>Steven: How would suggest that one do that?
Well, with pax's -s option to rename the file paths. :-)