Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Overview of the ON-Bar Backup and Restore System > Backing Up with ON-Bar > Backing Up Logical Logs >

Backing Up Logical Logs on Dynamic Server

If you do not use whole-system backups, you must back up logical logs because you must restore both the storage spaces and logical logs.

If you perform whole-system backups and restores, you can avoid restoring logical logs. It is recommended that you also back up the logical logs when you use whole-system backups. These log backups allow you to recover your data to a time after the whole-system backup, minimizing data loss. The following diagram shows the syntax for onbar -b -l commands.

Read syntax diagramSkip visual syntax diagramBacking Up Logical Logs:
 
|-- -b-- -l--+-----+--+-----+-----------------------------------|
             +- -C-+  '- -O-'
             +- -c-+
             '- -s-'
 
Command Purpose Key Considerations
-b -l Performs a backup of full logical-log files The current logical-log file is not backed up. If you are using ISM, it also backs up the ISM catalog.
-b -l -c Closes and backs up the current logical log as well as the other full logical logs None.
-b -l -C Starts a continuous log backup Reserve a dedicated storage device and terminal window because the continuous log backups run indefinitely waiting for logical logs to fill. To stop a continuous log backup, kill the ON–Bar process with an interrupt (^C or SIGTERM).
-b -l -O Overrides normal logical backup restrictions such as when a blobspace is offline If a log backup occurs when blobspaces are offline, return code 178 displays in the ON–Bar activity log.
-b -l -s Salvages any logical logs that are still on disk after a database server failure If possible, use this option before you replace a damaged disk. If you use onbar -r to perform a cold restore on an undamaged disk, ON-Bar automatically salvages the logical logs. For information, see Salvaging Logical Logs.

Performing a Continuous Backup of Logical Logs

You can start a continuous logical-log backup in the following ways:

After the continuous logical-log backup starts, it runs indefinitely waiting for logical logs to fill. To stop the continuous logical-log backup, kill the ON–Bar process.

If an error occurs while the continuous logical-log backup is running, it stops. If it stops, reissue the onbar -b -l -C command.

Tip:
Reserve a dedicated storage device to improve performance during continuous logical-log backups.

Performing a Manual Backup of Logical Logs

To start a manual logical-log backup, use the onbar -b -l command. If you set alarmprogram to no_log.sh or no_log.bat, you must initiate a logical-log backup manually.

To back up the current logical-log file, use the onbar -b -l -c command.

Using ALARMPROGRAM to Set the Log Backup Mode

Use the ALARMPROGRAM configuration parameter to control continuous log backups. If ALARMPROGRAM is set to log_full.sh or log_full.bat, when a logical-log file fills, the database server triggers event alarm 23. This event alarm calls onbar -b -l to back up the full logical-log file. Restart the database server after you change the value of ALARMPROGRAM.

To turn off continuous log backups, set ALARMPROGRAM to $INFORMIXDIR/etc/no_log.sh or %INFORMIXDIR%\etc\no_log.bat.

To generate email or pager messages to a designated DBA when a specific error level is triggered, set ALARMPROGRAM to $INFORMIXDIR/etc/ alarmprogram.sh or %INFORMIXDIR%\etc\alarmprogram.bat. Then edit the file to turn automatic logging on, set the level of errors, and insert the email address of the DBA.

Dynamic Server

Additionally, you can set the ALRM_ALL_EVENTS configuration parameter to allow the ALARMPROGRAM script to execute every time any alarm event is triggered.

End of Dynamic Server

Viewing Backed-Up Logical Logs

You can use the onbar -P to view logical logs that have been backed up using the ON-Bar utility. In order to view the backed-up logical logs, the storage manager must be running. This command can be used by anyone who has permission to perform backup and restore operations.

The output of this command is displayed to stdout.

You cannot view logs that have not been backed-up which are still on the disk or in shared memory. The contents of these logical logs can only be viewed with the onlog utility.

Read syntax diagramSkip visual syntax diagramViewing Backed-Up Logical Logs:
 
|--onbar-- -P-- -n--+-unique_id------------------+-------------->
                    '-starting_id-- ---ending_id-'
 
>--+-----+--+-----+--+-----+--+---------------+----------------->
   '- -l-'  '- -q-'  '- -b-'  '- -u--username-'
 
>--+-------------------+--+----------------------+--------------|
   '- -t--tblspace_num-'  '- -x--transaction_num-'
 
Command Purpose Key Considerations
-b Display logical-log records associated with blobspace blobpages Additional Information: The database server stores these records on the logical-log backup media as part of blobspace logging.
ending_id The ID of the last log to display Must be a later ID than starting_id
-l Display the long listing of the logical-log record Additional Information: The long listing of a log record includes complex hexadecimal and ASCII dumps of the entire log record. The listing is not intended for casual use.
-n Display the logical-log records contained in the log file that you specify with unique_id Additional Information: The unique_id is the unique ID number of the logical log. To determine the unique_id of a specific logical-log file, use the onstat -l command.
-P Print backed-up logical log information This option can only be used to view logical logs that have been backed-up
-q Do not display program header None
starting_id The ID of the first log to display Must be an earlier ID than ending_id
-t tblspace_num Display the records associated with the tblspace that you specify Restrictions: Unsigned integer. The number must be greater than zero and must exist in the partnum column of the systables system catalog table.

Additional Information: Specify tblspace_num as either an integer or hexadecimal value. If you do not use a prefix of 0x, the value is interpreted as an integer. To determine the tblspace number of a particular tblspace, query the systables system catalog table. For more information, see the IBM Informix: Dynamic Server Administrator's Reference.

-u username Displays the records for a specific user. Restrictions: The username must be an existing login name and conform to operating-system-specific rules for login names.
unique_id ID of the log to display None
-x transaction_num Display only the records associated with the transaction that you specify Restrictions: The transaction_num must be an unsigned integer between zero and TRANSACTIONS -1, inclusive.

Additional Information: Use the -x option only in the unlikely situation of an error being generated during a rollforward. When this situation occurs, the database server sends a message to the message log that includes the transaction ID of the offending transaction. You can use this transaction ID with the -x option to investigate the cause of the error.

The following example shows how to use this command with all options:

onbar -P -n 2 -l -q -b -u "informix" -t 1048722 -x 1

The output for this command might be the following:

log uniqid: 2.
1665d0   120  DPT      1        2  0        5 
         00000078 0002006c 00000010 0000fefe ...x...l ........ 
         00000001 00000000 000077e3 00000000 ........ ..w..... 
         00000005 00000005 00002a24 00000001 ........ ..*$.... 
         00100004 0a0c21b8 00002a48 00000001 ......!. ..*H.... 
         00100006 0a0c2288 00002ea1 00000001 ......". ........ 
         0010001b 0a0c3810 00002bee 00000001 ......8. ..+..... 
         00100015 0a0c3a18 00002a3d 00000001 ......:. ..*=.... 
         00100005 0a0c57c0                   ......W. 
166648   60   CKPOINT  1        0  1665d0   1       
         0000003c 00000042 00000010 0000fefe ...<...B ........ 
         00000001 001665d0 000077e3 00000000 ......e. ..w..... 
         00010005 00000002 00000002 001665a0 ........ ......e. 
         00000007 ffffffff 00084403          ........ ..D.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]