User Community for HCL Informix
  • Home
  • Blogs
  • Forum
  • About
  • Contact
  • Resources
  • Events

HCL INFORMIX BACKUPS

10/17/2017

2 Comments

 
Picture
                                                                                                            Updated: 8/30/18
DATA INSURANCE
Disasters are in the news, and it is easy to recognize the value of having the right insurance, Data Insurance.   

The HCL Informix Dynamic server implicitly provides you with some basic insurance by automatically maintaining physical and logical logs to provide data integrity should something abruptly stop the server.  But that may not be enough when there is a disk failure, corruption, or a flooded server room.  While HCL Informix support can help solve many problems, some problems can only be resolved by restoring from a backup. 
You may already have routine backups completely under control, but if not, now is the time to get started.
 
Assuming you don't have any data insurance, you have three tasks:
 
1.       Backup the HCL Informix Dynamic Server data
2.       Backup the HCL Informix Dynamic Server Critical files
3.       Continually backup the logical logs
 
HCL Informix Server provides you two ways to back up your server without taking it offline:  Ontape and onbar.

The "ontape" utility can sequentially create an archive of the server's dbspace data in a tape, directory, or other removable media.  The "onbar" utility support parallel archiving of the dbspaces and critical files, but requires the use of a Storage Manager, such as Tivoli Storage Manager, or you can use the HCL Informix Primary Storage Manager.   The two archive systems are not interchangeable. 


​System backup

Since we are just getting started, the simplest backup is done by the "ontape" utility.
 
You will find a complete documentation for ontape under the Backup and Restore Guide in the HCL Informix Knowledge Center.

Assuming you have your backup device/media mounted at the path indicated in your ONCONFIG's TAPEDEV path, you are ready to run your system backup:
System Backup

    
The "-s" indicates system, and "-d" indicates the backup location is a directory, so no need to prompt to mount a tape.  The "-L 0" indicates a Level 0 backup which is a baseline backup of everything.  Some changes to your system require a Level 0 backup.  Backups after a Level 0 backup can be smaller and faster by specifying a Level 1 incremental backup, and incrementally a Level 2 backup.  You need to keep the latest of each of the Levels you created if a full restore is needed, and restore them in order. We will just take full backups for now (Level 0).
​

Critical files

You will want to capture your critical configuration information, and back that up too:
Critical Configuration Information

    
The following command (default values for variables are used if not set) is an example to archive these critical files in the same backup path:
​
Default Values For Variables 

    
You may need to recreate the dbspaces, so capture that information too:​
Recreate dbspaces

    
Unmount and remove the backup device, and physically secure the media.   You should immediately mount a new device with sufficient space for the next backup.  This will keep the latest backup safely offline, and your system will be prepared for the next scheduled backup.


​Logic Logs

​The logical logs are all the changes that have happened since the last backup (except for non-logging databases and raw table which are only backed with the system backup).  These logs can be applied after a restore to bring the server back life with as little loss of transactional data as possible.  The easiest way to backup these logs is continually via the ALARMPROGRAM which is run automatically when logs fill up.   You need to make two changes to enable the automatic backup of the logs and to use "ontape".  The default configuration has "onbar" as the backup command, and log backups disabled.
 
Edit the "alarmprogram.sh" (alarmprogram.bat on Windows) and change the value for "BACKUPLOGS" to equal "Y", and change the BACKUP_CMD:

Back Up Logs

    
The "-a" is for automatic, and "-d" indicates the logical log device is a directory, and no need for interaction.
 
Next update the Servers onconfig file to specify the Log Tape Device parameter "LTAPEDEV" to be the location of where you want the backups to be placed.
​
Log Tape Device 

    
These backups can be restored after you restore the "system" archives, but only if they are preserved.  You need to regularly move the completed log backups to removable media to keep with your system backup, or media hosted on another machine so you can recover from a physical machine or disaster.
​

Repeat

Now make it a habit by automating the entire process, and have it run on a schedule that meets your needs.
​

More

If you want to shrink the size of your backups you can use a compression "filter" command specified in the BACKUP_FILTER and RESTORE_FILTER onconfig parameters.  For more flexibility, you can use "onbar".  Onbar and PSM (Primary Storage Manager) or third party storage manager, can provide point-in-time restore, more frequent backup of individual spaces, and parallel backup of multiple spaces.   You can find these details on the Informix Knowledge Center for Backup and Restore. 
 
In future blog posts, we will cover PSM (Primary Storage Manager) and various Backup and Restore capabilities.  For now, you can sleep a little easier knowing you have at least one recent backup.

Kevin Mayfield 
Senior Solutions Architect at HCL

Connect with me on LinkedIn

Informix is a trademark of IBM Corporation in at least one jurisdiction and is used under license.

2 Comments
Hrvoje Zokovic
10/20/2017 01:45:08 am

From my experience I would save as well:
echo "unload to sysdatabases,unl select * from sysdatabases" | dbaccess sysmaster

and
oncheck -pe > oncheck-pe.out

Reply
Louise
2/3/2020 12:03:46 am

Hi,
Is there anyway to force a repeat backup of logical logs.
I need to restore logical logs from one server to another, the actual backup of the logical log has been deleted, by on my server the logs have yet to wrap around so has not been reused.
It is marked as Backup, so would like to know if it is possible to force a repeat backup of this log.

Thanks in advance
L

Reply



Leave a Reply.

    Archives

    November 2019
    September 2019
    May 2019
    April 2019
    February 2019
    January 2019
    October 2018
    July 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017

    Categories

    All
    Business
    Technical

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blogs
  • Forum
  • About
  • Contact
  • Resources
  • Events