Examples: Manage storage devices with OneDB Primary Storage Manager
Learn how to set up and use OneDB® Primary Storage Manager to manage storage devices that the onbar utility uses for backing up and restoring instances. Each example shows how you can use the storage manager for a specific backup strategy.
Before you begin
Prerequisites:
- HCL OneDB is installed with the ON-Bar utility.
- Environment variable INFORMIXDIR is set to the path where the database server is installed.
- Environment variable ONCONFIG is set to the file in $INFORMIXDIR/etc that contains the configuration parameters for your database. The name of the file must be unique for each database server instance.
- User informix or root privileges.
About this task
- Examples: Manage storage devices with OneDB Primary Storage Manager
- Examples: Manage storage devices with OneDB Primary Storage Manager
- Examples: Manage storage devices with OneDB Primary Storage Manager
- Examples: Manage storage devices with OneDB Primary Storage Manager
In these examples, storage manager refers to OneDB Primary Storage Manager.
Example 1: Storing backups for an instance
This example shows how to set up and use OneDB Primary Storage Manager to back up the data and logical logs for a single database server instance to a directory: $INFORMIXDIR/backups.
About this task
In this example, you update the configuration file so that the OneDB Primary Storage Manager can communicate with ON-Bar and you specify the directory where you want backups stored. Then you use the onbar utility to perform a standard, level-0 backup of all online storage spaces and used logical logs. You validate the backup by checking the messages that were logged and by using the onpsm utility to confirm that storage objects were created.
Procedure
Results
With a few simple steps, you configured the storage manager and performed a full backup of an instance to a file device. Very little configuration was required because the storage manager uses the default settings for various ON-Bar configuration parameters.
What to do next
Storage catalog tables are not included in a backup. Be sure to back up the storage catalog tables with your operating system tools as part of a disaster recovery strategy. If the storage catalog tables are lost, the onbar utility cannot restore the backup objects that OneDB Primary Storage Manager created. The location of the storage catalog tables is set by the PSM_CATALOG_PATH configuration parameter (default = $INFORMIXDIR/etc/psm).
To restore the instance from the backup objects, use the onbar utility. The storage manager tracks the backup objects and storage devices for you.
Example 2: Storing backups for two instances
This example shows how to configure one instance of OneDB Primary Storage Manager to manage the storage devices for two database server instances in a multiple residency environment.
About this task
In this example, you set up two independent database server environments on the same computer. Each database server is installed in a separate directory: (/usr/informix/ids1210fc1 and /usr/informix/ids1210fc1b) and has a database server instance. Storage for backup operations on both database server instances is managed by one instance of OneDB Primary Storage Manager. Pools of storage devices for physical and logical data are configured for each instance.
Procedure
Example 3: Exporting backups to and restoring them from another directory
This example shows how to export backups to a new directory and import the backup objects from that directory.
About this task
Suppose that you keep five generations of backups. As an added precaution, you also keep copies of the most recent backups in a separate directory. In this example, you use the onsmsync utility to export your most recent backup to and import it from the OneDB Primary Storage Manager external pool in a separate directory.
The storage manager tracks devices in the external device pool (EXTPOOL) so it can copy objects to and from external devices. (Although the storage manager tracks devices, it does not track files and objects that are inside the EXTPOOL pool in the storage manager catalogs.)
Procedure
What to do next
pw_sept5
backup
generation from the second directory. To import the backup generation:- Run the onsmsync command to import all backup
objects in the
pw_sept5
subdirectory:onsmsync -I -p pw_sept5
Use your own file-transfer methods to move the exported backups, as needed, to other machines.
Example 4: Exporting a backup from one server and importing it into another server
This example shows how to use the onsmsync utility
to export a backup from a database server that has the name informix_serv1
.
Then the example shows how to use the onsmsync utility
to import the data into a server that has the name informix_serv2
.
Procedure
- Set up and export files on database server
informix_serv1
: - Prepare to import files on the second database server,
informix_serv2
, as follows: