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.
Backing 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. |
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.
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.
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.
Additionally, you can set the ALRM_ALL_EVENTS configuration parameter to allow the ALARMPROGRAM script to execute every time any alarm event is triggered.
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.
Viewing Backed-Up Logical Logs: |--onbar-- -P-- -n--+-unique_id------------------+--------------> '-starting_id-- ---ending_id-' >--+-----+--+-----+--+-----+--+---------------+-----------------> '- -l-' '- -q-' '- -b-' '- -u--username-' >--+-------------------+--+----------------------+--------------| '- -t--tblspace_num-' '- -x--transaction_num-'
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 ]