sending enter key to backup process. - Aix

This is a discussion on sending enter key to backup process. - Aix ; HI, Hopefully someone can give me an idea on how to solve a backup issue I have. we run a backup and it now needs two tapes I want to automate the process to our ops via e-mail prompt or ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: sending enter key to backup process.

  1. sending enter key to backup process.

    HI,

    Hopefully someone can give me an idea on how to solve a backup issue I
    have. we run a backup and it now needs two tapes I want to automate
    the process to our ops via e-mail prompt or something. just want to
    get the logic in my script working.
    The backup command output the message to load another tape to standard
    error which I can capture in a pipe and get my ops to load a new tape
    but then how do I get the script to respond back to the backup
    process.

    backup -ivf /home 2>mypipe.fifo

    If you run this on a screen you can simply press the enter key just
    wondering how to the backup to try again when its running in a script?

    Any ideas appreciated.

    Regards

    Peter

  2. Re: sending enter key to backup process.

    peter.glover@dhl.com wrote:
    > HI,
    >
    > Hopefully someone can give me an idea on how to solve a backup issue I
    > have. we run a backup and it now needs two tapes I want to automate
    > the process to our ops via e-mail prompt or something. just want to
    > get the logic in my script working.
    > The backup command output the message to load another tape to standard
    > error which I can capture in a pipe and get my ops to load a new tape
    > but then how do I get the script to respond back to the backup
    > process.
    >
    > backup -ivf /home 2>mypipe.fifo
    >
    > If you run this on a screen you can simply press the enter key just
    > wondering how to the backup to try again when its running in a script?
    >
    > Any ideas appreciated.
    >


    Is the script running in the foreground of a terminal? The backup
    script I use sends its output to a file that I can look at and see any
    errors, including change tape. Once the tape is changed I just hit the
    enter key on the terminal and it continues. I am not sure how you do
    this if it was running as a cron job though.


    > Regards
    >
    > Peter


  3. Re: sending enter key to backup process.

    Hi Michael,

    Yes the task will be running on a cron so no terminal to hit return
    not quite sure how to get the process to try again? So essentially I
    want to send a response to the process to try the tape again once the
    ops have replaced it with second tape.

    Regards

    Peter


  4. Re: sending enter key to backup process.

    On May 21, 2:10 pm, peter.glo...@dhl.com wrote:
    > Hi Michael,
    >
    > Yes the task will be running on a cron so no terminal to hit return
    > not quite sure how to get the process to try again? So essentially I
    > want to send a response to the process to try the tape again once the
    > ops have replaced it with second tape.
    >
    > Regards
    >
    > Peter


    Its basicly a question of howto communicate with a process not
    attached to a terminal. Among other and might better solutions a
    simple approach would be the communication through a named pipe and
    assign stdin for your backup job to this pipe.

    Example:
    .....
    backup -ivf /home 2>mypipe.fifo .....

    Now your script has to send the appropiate command to the answer.fifo
    with a simple
    $ echo > answer.fifo

    Not tested
    cheers
    Hajo




+ Reply to Thread