If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Scripting ufsrestore

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-02, 00:14
reaper reaper is offline
Registered User
 
Join Date: Nov 2002
Posts: 6
Red face Scripting ufsrestore

I am trying to write a script for an unattended restore, however, now matter what I do, ufsrestore prompts for a volume number! Does anyone know how to pipe a response back in or any other way of getting around this.

The command I am using is;

ufsrestore xfs /dev/rmt/0hn 5 BATCHRES

I am trying to restore the folder and contents 'BATCHRES' to my current location. BATCHRES is on the 5th logigal tape, so I'm happy that is all correct, it's just that it prompts for a volume number!

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 11-06-02, 01:34
ladwig ladwig is offline
Registered User
 
Join Date: May 2002
Location: Osnabrueck Germany
Posts: 59
Hi,
if you try to give informations during running a shell for example:

ontape -a << eof

y
eof


This starts ontape -a and the next line just eob/enter
ontape the ask if tape is mounted
just a blank and return key answers
the next line y gives an answer for the next question
and eof the end
__________________
Juergen Ladwig
Reply With Quote
  #3 (permalink)  
Old 11-06-02, 01:37
reaper reaper is offline
Registered User
 
Join Date: Nov 2002
Posts: 6
Thumbs down

Hi Juergen,

I tried that;

ufsrestore xfs /dev/rmt/0hn 5 BATCHRES << EOI
1
y
q
EOI


Didn't work! Still asked for input!

Thanks anyway.

Last edited by reaper; 11-06-02 at 01:41.
Reply With Quote
  #4 (permalink)  
Old 11-06-02, 01:48
ladwig ladwig is offline
Registered User
 
Join Date: May 2002
Location: Osnabrueck Germany
Posts: 59
[QUOTE][SIZE=1]Originally posted by reaper
Hi Reaper,

what is the last letter from EOI ?
Should be EOF .
__________________
Juergen Ladwig
Reply With Quote
  #5 (permalink)  
Old 11-06-02, 11:09
WingMan WingMan is offline
Registered User
 
Join Date: Aug 2002
Location: UK
Posts: 87
How about ...

echo "My response" | ufsrestore xfs /dev/rmt/0hn 5 BATCHRES


??
Reply With Quote
  #6 (permalink)  
Old 11-06-02, 16:37
reaper reaper is offline
Registered User
 
Join Date: Nov 2002
Posts: 6
Hi Wingman,

Tried that to, still asks for input!

Thanks
Reply With Quote
  #7 (permalink)  
Old 11-06-02, 16:57
reaper reaper is offline
Registered User
 
Join Date: Nov 2002
Posts: 6
[QUOTE][SIZE=1]Originally posted by ladwig
Quote:
Originally posted by reaper
Hi Reaper,

what is the last letter from EOI ?
Should be EOF .
Hi Ladwig,

Tried it with the 'F' (eof) instead of 'I' (eoi), still doesn't work.

Thanks
Reply With Quote
  #8 (permalink)  
Old 11-06-02, 18:17
reaper reaper is offline
Registered User
 
Join Date: Nov 2002
Posts: 6
Talking Sorted it out!

Sorry Everyone! Discovered it was my impatience that was my downfall! The working script looks like this;

ufsrestore xfs /dev/rmt/0hn 5 BATCHRES << eof
1
y
q
eof

It just looks like its waiting for input. If you leave it long enough, the restore will complete and you will get the unix prompt back.

They say patience is a virtue, well maybe they were right!

Thanks all!

Last edited by reaper; 11-06-02 at 18:19.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On