Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2002
    Posts
    6

    Red face Unanswered: 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.

  2. #2
    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

  3. #3
    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 02:41.

  4. #4
    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

  5. #5
    Join Date
    Aug 2002
    Location
    UK
    Posts
    87
    How about ...

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


    ??

  6. #6
    Join Date
    Nov 2002
    Posts
    6
    Hi Wingman,

    Tried that to, still asks for input!

    Thanks

  7. #7
    Join Date
    Nov 2002
    Posts
    6
    [QUOTE][SIZE=1]Originally posted by ladwig
    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

  8. #8
    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 19:19.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •