HP Eloquence A.06.20 / Release Notes

HP Eloquence Database Backup

There are two supported procedures to perform a backup of the HP Eloquence database environment.
Off-line backup
The server process is shut down in order to make a backup. Clients can no longer use the database until the backup is finished. Before HP Eloquence A.06.20, only off-line backup was available.

On-line backup
The backup is made while the database is active. Clients can access and modify the database. The HP Eloquence A.06.20 database in addition supports on-line backup, allowing the eloqdb6 server process to continue working (at reduced performance) while a backup is on progress.

dbstore / dbrestore
The dbstore / dbrestore functionality allows transfer of a single database from a database environment to a file or tape device. This makes it easy to save a snapshot of a database or move a single database to another system.
This is not a recommended strategy to backup your database environment.
Other backup procedures (besides the ones mentioned above) are likely to cause a corrupted backup or no backup at all (e.g. fbackup on HP-UX refuses to backup modified files).


Off-line backup

How to use Off-line backup

An off-line backup takes place when the eloqdb6 is not active. You need to shut down the eloqdb6 process by either executing

After the eloqdb6 server has been shut down you should either execute dblogreset before performing the backup or backup your log volume(s) along with your data volume(s).

If the database was not shutdown cleanly, the log volumes contain important data needed to recover the data base environment. Without the log information your databases may be lost. The dblogreset utility will make sure that the log information is copied to your data volume(s).

When the server has been shut down cleanly or the dblogreset command has been executed successfully, you don't need to backup your log volume(s). In case you need to restore your database environment from backup, the log volumes could be re-created with the dbvolextend command. Since dblogreset resets the log volumes to their minimum size it should not hurt to just backup the log volume(s) in addition to the data volume(s).

Please note: This is different to the previous HP Eloquence A.06.10 version which required that the log volumes are backed up along with the data volume(s). There was no way to re-create log volume(s) without potential data loss.

Please note: Your log volume(s) contain important information (your data) and you should handle them with the same care as your data. Otherwise your database environment may become unusable.

How to recover from an off-line backup

To recover an off-line backup, just restore the eloqdb6.cfg file (or create a new one) and all data and log volumes which are part of the database environment. If your log volumes are lost and your database was shut down cleanly, you can re-create any missing log volume with the dbvolextend command (see below).

When re-starting the eloqdb6 server all committed transactions are recovered automatically from the log volume(s).

Please note: If your database was not shut down cleanly and your log volume is lost, you are loosing data and your database may be damaged.

How to re-create your log volume(s)

If your log volumes are lost (e.g. due to a disk failure) and your database was shut down cleanly, you can re-create any missing log volume with the dbvolextend command. Execute dbvolextend -t log /path/to/logvol for each missing log volume file.

Suppose your database environment was configured to use two log volumes named /db/log/log01.vol and /db/log/log02.vol. The following commands can be used to re-create the log volumes.

 dbvolextend -t log /db/log/log01.vol
 dbvolextend -t log /db/log/log02.vol
Since all log volume properties (like min. or max. size) are lost you may need to specify additional options to dbvolextend or use dbvolchange to modify volume properties. You can use dbvoldump to display volume information.

After the log volume(s) are re-created, you can start the eloqdb6 server process.


On-line backup

An on-line backup takes place when the eloqdb6 is active. The on-line backup is initiated with the dbctl backup start command which causes the eloqdb6 process to enter on-line backup mode.

In on-line backup mode, all changes to the data volume(s) are re-directed to the log volume(s) and the data volume(s) are guaranteed to be consistent and not to change. The data volume(s) can then be backed up by an arbitrary backup tool (e.g. fbackup, tar, cp, etc.).

Once the backup is complete, the on-line backup mode is terminated by the dbctl backup stop command. This causes the eloqdb6 server process to update all pending information which was temporarily re-directed to log volume(s).

Note: The eloqdb6 performance is reduced in on-line backup mode and the log volume must provide space for all modifications.

Note: Log volumes should not be backed up during on-line backup. They are changing constantly.

In case the eloqdb6 server is shut down during on-line backup mode (or a failure occurs) the data volume(s) are updated automatically when the server is restarted.

How to use on-line backup

Suppose you have data volume(s) located in the directory /db/data and log volume(s) located in the directory /db/log. Use the following commands to backup your data volume(s):
 dbctl -u dba backup start
 tar -cf /dev/rmt/0m /db/data
 dbctl -u dba backup stop
Please note: You should not backup your log volume(s) in on-line backup mode - they are not used to recover the database. They only take space on your backup media.

How to recover from an on-line backup

To recover the database to the state when starting the on-line backup, please recover the data volume(s). If your log files are still present, you are ready to start the eloqdb6 server. The contents of the log volume(s) are ignored.

If your log volume(s) are lost (e.g. due to a disk failure) you can use dbvolextend to re-create your log volume(s). Execute dbvolextend -t log /path/to/logvol for each missing log volume file.

Suppose your database environment was configured to use two log volumes named /db/log/log01.vol and /db/log/log02.vol. The following commands can be used to re-create the log volumes.

 dbvolextend -t log /db/log/log01.vol
 dbvolextend -t log /db/log/log02.vol
Since all log volume properties (like min. or max. size) are lost you may need to specify additional options to dbvolextend or use dbvolchange to modify volume properties. You can use dbvoldump to display volume information.

After the log volume(s) are re-created, you can start the eloqdb6 server process.

On-line backup and database utilities

Database utilities which modify the data volume can not be used immediately if the eloqdb6 server was shut down or crashed while in on-line backup mode. The log information (all committed transactions since entering on-line backup mode) have been temporarily stored in the log volume and must be recovered before database utilities may be allowed to modify the data volume. Otherwise all transactions pending since starting the on-line backup would be lost.

The following message is output by the affected utilities:

 NOTE: Database environment has been shutdown during 
       on-line backup. Please restart the database server 
       once in order to recover from on-line backup mode, 
       then reapply this command.
To recover the information from the log volume, please either run dblogreset or start the eloqdb6 server. Afterwards you can use the utility program as planned.

Affected tools are:


dbstore / dbrestore

The dbstore / dbrestore functionality allows transfer of a single database from a database environment to a file or tape device. This makes it easy to save a snapshot of a database or move a single database to another system.

Please note: This is not a recommended strategy to backup your database environment. The On-line backup and off-line backup methods presented above provide a consistent backup of your complete database environment which includes all your databases and additional configuration (users, passwords, database permission groups and user assignments). On the contrary dbstore only cares about a single database.

How to use dbstore and dbrestore

The dbstore and dbrestore operation is executed by the database server and the archive files are written by the server process. The dbctl utility is only used to initiate the process.

Backup files are written to and read from pre-configured paths (called "server devices") to avoid unauthorized access to the server system. A "server device" could either be a single file, a directory or a device. When no server devices are configured, dbstore and dbrestore operation is refused by the server.

The example below defines two "server devices". The device "tape" points to a tape device file, the device "backup" points to a directory which is intended to hold the backup files.

 [devices]
 Tape = /dev/rmt/c1t0d0BEST
 Backup = /data/backup
The dbctl utility is used to initiate a store or restore operation.
 dbctl dbstore database target
 dbctl dbrestore source [info]
The dbctl dbstore command transfers a single database to the target "device" which must be defined in the server configuration file. In order to store a database, database admin (dadmin) or server admin (dba) capabilities are required.

The dbctl dbrestore command restores a single database from a source device which must be defined in the server configuration file. The database may not already exist. Server administration (dba) capabilities are required in order to restore a database.

If the optional info argument is present, information on the archive is returned and the archive is not restored.

The target and source specifications are either the name of a configured server device or the name of a server device and a filename separated by a slash.

Limitations

Since dbstore copies the database to a binary archive, the archive occupies the same disk space as the database. In addition, the archive can only be restored to a system with the same byte order. For example, you cannot create an archive on Linux and restore it on an HP-UX system. You need to use dbexport/dbimport to move a database to a different architecture.

When a database is restored, the association between database permission groups and server users ("sysmember") is deleted for all but the default "dba" and "public" users. Since the database could be restored on a different server this could otherwise lead to inconsistencies or unauthorized access to your data.

Saving a database with dbstore

Suppose you defined a server device "tape" in your server configuration file. The command below dumps the database payrol to the tape device:
 dbctl -u dba dbstore payrol tape
Suppose you defined a server device "backup" in your server configuration which points to a directory. The command below dumps the database payrol to the file payrol.bkup in the specified directory:
 dbctl -u dba dbstore payrol backup/payrol.bkup

Recovering a database with dbrestore

To restore the database from the tape (after it has been purged) the command below could be used:
 dbctl -u dba dbrestore tape
The command below can be used to recover the database from the archive file payrol.bkup in the directory pointed at the device Backup:
 dbctl -u dba dbrestore backup/payrol.bkup
The command below displays the backup header instead of re-storing the database:
 dbctl -u dba dbrestore tape info


Please contact webmaster@marxmeier.com if you have any questions or suggestions regarding this service.
Copyright © 1999 Marxmeier Software AG
Last update: 07-Feb-2003