- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Recover to another directory
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
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
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
03-06-2006 11:53 PM
03-06-2006 11:53 PM
I need to recover a tape backup to another directory.
# tar -tvf /dev/rmt/0m
rwxr-xr-x 102/102 0 Mar 6 03:33 2006 /u02/oradata/TESTE/backup/
rwxr-xr-x 102/102 0 Mar 6 03:35 2006 /u02/oradata/TESTE/backup/arch/
rw-r----- 102/102 89013248 Mar 2 03:35 2006 /u02/oradata/TESTE/backup/arch/ARCH_TESTE_290.ARC
rw-r----- 102/102 89330688 Mar 3 03:35 2006 /u02/oradata/TESTE/backup/arch/ARCH_TESTE_291.ARC
rw-r----- 102/102 89253888 Mar 4 03:35 2006 /u02/oradata/TESTE/backup/arch/ARCH_TESTE_292.ARC
rw-r----- 102/102 89113600 Mar 5 03:35 2006 /u02/oradata/TESTE/backup/arch/ARCH_TESTE_293.ARC
rw-r----- 102/102 88934400 Mar 6 03:35 2006 /u02/oradata/TESTE/backup/arch/ARCH_TESTE_294.ARC
rw-r----- 102/102 1056768 Mar 6 03:30 2006 /u02/oradata/TESTE/backup/cwmlite01.dbf
rw-r----- 102/102 15736832 Mar 6 03:30 2006 /u02/oradata/TESTE/backup/DRSYS01.DBF
rw-r----- 102/102 57679872 Mar 6 03:30 2006 /u02/oradata/TESTE/backup/EXAMPLE01.DBF
rw-r----- 102/102 26222592 Mar 6 03:30 2006 /u02/oradata/TESTE/backup/indx01.dbf
rw-r----- 102/102 20979712 Mar 6 03:30 2006 /u02/oradata/TESTE/backup/ODM01.DBF
rw-r----- 102/102 36716544 Mar 6 03:31 2006 /u02/oradata/TESTE/backup/oem_repository.dbf
rw-r----- 102/102 52436992 Mar 6 03:32 2006 /u02/oradata/TESTE/backup/safa.ora
rw-r----- 102/102 314580992 Mar 6 03:33 2006 /u02/oradata/TESTE/backup/system01.dbf
rw-r----- 102/102 41295872 Mar 6 03:33 2006 /u02/oradata/TESTE/backup/tools01.dbf
rw-r----- 102/102 209723392 Mar 6 03:33 2006 /u02/oradata/TESTE/backup/undotbs01.dbf
rw-r----- 102/102 52436992 Mar 6 03:33 2006 /u02/oradata/TESTE/backup/users01.dbf
rw-r----- 102/102 5251072 Mar 6 03:33 2006 /u02/oradata/TESTE/backup/XDB01.DBF
rw-r----- 102/102 1630208 Mar 6 03:33 2006 /u02/oradata/TESTE/backup/backup_controlfile.ctl
rw-r--r-- 102/102 3402 Dec 23 08:25 2005 /u02/oradata/TESTE/backup/backup_initTESTE.ora
The source directory is /u06. I used the command "tar -xvf /dev/rmt/0m" but it recover into /u02 directory. How I can do this?
Thanks,
Augusto
(Brazil)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 12:01 AM
03-07-2006 12:01 AM
Re: Recover to another directory
what you have on the tape is a absolute path tar. This means that the path where to restore the file is held for each file on the tape.
What you wanted was a relative tar, where dir path is relative to the location on restore i.e. ./oradata/TESTE
As far as I know there is no way to change the location were the files are restored to, all you can do is do the restore, possibly to a linked directory, and then copy the files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 12:06 AM
03-07-2006 12:06 AM
Solutionafter further checking there seem to be a way:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=192383
With pax, which can read tar files, you can change the location for restore.
man pax should provide further info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 12:15 AM
03-07-2006 12:15 AM
Re: Recover to another directory
Use 'pax' to snip the absolute path. Consider:
# tar /tmp/myarchive /tmp/f1 /tmp/f2
# mkdir /tmp/dummydir
# cd /tmp/dummydir
# pax -r -pm -s%/tmp/*%% -f /tmp/myarchive
The above sequence created a 'tar' archive with absolute path names for /tmp/f1 and /tmp/f2. The 'pax' execution restored 'f1' and 'f2' without the leading directory into /tmp/dummydir.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 03:10 AM
03-07-2006 03:10 AM
Re: Recover to another directory
# mkdir u06
# cd /u06
# pax -r -s ',^/u02/,,' -f /dev/rmt/0m -t
The pax command will put all files into current directory (/u06).