Source:Informix Restore: Difference between revisions
mNo edit summary |
(In progress.) |
||
Line 1: | Line 1: | ||
{{Copyright SEP AG|en}} | {{Copyright SEP AG|en}} | ||
{{Navigation_latest|release=4.4.3|link=[[Special:MyLanguage/Informix|Informix archive]]}} | {{Navigation_latest|release=[[Special:MyLanguage/SEP_sesam_Release_Versions|4.4.3/4.4.3 ''Grolar'']]|link=[[Special:MyLanguage/Informix|Informix archive]]}} | ||
==Overview== | ==Overview== | ||
Line 26: | Line 26: | ||
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | If you are using an older SEP sesam version, refer to [[Special:MyLanguage/Informix|Informix archive]]. | | style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | If you are using an older SEP sesam version, refer to [[Special:MyLanguage/Informix|Informix archive]]. | ||
|}</div> | |}</div> | ||
SEP sesam online backup for Informix (SIB) provides the Backup Services API (XBSA) between Informix and SEP sesam for saving data of Informix databases to the SEP sesam Server. XBSA specifies the access from Informix ON-Bar utility to a backup application. During backups and restores, ON-Bar uses XBSA to exchange data from specified storage spaces or logical-log files. SEP sesam manages the whole backup media, whereas ON-Bar decides which data has to be saved or recovered. | SEP sesam online backup for Informix (SIB) provides the Backup Services API (XBSA) between Informix and SEP sesam for saving data of Informix databases to the SEP sesam Server. XBSA specifies the access from Informix ON-Bar utility to a backup application. During backups and restores, ON-Bar uses XBSA to exchange data from specified storage spaces (dbspaces) or logical-log files. SEP sesam manages the whole backup media, whereas ON-Bar decides which data has to be saved or recovered. | ||
== {{anchor|onbar_restore}}Configuring ON-Bar restore== | == {{anchor|onbar_restore}}Configuring ON-Bar restore== | ||
During | During restore, the Informix ON-Bar utility provides the interface to the databases and performs extraction and insertion of the data. The shared XBSA library translates Informix names passed by ON-Bar into SEP sesam Server saveset for the retrieval from the SEP sesam Server's database and restoration to Informix. Note that you have to verify that the storage devices and files used in the backups are available for the restore. | ||
It is possible to restore backed up storage spaces (physical restore), logical-log files (logical restore), or both (combined restore). To perform an Informix restore, you have have to run '''<tt>onbar -r</tt>''' commands as a ''root'' user or an ''Informix'' user. | |||
or | |||
==={{anchor|physical}}Physical restore=== | ==={{anchor|physical}}Physical restore=== | ||
Physical restore replaces lost or corrupted storage spaces (permanent or temporary dbspaces, etc.) from the SEP sesam backup media. If a critical storage space is damaged because of a disk failure or corrupted data, Informix Dynamic Server (IDS) is taken offline. If the IDS is not taken offline, it is possible to restore any non-critical storage spaces. | Physical restore replaces lost or corrupted storage spaces (permanent or temporary dbspaces, etc.) from the SEP sesam backup media. If a critical storage space is damaged because of a disk failure or corrupted data, Informix Dynamic Server (IDS) is taken offline. If the IDS is not taken offline in such cases, it is possible to restore any non-critical storage spaces. | ||
setenv SESAM_SERVER jupiter | setenv SESAM_SERVER jupiter | ||
Line 65: | Line 47: | ||
==={{anchor|logical}}Logical restore=== | ==={{anchor|logical}}Logical restore=== | ||
It is possible to restore and roll forward the logical logs by using <tt>'''onbar -r -l'''</tt> command. Note that the logical restore applies only to those storage spaces that are already physically restored. | |||
SESAM_SERVER=jupiter | SESAM_SERVER=jupiter | ||
export SESAM_SERVER | export SESAM_SERVER | ||
onbar -r - | onbar -r -l | ||
==={{anchor|combined}}Combined restore=== | ==={{anchor|combined}}Combined restore=== | ||
Combined restores allow you to | Combined restores allow you to run a single command to perform a physical restore immediately followed by a logical restore. For finer control, use the '''<tt>onbar -b -l -s</tt>''' command to salvage the logs, then the '''<tt>onbar -r -p</tt>''' command to perform only a physical restore, and then the '''<tt>onbar -r -l</tt>''' command to perform only a logical restore. | ||
SESAM_SERVER=jupiter | SESAM_SERVER=jupiter | ||
Line 81: | Line 63: | ||
==={{anchor|point_in_time}}Point-in-time restore=== | ==={{anchor|point_in_time}}Point-in-time restore=== | ||
Point-in-time restores involve performing a whole-system, physical restore of Informix data from a whole-system-backup to a specific time (instead of default). A point-in-time restore is specified by including the <tt>-t</tt> option (time) in the <tt>onbar</tt> command. If you use this command, you must restore all storage spaces to the same point in time. | Point-in-time restores involve performing a whole-system, physical restore of Informix data from a whole-system-backup to a specific point in time (instead of default, which is the time of the last Informix backup). A point-in-time restore is specified by including the <tt>-t</tt> option (time) in the <tt>onbar</tt> command. If you use this command, you must restore all storage spaces to the same point in time. | ||
setenv SESAM_SERVER jupiter | setenv SESAM_SERVER jupiter | ||
onbar -r -t time -w -p | onbar -r -t time -w -p | ||
There are two different types of restore you can perform in dependence of IDS current operating mode (quiescent, online, or offline). If the server is in quiescent mode, or is online, you can perform a warm restore | There are two different types of restore you can perform in dependence of IDS current operating mode (quiescent, online, or offline). If the server is in quiescent mode, or is online, you can perform a '''warm restore'''. In this case you have to use the <tt>'''-O'''</tt> option to restore an online storage space). Otherwise, if the server is in offline mode, the restore operation is called a '''cold restore'''. | ||
For example, logical log: | For example, logical log: | ||
onbar -l -L 0 dbspace01 | onbar -l -L 0 dbspace01 | ||
=== {{anchor|command}}ON-Bar restore commands examples=== | |||
You must run the '''<tt>onbar -r</tt>''' command with the appropriate options to start a database or logical logs restore (by default, ON-Bar restores the latest backup): | |||
<ul><li>Complete restore of the database (cold restore)</li> | |||
onmode -ky - Database shutdown | |||
onbar -r -w - Restore of all data | |||
<li>Restore of the '''down''' dbspaces and corresponding logical logs (cold)</li> | |||
onbar -r | |||
<li>Restore of the '''down''' dbspaces without logical logs (cold)</li> | |||
onbar -r -p | |||
<li>Restore of single dbspaces</li> | |||
onbar -r <dbspace_name_1> <dbspace_name_2> | |||
<li>Logical logs restore (for dbspaces, wich have been restored physically)</li> | |||
onbar -r -l | |||
</ul> | |||
{{Note| | |||
<ul><li>If the chunk areas have been deleted, you have to use '''<tt>-O</tt>''' option. This forces the recreation of chunk files that no longer exist.</li> | |||
onbar -r ... -O | |||
<li>Occasionally no checkpoint is written because of the missing chunk. This can be avoided by using the command</li> | |||
onmode -O | |||
or by shutting down the database with a cold restore, as described in the first example above.</ul>}} | |||
For details on other <tt>onbar</tt> restore commands, see [https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.bar.doc/ids_bar_235.htm Restoring data with <tt>onbar</tt>]. | |||
==Known issues== | ==Known issues== | ||
Line 99: | Line 104: | ||
==External reference== | ==External reference== | ||
[https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.50.0/com.ibm.bar.doc/ids_bar_169.htm ON-Bar backup and restore system] | [https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.50.0/com.ibm.bar.doc/ids_bar_169.htm ON-Bar backup and restore system] – [https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.bar.doc/ids_bar_235.htm Restoring data with <tt>onbar</tt>] |
Revision as of 17:38, 18 October 2018
Copyright © SEP AG 1999-2024. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.
Overview
SEP sesam online backup for Informix (SIB) provides the Backup Services API (XBSA) between Informix and SEP sesam for saving data of Informix databases to the SEP sesam Server. XBSA specifies the access from Informix ON-Bar utility to a backup application. During backups and restores, ON-Bar uses XBSA to exchange data from specified storage spaces (dbspaces) or logical-log files. SEP sesam manages the whole backup media, whereas ON-Bar decides which data has to be saved or recovered.
Configuring ON-Bar restore
During restore, the Informix ON-Bar utility provides the interface to the databases and performs extraction and insertion of the data. The shared XBSA library translates Informix names passed by ON-Bar into SEP sesam Server saveset for the retrieval from the SEP sesam Server's database and restoration to Informix. Note that you have to verify that the storage devices and files used in the backups are available for the restore.
It is possible to restore backed up storage spaces (physical restore), logical-log files (logical restore), or both (combined restore). To perform an Informix restore, you have have to run onbar -r commands as a root user or an Informix user.
Physical restore
Physical restore replaces lost or corrupted storage spaces (permanent or temporary dbspaces, etc.) from the SEP sesam backup media. If a critical storage space is damaged because of a disk failure or corrupted data, Informix Dynamic Server (IDS) is taken offline. If the IDS is not taken offline in such cases, it is possible to restore any non-critical storage spaces.
setenv SESAM_SERVER jupiter setenv INFORMIXDIR /usr/informix setenv INFORMIXSQLHOSTS \$INFORMIXDIR/etc/sqlhosts setenv ONCONFIG onconfig.std
onbar -r -p
Logical restore
It is possible to restore and roll forward the logical logs by using onbar -r -l command. Note that the logical restore applies only to those storage spaces that are already physically restored.
SESAM_SERVER=jupiter export SESAM_SERVER onbar -r -l
Combined restore
Combined restores allow you to run a single command to perform a physical restore immediately followed by a logical restore. For finer control, use the onbar -b -l -s command to salvage the logs, then the onbar -r -p command to perform only a physical restore, and then the onbar -r -l command to perform only a logical restore.
SESAM_SERVER=jupiter export SESAM_SERVER onbar -r
Point-in-time restore
Point-in-time restores involve performing a whole-system, physical restore of Informix data from a whole-system-backup to a specific point in time (instead of default, which is the time of the last Informix backup). A point-in-time restore is specified by including the -t option (time) in the onbar command. If you use this command, you must restore all storage spaces to the same point in time.
setenv SESAM_SERVER jupiter onbar -r -t time -w -p
There are two different types of restore you can perform in dependence of IDS current operating mode (quiescent, online, or offline). If the server is in quiescent mode, or is online, you can perform a warm restore. In this case you have to use the -O option to restore an online storage space). Otherwise, if the server is in offline mode, the restore operation is called a cold restore.
For example, logical log:
onbar -l -L 0 dbspace01
ON-Bar restore commands examples
You must run the onbar -r command with the appropriate options to start a database or logical logs restore (by default, ON-Bar restores the latest backup):
- Complete restore of the database (cold restore) onmode -ky - Database shutdown onbar -r -w - Restore of all data
- Restore of the down dbspaces and corresponding logical logs (cold) onbar -r
- Restore of the down dbspaces without logical logs (cold) onbar -r -p
- Restore of single dbspaces onbar -r <dbspace_name_1> <dbspace_name_2>
- Logical logs restore (for dbspaces, wich have been restored physically) onbar -r -l
Note | |
|
For details on other onbar restore commands, see Restoring data with onbar.
Known issues
If you have problems with Informix, check the Troubleshooting Guide.
See also
Informix Backup – Informix Configuration
External reference
ON-Bar backup and restore system – Restoring data with onbar