Simultaneous backup and restore by using standard I/O
To clone a database server or quickly set up High-Availability Data Replication (HDR), you can perform a simultaneous backup to standard output and restore from standard input. If you perform the backup and restore solely to duplicate a database server, use the -F option to prevent the archive from being saved.
On HDR, the secondary server can restore only level-0 archives.
To use standard I/O to perform the backup and restore, set the TAPEDEV configuration parameter to STDIO, or you can specify -t STDIO from the command line.
For example, if the TAPEDEV configuration parameter is set to STDIO, the following command loads data into the secondary server on an HDR pair (named secondary_host).
ontape -s -L 0 -F | rsh secondary_host "ontape -p"
In the next example, assume that the TAPEDEV configuration parameter is not set. The following command loads data into the secondary server of an HDR pair (named secondary_host):
The examples perform a fake level-0 archive of the database server on the local computer, pipe the data to the remote computer by using the rsh system utility, and perform a physical restore on the remote computer by reading the data directly from the pipe.
ontape -s -L 0 -F -t STDIO | rsh secondary_host "ontape -t STDIO -p"
Important: The previous examples require that the INFORMIXDIR, INFORMIXSERVER, INFORMIXSQLHOSTS, and ONCONFIG environment variables be set in the default environment for the user on the remote computer on which the command is executed. The user must be informix or root.