![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell Script to save/restore files and dir permissions | joangopan | Shell Programming and Scripting | 1 | 01-13-2009 10:48 AM |
| RESTORE 4.0.8-1 (RESTORE-DC branch) | iBot | Software Releases - RSS News | 0 | 01-29-2008 11:00 PM |
| RESTORE 4.0.0-1 (RESTORE-EE branch) | iBot | Software Releases - RSS News | 0 | 01-05-2008 05:30 AM |
| RESTORE 4.0.0 (RESTORE-DC branch) | iBot | Software Releases - RSS News | 0 | 12-25-2007 03:30 PM |
| not showing restore information while run script | happyv | Shell Programming and Scripting | 1 | 11-20-2007 04:05 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Restore Script
Hope I have posted this in the correct forum. I'm trying to recover some Oracle files from tape to setup an offsite recovery system. These files are nightly backdumps tar to tape.
I have recovered rootvg and vg01 from the weekends full backup, now to restore these nightly files I discovered I need to tar the device in nonrewind mode like this tar -xvf /dev/rmt0.1 This will restore the file into the current directory which I had setup for this process. The file will copy and will stop at the beginning of the next file, than using the history I reissue the tar command again. and again until the end of tape. What I'm looking for is if anyone has a script that I can run that will run tar -xvf /dev/rmt0.1 and keep rerunning that command until the end of tape, it probably will need to check and make sure the tape system is not currently busy or at the end of tape. If anyone has a script or knows someone who might have it I would greatly appreciate it. Thanks |
|
||||
|
If tar reads from tape sucessfully it returns a exit code of 0 (zero) if not it returns a non zero ( >0 )
After each tar check the exit code and if non zero end the loop. BETTER run some tests as I could not not..... ie tar -xvf /dev/rmt0.1 tar_exit=$? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|