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.
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.
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.volSince 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.
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.
dbctl -u dba backup start tar -cf /dev/rmt/0m /db/data dbctl -u dba backup stopPlease 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.
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.volSince 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.
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:
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.
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/backupThe 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.
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.
dbctl -u dba dbstore payrol tapeSuppose 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
dbctl -u dba dbrestore tapeThe 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.bkupThe command below displays the backup header instead of re-storing the database:
dbctl -u dba dbrestore tape info