How do you run an ontape imported restore?
How do you use ontape to copy an instance to another machine?
How do you use ontape to copy a database server to another machine?
An imported restore is described as using an archive from one database server to restore it on a different database server. When performing an imported restore, the database server where the archive is taken is referred to as the source and the database server where the restore will take place is referred to as the target.
An imported restore can be done only when:
- the version of IBM® Informix® Dynamic Server™ (IDS) is the same on the target and the source
- the version of the operating system is the same on the target and the source
- you can take a backup on HP PA-RISC and restore it on HP Itanium
- you cannot take a backup from Solaris and restore it on AIX
To perform an imported restore using ontape:
1. Take a level 0 ontape archive on the source by typing this command at the command prompt:
ontape -s -L 0
Note that the 0 in -L 0 is a zero.
2. Copy the ONCONFIG configuration file from the directory $INFORMIXDIR/etc on the source to the directory $INFORMIXDIR/etc on the target.
If needed, you can change TAPEDEV in the onconfig file but no other changes should be made. In particular, the SERVERNUM, DBSERVERNAME, and DBSERVERALIASES values must not be changed.
Configuration changes can be made normally after the restore has been completed.
3. Recreate all chunks that exist on the source, on the target. The chunks on the target must have the same paths and names as the chunks on the source. In IDS version 10.x and higher there is an option to rename the chunks using the ontape -rename functionality described here:
To get a list of all chunks on the source run
onstat -d on the source. Look at the Chunks section of the
onstat -d output.
In the onstat -d output below there is only one chunk. The full path for the chunk is /home/tech/grantf/gf940/rootdbs. This means /home/tech/grantf/gf940/rootdbs must be created on the target.
The chunk pathnames on the target may be links to other files or devices if you wish.
4. Set up sqlhosts and your environment on the target. The port number or service name in the sqlhosts file can be different from the original. The hostname in the sqlhosts file must be changed to match the target computer.
5. Restore the level 0 archive from the source on the target using this command: