RE: - RE: Question: IDS restore script (ontape) [1
Posted in 2008
Expect should do the job for you. To generate the expect script you
should run autoexpect. When using expect ensure to disable timeout as
ontape does not output anything while restoring from tape.
As an alternative to expect you can also attempt to use:
echo "" > response.out
echo "y" > response.out
echo "n" > response.out
echo "n" > response.out
ontape -r < response.out
Regards
Kenneth Penza
Systems Engineer
Systems and Database Services
Service Management Department
Malta Information Technology & Training Services Ltd
Please read our Legal Notice: http://emailpolicy.mitts.gov.mt
P
Please consider your environmental responsibility before printing this
e-mail.
END OF TEXT
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Marcus Haarmann
Sent: 23 January 2008 14:00
To: ids@iiug.org
Subject: [SPAM] - RE: Question: IDS restore script (ontape) [11065] -
Email found in subject
Hi,
I once tried something similar (sorry, I do not have the script any
more, was in a former company) and was successful by using the expect
utility.
Something like:
spawn ontape -r
expect "restore?"
send y\\\\r
expect "logs?"
send n\\\\r
Marcus
-----Original Message-----
From: DKasyanenko [mailto:DKasyanenko@yandex.ru]
Sent: Wednesday, January 23, 2008 1:31 PM
To: ids@iiug.org
Subject: Question: IDS restore script (ontape) [11064]
Hi, All!
I would like to create ontape based restore script without interactive.
I tried three ways:
1. echo '\\
y \\
n \\
n \\
' | ontape -r
2. ontape -r <<!
y
n
n
!
3. ontape -r <<EOF
y
n
n
EOF
The result was the same:
Please mount tape 1 on /bkpmnt/bkp/t1 and press Return to continue ...
Archive Tape Information
Tape type: Archive Backup Tape
Online version: IBM Informix Dynamic Server Version 9.40.FC7 Archive
date: Wed Jan 23 06:11:01 2008 User id: informix
...............................................
94 6 25 5000000 2925675 PO-B /app/informix/ids32/chunks/chunk6_16
95 2 25 1000000 974997 PO-B /app/informix/ids32/chunks/chunk2_2
Continue restore? (y/n)Do you want to back up the logs? (y/n)
And waiting! What I doing wrong?
What I need to do?
Any advice, please!
IDS 9.40.FC7
SunOS 5.10 Generic_118833-33 sun4v sparc sun4v
--
Best regards,
Dmitry Kasyanenko
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference The Power Conference for
Informix Professionals April 27 - 30, 2008 Marriott Overland Park
(Kansas City), Kansas http://www.iiug.org/conf Registration Now Open!!
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!