HCL OneDB provides two utilities for backing up and restoring database server data. Both utilities backup and restore storage spaces and logical logs. However, they support different features, and it is important to know the differences. These topics explain basic backup and restore concepts for HCL OneDB database servers and compares the ON-Bar utility. ON-Bar backs up and restores storage spaces (dbspaces) and logical file, by using a storage manager.
Onbar Description:
Backup and restores storage spaces (dbspaces) and logical log files, using a storage manager to track backups and storage media
Includes:
- Parallel backup and restore
- System level and dbspace level backup and restore
- Support for incremental backups
- Manual or automatic backup of logical logs
- Point-in-time recovery for an instance
- Provides an open interface for communication with storage manager (XBSA)
- Third party storage managers may provide support for sophisticated tape stacker and jukebox devices.
ON-Bar components include a command-line utility, catalog tables, an activity log, and an emergency boot file. You use ON-Bar with a storage manager and the XBSA shared library for the storage manager.
The following figure shows the ON-Bar and database server components:
- The storage spaces (dbspaces, blobspaces, and sbspaces) and logical logs from the database server
- The sysutils database, which includes ON-Bar catalog tables
- The onbar and the onbar-d command-line utilities
- The XBSA shared library for the storage manager on your system
- The storage media for storing backups
- The ON-Bar activity log
- The ON-Bar emergency boot file
ON-Bar communicates with both the database server and the storage manager. You use the onbar command to start a backup or restore operation. By default, ON-Bar backs up and restores storage spaces in parallel. ON-Bar always processes log files serially.
For a backup session, ON-Bar requests the contents of storage spaces and logical logs from the database server and passes them to the storage manager. The storage manager stores the data on storage media. For a restore session, ON-Bar requests the backed-up data from the storage manager and restores it on the database server.
ON-Bar backs up the critical dbspaces first, then the remaining storage spaces, and finally the logical logs. The critical dbspaces are the rootdbs and the dbspaces that contain the logical logs and physical log.
ON-Bar also places the following critical files in the archive during backups:
- The onconfig file
- UNIX: The sqlhosts file
- The ON-Bar emergency boot file: ixbar.servernum
- The server boot file: oncfg_servername.servernum
You can restore storage spaces stored in both raw and cooked files. If your system contains primary and mirror storage spaces, ON-Bar writes to both the primary and mirror chunks at the same time during the restore, except for an external restore.
ON-Bar status and error messages are written to the activity log file: bar_act.log.
Configuring ON-BAR backup/restore
Step 1) Make below changes in $ONCONFIG file
PSM Device list should be empty. To check run the command below:
onpsm –D list
Step 2) Add PSM location where you will be taking backup of objects
Now let’s test backup and restore.
We don’t have any backup taken from onbar.
Take Level 0 backup with the command below
You can also take incremental backup using
onbar –b –L 1 à for level 1 backup
onbar –b –L 2 à for level 2 backup
And it’s done!
Backup has been taken successfully. You can check the date and time and level of backup you took from below command.
You can also check the same message appear in online.log that backup of dbspaces has been completed
You can also check bar_act.log for onbar backup and it also backup critical file like:
- Ixbar.servernum
- Onconfig
- Sqlhosts
And in the end, Onbar should return ‘0’ as a successful backup
Onbar- Restore
- Let’s suppose we have got some corruption in our database, or you deleted the database accidently or someone did something wrong with the data.
- And now you want to restore the database.
- We will restore it to the time when the rootdbs was last backed up.
- There are other options as well. Please look at HCL OneDB Knowledge centre
- Let’s suppose we have dropped the database:
Now in order to restore, just stop the engine and start restore:
Online.log
- Stores_demo database has been restored:
Start a Conversation with Us
We’re here to help you find the right solutions and support you in achieving your business goals.
Nice explanation, with commands and to the point ! I liked it.
REPLY
Dear Gaurav,
Thanks for explaining is very easy way. Please let me know, like in tape backup we specify the path against the TAPEDEV & LTAPEDEV , so where can be see the ONBAR backup files and where we set the path in onconfig file.
Thanks
Amit Patel
REPLY