Archive:SEP sesam extension für Ingres
Introduction
SEPsesam extension for Ingres provides the following functions:
- Interface for chkdb and rollforward commands to use SEP sesam as media manager (instead of using tar)
- Complete database backup over Sesam GUI. This includes backup of data, journal and dump directories
- Complete disaster restore of database
System requirements
- Ingres database 2006 or greater on Linux i386 or x86_64
- SEP Sesam Server >= 3.6.2.3
- SEP Sesam extension for Ingres DB
- Previous installation of the standard Sesam Backup Client
- working Sesam file system backup for this client
Installation
- First, verify that the standard Sesam Backup Client is already installed
- File system backup must be active for this Sesam client
- Login as root user
- Unpack the file sesam_ingres_x.x.x.x.tgz in a temporary location
- Copy ingres/sbc_ingres into $<$SESAM_ROOT$>$/bin/sesam directory
root@db:~> cd /tmp root@db:/tmp> tar xvzf sesam_ingres.tgz root@db:/tmp> cp sesam_ingres_3.4.1.60/sbc_ingres /opt/sesam/bin/sesam
Backup
Complete database backup
In this case Sesam calls Ingres executable ckpdb to perform a checkpoint. After saving all files of checkpoint, a backup of the dump and journal directories is made. With this information a complete disaster recovery of database is possible.
The backup source has the following format:
<db name>@<path of config file> . test2@/opt/Ingres/IngresII/ingres/data/default/test2/aaaaaaaa.cnf
Backup source has to be entered manually |
In current version, it's not possible to use the GUI file system browser to choose the backup source |
Additional backup options
You can enter additional options for the tasks in Options 1->Save options by -a switch:
- delete=last
- Delete last checkpoint after backup
- delete=all
- Delete all checkpoints after backup
- dbuser=<ingres os user>
- Use this OS account instead of default user ingres
Example:
Use user ingres2 for backup and deletes all checkpoints after successful backup
-a delete=all,dbuser=ingres2
Checkpoint backup
In this case Sesam acts as Media Manager. Instead of the default tar command, database files are directly saved by Sesam Server. To use Sesam as media manager an adopted check point template file has to be created:
- Create a copy of the Default Template File:
cp /opt/Ingres/IngresII/ingres/files/cktmpl.def /opt/Ingres/IngresII/ingres/files/cktmpl_sm.def
- Adopt the template file:
old: WSDD: cd %D; /bin/tar cf %A * new: WSDD: cd %D; /opt/sesam/bin/sesam/sbc_ingres ckpdb -b -j ingres -S barometrix -m LARGE %D %A
old: WRDD: cd %D; /bin/tar xf %A new: WRDD: cd %D; /opt/sesam/bin/sesam/sbc_ingres rollforward -r -j ingres -S barometrix %D %A
The task (-j) has to be created in Sesam GUI as described before.
- Set of environment variable II_CKTMPL_FILE:
export II_CKTMPL_FILE=/opt/Ingres/IngresII/ingres/files/cktmpl_sm.def
Certainly the Default Template can be adopted too, but then Sesam is always used for creating checkpoints.
The filename cktmpl_seseam.def is reserved, because Sesam use it internally.
Checkpoint is not sufficient for disaster recovery |
If you only create checkpoints, then make sure, that dump and journal directories are saved by normal file system backups |
Recovery
Disaster Recovery
- The database must exist before it can be recovered
- SEP sesam backup log can help you to identify the data locations
Restore
If a complete backup has been done from Sesam all necessary files can be restored by Sesam GUI. In restore wizzard the backup of configuration file has to be used, not the external checkpoint backup.
TODO: Easier identify this backup in restore wizzard
Select complete restore of selected task
Options
- Overwrite
- Overwrite all exiting files
- Auto recover after restore
- Starts rollforward command after data restore
- Auto recover adn online after restore
- Starts rollforward command after data restore
Hint: There is no difference between the two Auto recover options in case of Ingres restore
Additional options
- until=<timstamp>
- Point in time recover
- checkpoint=<checkpoint number>
- Using this checkpoint for recover
-a until=01-aug-2009:07:13:58
File system restore
As data is saved in files these files can be restored into the file system. To do this, select a new target in restore wizzard starting with /. There will be no Ingres specific processing in this case.
Example:
Restore all files into /tmp/ingresrestore
/tmp/ingresrestore