restore through STDIO
Posted in 2022
chuan lu's ontape restore through STDIO failed with a read archive error. Replies (Hrvoje Zokovic, Gary McNair, Philip Yeh) said plain gunzip does not write to stdout; use gunzip -c or zcat. Marcus Haarmann suggested BACKUP_FILTER and RESTORE_FILTER, and Kirit Rana and David Williams suggested ifxclone, which needs manual cleanup.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore
HI,
I want to backup the instance and restore to another 3 instance.
1, I run the blow comand to do the backup.
ontape -s -L 0 -t STDIO | gzip >level-0.gzthen, I use scp copy the zip file to another machine.
2, I try to run below command to do the restore ,
chmod 660 level-0.gz
gunzip level-0.gz | ontape -p -t STDIO
it report below error messages.
Physical restore failed - function read archive backup failed code 1 errno 0
I already set the TAPEDEV and LTAPEDEV to STDIO.
any suggestions are welcome, thanks.
Lu chuan
------------------------------
chuan lu
------------------------------
#Informix
Since gunzip is just uncompressing file (and not producing any STDIO output), you should use -c switch to do stdout u compression:
gunzip -c level-0.gz | ontape -p -t STDIO
Also, you can use zcat command.
HTH
Hrvoje
------------------------------
Hrvoje Zokovic
------------------------------
Hi, use the BACKUP_FILTER and RESTORE_FILTER in config instead. This makes sense because you cannot forget any options when restoring (in a hurry ....). Make sure the options are correct for compressing/decompressing stdout/stdin. gzip needs -c argument or --stdout You can use gzip -d -c to decompress (we are using pigz because of better performance) MARCUS HAARMANN
gunzip FILENAME???? replaces the file with a decompressed equivalent; nothing is sent to standard out.
You need to use:
?? zcat FILENAME | ontape ...
--
Rob Newton
Mirrabooka Systems
Ph: +61 7 3857 7899
email:
robn@mirrabooka.com
web:
www.mirrabooka.com
Hello. Unless you are trying to create an RSS node on your cluster, I don't see any benefits in using zip/unzip. 1-huge cpu consumption in a serialized method. 2-your network link should be already a high speed to accomodate your primary load for HDR replication. 3-if you are dealing with RSS, use pigz or another parallel compress utility, but not zip. Hope that helps Alexandre Marini
Chuan Lu
What's wrong with
ifxclone
? if you are insistent on using
STDIO
, then this is what I have done in the past;
Create this backup script somewhere on your
source
server...
$ cat ~/myScripts/ontape_backup.sh
INFORMIXDIR=/opt/informix/informixdir
INFORMIXSERVER=mySourceServer
PATH=$PATH:$INFORMIXDIR/bin
export INFORMIXDIR INFORMIXSERVER PATH
ontape -s -L 0 -F -t STDIO | gzipIf this backup is
not
going to form part of your
scheduled
backups, then make it a
fake
backup so that
no
details of it are retained. Then on the
target
server...
$ onmode -ky
$ ssh <SourceServer> ~/myScripts/ontape_backup.sh |gunzip - |ontape -p -t STDIO; onmode -mThis is pretty much what other have already responded with.
------------------------------
Kirit Rana
------------------------------
Change the restore command to:
gunzip -c level-0.gz | ontape -p -t STDIO
------------------------------
Philip Yeh
------------------------------
HI, ifxclone can change the onconfig on the target instance E.g. it will turn off DIRECT_IO and can also change bufferpool entries! Regards, David. ------------------------------ David Williams ------------------------------
Hey David
Correct,
ifxclone
will
not
clean up after itself. It's a given that there will be an element of manual intervention once ifxclone has completed its work.
I think
DBSERVERALIASESis also unset, but don't quote me on that. The
sqlhosts
file will need attention as well.
------------------------------
Kirit Rana
------------------------------