- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar command
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
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
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
тАО07-07-2004 02:49 AM
тАО07-07-2004 02:49 AM
We use hp-ux operating system in my organisation and i happen to be the system administrator. My question goes thus:
I backed up the entire system using the following command:
tar -cvf /dev/rmt/0m / ( / indicates the root directory which comprises all other directories). I want to restore a particular diretory (tps) which contains files and as well as directories. I dont know the command to use.
The full path of the directory i want to restore is /bm7test/bmpc/tps. This directory (tps) comtains directories as well as files.
I have used the following commands but did not work.
1. tar -xvf /dev/rmt/0m /bm7test/bmpc/tps
2. tar -xv /dev/rmt/0m /bm7test/bmpc/tps*
3. tar -xvf /dev/rmt/0m /bm7test/bmpc/tps/*
4. tar -xvf /dev/rmt/0m /bm7test/bmpc/tps*.*
I specified a single file from the tps directory and it was restored. This indicates that my tape is okay. I even listed the contents of the tape and it was okay.
I tried the above commands in tps directory as well as other directories but they did not work.
Please i need your help.
Regards
Grace
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 02:55 AM
тАО07-07-2004 02:55 AM
Re: tar command
For taking entire backup you should consider taking it with respect to Volume Groups. Ignite-UX is the best option to backup the root VG whereas fbackup/frecover are the most preffered one for backing up other VG's.
If you take backup of VG00 i.e. root VG it take's care of OS and it's configuration. While Data which normally resides in other VG can be backuped up using fbackup.
For taking backup of VG00 thr' Ignite:
# make_recovery -ACv -d /dev/rmt/0m
This will backup your entire VG00 volume group. Do not use tar for this.
For other VG see man FBACKUP/FRECOVER.
Please let us know if you need any more clarification.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 02:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 02:59 AM
тАО07-07-2004 02:59 AM
Re: tar command
Check whether Ignite UX is installed on your system, if not you can download the same from the link below..it's free.
For Ignite Administration DOc:
http://docs.hp.com/hpux/onlinedocs/B2355-90837/B2355-90837.html
For Ignite Download:
http://www.software.hp.com/products/IUX/download.html#N100DC
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 03:10 AM
тАО07-07-2004 03:10 AM
Re: tar command
tar xvf /dev/rmt/0m /bm7test/bmpc/tps
Are any symbolic links involved here?
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 03:27 AM
тАО07-07-2004 03:27 AM
Re: tar command
a detailing, if you use tar with /dev/rmt/0m as device you can omit the device especification:
To copy:
tar cv files (/dev/rmt/0m is the default device)
To restore:
tar xv files
Frank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 03:38 AM
тАО07-07-2004 03:38 AM
Re: tar command
I have answers to the questions
1. The Ignite UX is istalled
2. I did not specify the block size when backing up which means it will use defaulth block size.
The backup did not include system image but the files as listed below as it appears when typing bdf command. I used tar command and not make_recovery command as follows
tar -cvf /dev/rmt/0m /
1. /
2. /home
3. /var
4. /opt
5. /tmp
6. /stand
7. /dailybackup
8. /dailybackup
9. /databackup
10. /bm7live
11. /bm7test
The directory (tps)i want to restore is in /bmtest
and this is the full path /bm7test/bmpc/tps.
This tps contains directories as well as files.
Please help
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:03 AM
тАО07-07-2004 04:03 AM
Re: tar command
______________________________
rwxrwx--- 601/600 0 Mar 16 15:29 2004 /bm7test/bmpc/tps/
rwxrwx--- 601/600 0 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/
rw-rw---- 602/600 31395 Mar 16 16:33 2004 /bm7test/bmpc/tps/admin/recover.log
rw-rw---- 602/600 211 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/dmctl.out
rw-rw---- 602/600 2084 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/tdrun.out
rw-rw---- 602/600 1596 Mar 16 16:33 2004 /bm7test/bmpc/tps/admin/Td.trace
rw-rw---- 602/600 0 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/bgc010.out
rw-rw---- 602/600 610 Mar 16 19:06 2004 /bm7test/bmpc/tps/admin/Error.File
rwxrwxrwx 601/600 2626 Nov 26 10:13 2003 /bm7test/bmpc/tps/.profile
rw------- 601/600 3550 Jan 9 14:54 2004 /bm7test/bmpc/tps/.sh_history
rwxrwx--- 601/600 0 Jan 7 13:08 2004 /bm7test/bmpc/tps/config/
rwxrwx--- 601/600 24281 Oct 21 11:25 2003 /bm7test/bmpc/tps/config/bankmstr.td.
r7
rwxrwx--- 601/600 26937 Nov 26 19:08 2003 /bm7test/bmpc/tps/config/bankmstr.ddf
rwxrwx--- 601/600 8270 Nov 2 17:53 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.ftb
rwxrwx--- 601/600 7959 Mar 19 19:12 2004 /bm7test/bmpc/tps/config/bankmstr.cio
rwxrwx--- 601/600 20588 Mar 19 19:12 2004 /bm7test/bmpc/tps/config/bankmstr.td
rwxrwx--- 601/600 1685 Oct 21 11:50 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.r7
rwxrwx--- 601/600 20583 Oct 24 09:18 2003 /bm7test/bmpc/tps/config/bankmstr.td.
ftb
rwxrwx--- 601/600 24075 Nov 25 16:57 2003 /bm7test/bmpc/tps/config/bankmstr.td.
test
rwxrwx--- 601/600 6015 Nov 25 16:57 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.test
rwxrwx--- 601/600 6040 Nov 28 13:25 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.good
rwxrwx--- 601/600 24075 Nov 26 16:15 2003 /bm7test/bmpc/tps/config/bankmstr.td.
good
rw-rw---- 601/600 3619 Nov 26 16:25 2003 /bm7test/bmpc/tps/config/txt2
rwxrwx--- 601/600 8299 Jan 6 14:12 2004 /bm7test/bmpc/tps/config/bankmstr.cio
.org
rw-r----- 601/600 8670 Jan 7 12:13 2004 /bm7test/bmpc/tps/config/bankmstr.cio
.mike
rwxrwx--- 601/600 8445 Jan 7 12:26 2004 /bm7test/bmpc/tps/config/bankmstr.cio
.map
rwxrwx--- 602/600 0 Oct 21 11:28 2003 /bm7test/bmpc/tps/bin symbolic link t
o /bm7test/bmpc/bin
rwxrwx--- 602/600 0 Oct 21 11:28 2003 /bm7test/bmpc/tps/messages symbolic l
ink to /bm7test/bmpc/messages
rw-rw---- 602/600 4 Mar 16 15:29 2004 /bm7test/bmpc/tps/DMCTL.pid
rw-rw---- 602/600 4 Mar 16 15:29 2004 /bm7test/bmpc/tps/TDRUN.pid
rw-rw---- 602/600 4 Mar 16 15:29 2004 /bm7test/bmpc/tps/.td.pid
rwxrwx--- 601/600 1928 Oct 22 12:29 2003 /bm7test/bmpc/tps/tpginfo
rwxrwx--- 601/600 1034 Oct 23 12:34 2003 /bm7test/bmpc/tps/tpgstart
rwxrwx--- 601/600 2306 Oct 23 12:35 2003 /bm7test/bmpc/tps/tpgstop
rwxrwx--- 601/600 1614 Nov 25 18:38 2003 /bm7test/bmpc/tps/tpsmenu.sh
rw-rw---- 601/600 3619 Nov 26 16:33 2003 /bm7test/bmpc/tps/txt3
_____________________________________
Regards
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:08 AM
тАО07-07-2004 04:08 AM
Re: tar command
tar -xvf /dev/rmt/0m /bm7test/bmpc/tps
Tell us what kind of messages you get from the above command ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:20 AM
тАО07-07-2004 04:20 AM
Re: tar command
I dont really get any message. After some minutes atimes, 45 minutes, it will just return back to the prompt # without displaing any error message.
With my little knoweldge the files should be displaying as it is restoring because of v (verbose)option
Thank you
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:23 AM
тАО07-07-2004 04:23 AM
Re: tar command
Try this
# mt -t /dev/rmt/0mn rew
# mt -t /dev/rmt/0mn status
# tar -xvf /dev/rmt/0mn /bm7test/bmpc/tps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:41 AM
тАО07-07-2004 04:41 AM
Re: tar command
When issued the commands
tar -t /dev/rmt/0mn rew - it takes me back to the prompt
tar -t /dev/rmt/0mn status - it brings out error message mt:unknown command ``status``
Please help
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:45 AM
тАО07-07-2004 04:45 AM
Re: tar command
mt is an utility to manage tape drives (rewind, status, offline...)
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:46 AM
тАО07-07-2004 04:46 AM
Re: tar command
# mt -t /dev/rmt/0mn status
# tar -xvf /dev/rmt/0mn /bm7test/bmpc/tps
you are usign tar -t /dev/rmt/0mn status - use mt command and not tar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:58 AM
тАО07-07-2004 04:58 AM
Re: tar command
Thanks and please am waiting for the reply
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:02 AM
тАО07-07-2004 05:02 AM
Re: tar command
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:11 AM
тАО07-07-2004 05:11 AM
Re: tar command
mt -t /dev/rmt/0m rew - the tape was blinking for some seconds and they takes me back to #
mt -t /dev/rmt/0m status - gives me an error message mt: unknown command ``status``
Still waiting sirs
Thanks
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:12 AM
тАО07-07-2004 05:12 AM
Re: tar command
mt -f /dev/rmt/0mn status
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:13 AM
тАО07-07-2004 05:13 AM
Re: tar command
some clarification points:
using /dev/rmt/0m means rewindong tape at the end of operation
while /dev/rm/0mn means leave tape where it is at end of op
so except some special case, usually we use the first special /dev/rmt/0m (which is the default)
second point
when u exec the command
tar xvf /dev/rmt/0m
the tar will extract all files that EXACTLY begin with the string indicated
so, for instance, if u do
tar cvf /dev/rmt/0m /dir1
and /dir1 contains /dir1/a and /dir1/b
tar xvf /dev/rmt/0m /dir1 will extract both of them.
To be sure of what to use, in my opinion best way is to run
tar tvf /dev/rmt/0m | more
when you encounter the first directory from which you want start extraction stop the more (press space foe next page, q to exit) and copy EXACTLY what tar printed out
Anyway if you did
tar cvf /dev/rmt/0m /
the correct command should be
tar xvf /dev/rmt/0m /bm7test/bmpc/tps
One more thing, tar cannot change the restoring path, it means you cannot restore
/bm7test/bmpc/tps in /tmp/bm7test/bmpc/tps
this is why execing tar xvf /dev/rmt/0m / is not a good idea
better is to
cd /
tar xvf /dev/rmt/0m . (dot=current directory)
which would backup again the full file system with a relative path, allowing to restore in a different place
to go back to the problem, why don't you post a bit of output from the command tar tvf /dev/rmt/0m ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:21 AM
тАО07-07-2004 05:21 AM
Re: tar command
rwxrwx--- 601/600 0 Mar 16 15:29 2004 /bm7test/bmpc/tps/
rwxrwx--- 601/600 0 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/
rw-rw---- 602/600 31395 Mar 16 16:33 2004 /bm7test/bmpc/tps/admin/recover.log
rw-rw---- 602/600 211 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/dmctl.out
rw-rw---- 602/600 2084 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/tdrun.out
rw-rw---- 602/600 1596 Mar 16 16:33 2004 /bm7test/bmpc/tps/admin/Td.trace
rw-rw---- 602/600 0 Mar 16 15:29 2004 /bm7test/bmpc/tps/admin/bgc010.out
rw-rw---- 602/600 610 Mar 16 19:06 2004 /bm7test/bmpc/tps/admin/Error.File
rwxrwxrwx 601/600 2626 Nov 26 10:13 2003 /bm7test/bmpc/tps/.profile
rw------- 601/600 3550 Jan 9 14:54 2004 /bm7test/bmpc/tps/.sh_history
rwxrwx--- 601/600 0 Jan 7 13:08 2004 /bm7test/bmpc/tps/config/
rwxrwx--- 601/600 24281 Oct 21 11:25 2003 /bm7test/bmpc/tps/config/bankmstr.td.
r7
rwxrwx--- 601/600 26937 Nov 26 19:08 2003 /bm7test/bmpc/tps/config/bankmstr.ddf
rwxrwx--- 601/600 8270 Nov 2 17:53 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.ftb
rwxrwx--- 601/600 7959 Mar 19 19:12 2004 /bm7test/bmpc/tps/config/bankmstr.cio
rwxrwx--- 601/600 20588 Mar 19 19:12 2004 /bm7test/bmpc/tps/config/bankmstr.td
rwxrwx--- 601/600 1685 Oct 21 11:50 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.r7
rwxrwx--- 601/600 20583 Oct 24 09:18 2003 /bm7test/bmpc/tps/config/bankmstr.td.
ftb
rwxrwx--- 601/600 24075 Nov 25 16:57 2003 /bm7test/bmpc/tps/config/bankmstr.td.
test
rwxrwx--- 601/600 6015 Nov 25 16:57 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.test
rwxrwx--- 601/600 6040 Nov 28 13:25 2003 /bm7test/bmpc/tps/config/bankmstr.cio
.good
rwxrwx--- 601/600 24075 Nov 26 16:15 2003 /bm7test/bmpc/tps/config/bankmstr.td.
good
rw-rw---- 601/600 3619 Nov 26 16:25 2003 /bm7test/bmpc/tps/config/txt2
rwxrwx--- 601/600 8299 Jan 6 14:12 2004 /bm7test/bmpc/tps/config/bankmstr.cio
.org
rw-r----- 601/600 8670 Jan 7 12:13 2004 /bm7test/bmpc/tps/config/bankmstr.cio
.mike
rwxrwx--- 601/600 8445 Jan 7 12:26 2004 /bm7test/bmpc/tps/config/bankmstr.cio
.map
rwxrwx--- 602/600 0 Oct 21 11:28 2003 /bm7test/bmpc/tps/bin symbolic link t
o /bm7test/bmpc/bin
rwxrwx--- 602/600 0 Oct 21 11:28 2003 /bm7test/bmpc/tps/messages symbolic l
ink to /bm7test/bmpc/messages
rw-rw---- 602/600 4 Mar 16 15:29 2004 /bm7test/bmpc/tps/DMCTL.pid
rw-rw---- 602/600 4 Mar 16 15:29 2004 /bm7test/bmpc/tps/TDRUN.pid
rw-rw---- 602/600 4 Mar 16 15:29 2004 /bm7test/bmpc/tps/.td.pid
rwxrwx--- 601/600 1928 Oct 22 12:29 2003 /bm7test/bmpc/tps/tpginfo
rwxrwx--- 601/600 1034 Oct 23 12:34 2003 /bm7test/bmpc/tps/tpgstart
rwxrwx--- 601/600 2306 Oct 23 12:35 2003 /bm7test/bmpc/tps/tpgstop
rwxrwx--- 601/600 1614 Nov 25 18:38 2003 /bm7test/bmpc/tps/tpsmenu.sh
rw-rw---- 601/600 3619 Nov 26 16:33 2003 /bm7test/bmpc/tps/txt3
Regards
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:33 AM
тАО07-07-2004 05:33 AM
Re: tar command
tar xvf /dev/rmt/0m /bm7test/bmpc/tps
should recover all files starting from that path down
hope this helps