Source:Informix Backup: Difference between revisions

From SEPsesam
mNo edit summary
(In progress.)
Line 1: Line 1:
{{Copyright SEP AG‎|en}}
<div class="noprint">{{Copyright SEP AG‎|en}}


{{Navigation_latest|release=4.4.3|link=[[Special:MyLanguage/Informix|Informix archive]]}}
{{Navigation_latest|release=[[SEP_sesam_Release_Versions|4.4.3/4.4.3 ''Grolar'']]|link=[[Special:MyLanguage/Informix|Informix archive]]}}</div><br />


==Overview==
==Overview==
Line 25: Line 25:
| rowspan="2" style="padding:0px 10px 0px;" | [[File:icon_archived_docs.png|45px|link=Special:MyLanguage/Informix|Informix]]
| rowspan="2" style="padding:0px 10px 0px;" | [[File:icon_archived_docs.png|45px|link=Special:MyLanguage/Informix|Informix]]
| 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><span style="font-size:92%; line-height: 1.3em; color:grey;">This article describes Informix integration key features and backup configuration. For detailed information on prerequisites and installation requirements, see [[Special:MyLanguage/4_4_3:Informix_Configuration|Informix Configuration]].</span>
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 Informix data 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 the data from specified storage spaces (dbspaces) or logical-log files. SEP sesam manages the whole storage media, whereas ON-Bar decides which data has to be saved or recovered. For details on Informix concepts and utilities, see [https://www.ibm.com/support/knowledgecenter/en/SSGU8G/welcomeIfxServers.html IBM Informix documentation].  


== {{anchor|backup_task}}Creating a backup task==
== {{anchor|bck_task}}Creating a backup task==


During a backup (or restore), the ON-Bar utility controls the data streams. This utility must be integrated with a SEP sesam Server to access the storage devices.
During a backup (or restore), the ON-Bar utility controls the data streams. This utility must be integrated with a SEP sesam Server to access the storage devices.
Line 34: Line 34:
Create a new backup task for the Informix server.
Create a new backup task for the Informix server.
<ol><li>From '''Main Selection''' -> '''Tasks''' -> '''By clients''', select Informix client and click '''New backup task'''. The ''New backup task window'' opens.</li>
<ol><li>From '''Main Selection''' -> '''Tasks''' -> '''By clients''', select Informix client and click '''New backup task'''. The ''New backup task window'' opens.</li>
<li>Specify the '''Source''' as Informix instance. The instance should map to the instance which is used during ON-Bar backup command. By selecting the source, the ''backup type'' and ''task name'' are set automatically.<br />
<li>Specify the '''Source''' as Informix instance. The instance should map to the instance which is used during <tt>onbar</tt> backup command. You can either browse for the databases that you want to include in the backup or enter their names followed by a comma. Note that by browsing the source (not entering it manually), the ''task type'' and ''task name'' are set automatically.<br />
Click '''OK''' to create the task.</li>
Click '''OK''' to create the task.</li>
[[image:Informix_bck_task.png|left|link=]]
[[image:Informix_bck_task_Grolar.jpg|link=]]
<br clear=all>
<br clear=all>
</ol>
</ol>
Line 47: Line 47:


;<tt>INFORMIXDIR</tt>: Set by Informix installation.
;<tt>INFORMIXDIR</tt>: Set by Informix installation.
;<tt>SESAM_SERVER</tt>: <tt><Name of SEP sesam Server></tt>
;<tt>SESAM_SERVER</tt>=<tt><SEP sesam Server name></tt>
;<tt>SESAM_JOB</tt>:<tt><Jobname of Informix backup></tt>: Name of an already configured task on the SEP sesam Server with the task type ''Informix''.
;<tt>SESAM_JOB</tt>=<tt><Informix backup task name></tt>: Name of an already configured backup task on the SEP sesam Server which you had to create earlier.
;<tt>SESAM_POOL</tt>:<tt><Media pool name></tt>: Name of an already configured media pool on the SEP sesam Server.
;<tt>SESAM_POOL</tt>=<tt><Media pool name></tt>: Name of an already configured media pool on the SEP sesam Server.


'''Optional parameters'''
'''Optional parameters'''


;<tt>XBSA_TRACE</tt>:<tt><Trace level></tt> (0|1|2): If set with +10000000, then process logs to <tt>STDERR</tt>, e.g., <tt>'set XBSA_TRACE=10000002'</tt>.
;<tt>XBSA_TRACE</tt>=<tt><Trace level></tt> (0|1|2): If set with +10000000, then process logs to <tt>STDERR</tt>, e.g., <tt>'set XBSA_TRACE=10000002'</tt>.
;<tt>XBSA_LOGFILE</tt>:<tt><Name of trace file></tt>
;<tt>XBSA_LOGFILE</tt>:<tt><Name of trace file></tt>


{{Note|Although <tt>XBSA_TRACE</tt> and <tt>XBSA_LOGFILE</tt> are not mandatory, they should be set to get information in case of problems during the backup or restore. For a restore only <tt>SESAM_SERVER</tt> and <tt>SESAM_JOB</tt> are mandatory.}}
{{Note|Although <tt>XBSA_TRACE</tt> and <tt>XBSA_LOGFILE</tt> are not mandatory, they should be set to get information in case of problems during the backup or restore. For the restore only <tt>SESAM_SERVER</tt> and <tt>SESAM_JOB</tt> are mandatory.}}


== {{anchor|onbar_backup}}Configuring ON-Bar backup==
== {{anchor|onbar_backup}}Configuring ON-Bar backup==


During a backup, the Informix ON-Bar utility provides the interface to the databases and performs extraction and insertion of the data. You must run an '''<tt>onbar</tt>''' command to start a database backup.
During backup, the Informix ON-Bar utility provides the interface to the databases and performs extraction and insertion of the data. You must run the '''<tt>onbar</tt>''' command to start a database or logical logs backup as an ''Informix'' or a ''root'' user.
{{Note|You have to check the return code of the <tt>onbar</tt>, because <tt>onbar</tt> does not write error messages to <tt>STDERR</tt> (standard error output).}}
{{Note|You have to check the <tt>onbar</tt> return code, because <tt>onbar</tt> does not write error messages to <tt>STDERR</tt> (standard error output). For details on the return codes, see [https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.70.0/com.ibm.bar.doc/ids_bar_298.htm ON-Bar messages and return codes].}}
The following examples show, how can you start a backup on the Informix server.
The following examples show, how to start backups on the Informix server.
<ul><li>Backup of the tablespace <tt>dbspace01</tt>:</li>
<ul><li>Backup of the tablespace <tt>dbspace01</tt>:</li>
  informix@linux:/opt/informix/> export SESAM_SERVER=backupsrv
  informix@linux:/opt/informix/> export SESAM_SERVER=backupsrv
Line 71: Line 71:
  0
  0
  informix@linux:/opt/informix/>
  informix@linux:/opt/informix/>
<ul><li>The commands shown in the following example: Perform a backup level <tt>'''0'''</tt> of the '''<tt>dbspace01</tt>''' on an OnLine Dynamic Server instance named '''<tt>venus</tt>'''. Back up all logical log files associated with '''<tt>dbspace01</tt>''', close the session and then back up the current logical log.</li>
<ul><li>The commands shown in the following example:</li>
Perform a backup level <tt>'''0'''</tt> of the '''<tt>dbspace01</tt>''' on an OnLine Dynamic Server instance named '''<tt>venus</tt>'''. Back up all logical-log files associated with '''<tt>dbspace01</tt>''', close the session and then back up the current logical log.


  setenv SESAM_SERVER jupiter  
  setenv SESAM_SERVER jupiter  
Line 83: Line 84:
<li>The [http://download.sep.de/extensions/databases/informix/windows/ SEP sesam extension for Informix] (Windows, ZIP archive) contains the <tt>sbc_onbar.cmd</tt> command, which is suitable to back up Informix instances from the SEP sesam command events by adapting <tt>INFORMIX_...</tt> and <tt>SESAM_...</tt> values. The arguments are transfered to <tt>onbar</tt> command and typical calls are <tt>sbc_onbar.cmd -b -L 0</tt>, or <tt>sbc_onbar.cmd -v</tt>.</li></ul>
<li>The [http://download.sep.de/extensions/databases/informix/windows/ SEP sesam extension for Informix] (Windows, ZIP archive) contains the <tt>sbc_onbar.cmd</tt> command, which is suitable to back up Informix instances from the SEP sesam command events by adapting <tt>INFORMIX_...</tt> and <tt>SESAM_...</tt> values. The arguments are transfered to <tt>onbar</tt> command and typical calls are <tt>sbc_onbar.cmd -b -L 0</tt>, or <tt>sbc_onbar.cmd -v</tt>.</li></ul>


=== {{anchor|backup_task}}ON-Bar commands===
=== {{anchor|command}}ON-Bar commands===


The <tt>onbar</tt> commands for backing up the database:
You have to use a relevant <tt>'''onbar -b'''</tt> command to back up storage spaces (dbspaces) or logical logs.
*Complete backup of the database (if necessary start the database with <tt>oninit -v</tt>)
<ul><li>Complete backup of the database (if necessary, start the database with <tt>'''oninit -v'''</tt> command)</li>


  onbar -b -w  [-L n]
  onbar -b -w  [-L n]
  n - Backup Level (0, 1, 2), default is 0.
  n - Backup level (0, 1, 2), default is 0.


*Backup of a single dbspace
<li>Backup of a single dbspace</li>


  onbar -b [-L n]  
  onbar -b [-L n]  
  n - Backup Level (0, 1, 2), default is 0.
  n - Backup level (0, 1, 2), default is 0.
  dbspace_name - Name of the Informix dbspace instance
  dbspace_name - Name of the Informix dbspace instance
*Logical logfiles backup
onbar -b -l    - Backup of all full logical logfiles
onbar -b -l -c  - Backup of the actual logical logfiles and switch to the next logical logfile.
onbar -b -l -s  - Backup of all logical logs, which reside on the hard disk after a crash of the database.


<li>Logical-log files backup</li>
onbar -b -l    - Backup of all full logical-log files
onbar -b -l -c  - Backup of the actual logical-log files and switch to the next logical-log file.
onbar -b -l -s  - Backup of all logical logs, which reside on the hard disk after a crash of the
database.
</ul>
<div class="noprint">
==Known issues==
==Known issues==
If you have problems with Informix, check the [[Special:MyLanguage/Troubleshooting_Guide#Informix|Troubleshooting Guide]].
If you have problems with Informix, check the [[Special:MyLanguage/Troubleshooting_Guide#Informix|Troubleshooting Guide]].
Line 108: Line 113:


==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]</div>

Revision as of 15:23, 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.

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3/4.4.3 Grolar. For previous documentation version(s), check Informix archive.


Overview

This article describes Informix integration key features and backup configuration. For detailed information on prerequisites and installation requirements, see Informix Configuration.

SEP sesam online backup for Informix (SIB) provides the Backup Services API (XBSA) between Informix and SEP sesam for saving Informix data 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 the data from specified storage spaces (dbspaces) or logical-log files. SEP sesam manages the whole storage media, whereas ON-Bar decides which data has to be saved or recovered. For details on Informix concepts and utilities, see IBM Informix documentation.

Creating a backup task

During a backup (or restore), the ON-Bar utility controls the data streams. This utility must be integrated with a SEP sesam Server to access the storage devices.

Create a new backup task for the Informix server.

  1. From Main Selection -> Tasks -> By clients, select Informix client and click New backup task. The New backup task window opens.
  2. Specify the Source as Informix instance. The instance should map to the instance which is used during onbar backup command. You can either browse for the databases that you want to include in the backup or enter their names followed by a comma. Note that by browsing the source (not entering it manually), the task type and task name are set automatically.
    Click OK to create the task.
  3. Informix bck task Grolar.jpg

Configuring Informix

To give ON-Bar the necessary information to connect to SEP sesam, set the following environment variables:

Mandatory parameters

INFORMIXDIR
Set by Informix installation.
SESAM_SERVER=<SEP sesam Server name>
SESAM_JOB=<Informix backup task name>
Name of an already configured backup task on the SEP sesam Server which you had to create earlier.
SESAM_POOL=<Media pool name>
Name of an already configured media pool on the SEP sesam Server.

Optional parameters

XBSA_TRACE=<Trace level> (0|1|2)
If set with +10000000, then process logs to STDERR, e.g., 'set XBSA_TRACE=10000002'.
XBSA_LOGFILE
<Name of trace file>
Information sign.png Note
Although XBSA_TRACE and XBSA_LOGFILE are not mandatory, they should be set to get information in case of problems during the backup or restore. For the restore only SESAM_SERVER and SESAM_JOB are mandatory.

Configuring ON-Bar backup

During backup, the Informix ON-Bar utility provides the interface to the databases and performs extraction and insertion of the data. You must run the onbar command to start a database or logical logs backup as an Informix or a root user.

Information sign.png Note
You have to check the onbar return code, because onbar does not write error messages to STDERR (standard error output). For details on the return codes, see ON-Bar messages and return codes.

The following examples show, how to start backups on the Informix server.

  • Backup of the tablespace dbspace01:
  • informix@linux:/opt/informix/> export SESAM_SERVER=backupsrv informix@linux:/opt/informix/> export SESAM_JOB=informix_ts informix@linux:/opt/informix/> export SESAM_POOL=DISK informix@linux:/opt/informix/> onbar -b -L 0 dbspace01 informix@linux:/opt/informix/> echo $? 0 informix@linux:/opt/informix/>
    • The commands shown in the following example:
    • Perform a backup level 0 of the dbspace01 on an OnLine Dynamic Server instance named venus. Back up all logical-log files associated with dbspace01, close the session and then back up the current logical log. setenv SESAM_SERVER jupiter setenv INFORMIXDIR /usr/informix setenv INFORMIXSQLHOSTS \$INFORMIXDIR/etc/sqlhosts setenv ONCONFIG onconfig.std onbar -b -L 0 dbspace01 onbar -b -l -c
  • The SEP sesam extension for Informix (Windows, ZIP archive) contains the sbc_onbar.cmd command, which is suitable to back up Informix instances from the SEP sesam command events by adapting INFORMIX_... and SESAM_... values. The arguments are transfered to onbar command and typical calls are sbc_onbar.cmd -b -L 0, or sbc_onbar.cmd -v.

ON-Bar commands

You have to use a relevant onbar -b command to back up storage spaces (dbspaces) or logical logs.

  • Complete backup of the database (if necessary, start the database with oninit -v command)
  • onbar -b -w [-L n] n - Backup level (0, 1, 2), default is 0.
  • Backup of a single dbspace
  • onbar -b [-L n] n - Backup level (0, 1, 2), default is 0. dbspace_name - Name of the Informix dbspace instance
  • Logical-log files backup
  • onbar -b -l - Backup of all full logical-log files onbar -b -l -c - Backup of the actual logical-log files and switch to the next logical-log file. onbar -b -l -s - Backup of all logical logs, which reside on the hard disk after a crash of the database.

Known issues

If you have problems with Informix, check the Troubleshooting Guide.

See also

Informix RestoreInformix Configuration

External reference

ON-Bar backup and restore system