You can back up data on one computer and restore the data
on a different computer. Importing a restore is useful for disaster
recovery or upgrading a database server. After you back up your data
and move over the storage-manager objects, you can perform an imported
restore. An imported restore involves copying files from the source
to the target computer and performing the restore in one of several
ways.
About this task
Important: Every chunk (including mirrors) must
match exactly in size, location, and offset on the source and target
computers for the imported restore to complete.
Procedure
To perform the imported restore:
- Install the database server and the storage manager on
the target computer.
- Set up the storage manager on the target database server
instance.
- Set the necessary environment variables.
- Define the same type of storage devices as on the source
instance.
- Label the storage media with the correct pool names.
- Mount the storage devices.
- Update the sm_versions file on
the target computer with the storage-manager version.
- Be sure that the target computer has the devices and links
in place for the chunks that match the devices and links on the source
computer
- Perform a level-0 backup (onbar -b or onbar
-b -w) of all storage spaces on the source database server.
Restriction: Do not perform an incremental backup.
-
If you are using HCL®
OneDB® Storage Manager , follow
these steps:
- Shut down the storage manager on both computers.
- Create a tar file of the storage-manager directories
on the source computer.
- Copy this tar file and unpack it on the target computer.
With other storage managers, you might be able to use backup
tapes or import the storage-manager directories over the network.
For more information, see your storage-manager documentation.
- Mount the transferred storage volumes.
- If the backup files are on disk, copy them from the source
computer to the target computer.
- If the backup is on tapes, mount the transferred volumes on
the storage devices that are attached to the target computer. Both
the source and target computers must use the same type of storage
devices such as 8-mm tape or disk.
- If the backup is on the backup server, retrieve the backup
from that backup server.
- Use storage-manager commands to add the source host name
as a client on the target computer.
- Copy the following files from the source computer to the
target computer.
Table 1. Administrative
files to copy
File |
Action |
Emergency boot file |
Rename the emergency boot file with the target
database server number. For example, rename ixbar.51 to ixbar.52.
The emergency boot file needs only the entries from the level-0 backup
on the source computer. The file name is ixbar.servernum. |
The oncfg files: oncfg_servername.servernum |
ON-Bar needs
the oncfg file to know what dbspaces to retrieve.
Rename the oncfg file with the target database
server name and number. For example, rename oncfg_bostonserver.51 to oncfg_chicagoserver.52.
The file name must match the DBSERVERNAME and SERVERNUM on the target
computer. |
The onconfig file |
In the onconfig file, update
the DBSERVERNAME and SERVERNUM parameters with the target database
server name and number. |
Storage-manager configuration files, if any |
The storage-manager configuration files might
need updating. |
- Restore the data in one of the following ways:
Table 2. Restore data options
Option |
Action |
If you did not start the HCL
OneDB instance
on the target server |
Use the onbar -r command
to restore the data. |
If you are importing a whole-system backup |
Use the onbar -r -w -p command
to restore the data. |
If you started the HCL
OneDB instance
on the target server. |
Restore the data in stages:
- Use the onbar -r -p command to restore the
physical data.
- Use the onbar -r -l command to restore the
logical logs.
This process avoids salvaging the logs and any potential corruption
of the instance. |
- Before you expire objects on the target computer and the
storage manager with the onsmsync utility, perform
one of the following tasks.
Otherwise, onsmsync expires
the incorrect objects.
- Manually edit the emergency boot file viz ixbar.servernum in
the $INFORMIXDIR/etc directory on the target
computer. Replace the HCL
OneDB server
name that is used on the source computer with the HCL
OneDB server
name of the target computer
- Run the onsmsync -b command as user informix on
the target computer to regenerate the emergency boot file from the sysutils database
only. The regenerated emergency boot file reflects the server name
of the target computer.