IBM Support

Technology preview of managing restore operations by using the Db2uRestore resource

News


Abstract

The Db2uRestore resource allows you to initiate a Db2-native database restore through the deployment of a custom resource (CR) in the same namespace as your Db2 or Db2 Warehouse deployment and Db2uBackup, on the Red Hat OpenShift platform.

Content

Highlights

Creating the resource begins the Db2 restore operation. The type of restore (such as offline, online, or incremental) is determined by the Db2uBackup.

This technical preview is not yet fully supported. It is intended for nonproduction deployments of Db2 and Db2 Warehouse on the Red Hat OpenShift platform that are running the Db2uCluster custom resource on 11.5.8.0-cn1.

 

Prerequisites

  • A working Db2uCluster custom resource deployment.
  • A successfully completed Db2uBackup resource.

Before you restore

Do not restore any backups that were made after another backup was taken and subsequently restored. Doing so can result in issues when rolling forward and require manual intervention, such as dropping the database prior to the next restore.

Creating a Db2uRestore resource to restore a backup of your Db2 instance

You create a Db2uRestore custom resource through a YAML script. You can do this in several ways:

  • Through the Red Hat® OpenShift® console.
  • Through the Red Hat OpenShift command-line tool.
  • Through the command-line tool of a Kubernetes cluster.

To use the Red Hat OpenShift console, go to Installed Operators > IBM Db2 and click the Db2uRestore tab. Through this tab page you create your Db2uRestore resource, either by following the on-screen instructions of the form view, or by entering and running the YAML script.
Your YAML script contains the following API call:

apiVersion: db2ubnr.databases.ibm.com/v1alpha1
kind: Db2uRestore
metadata:
  name: <name of your db2ubackup>
spec:
  db2uCluster: <name of your existing db2uCluster>
  db2uBackup: <name of your existing db2uBackup>

where

  • metadata.name is a valid Kubernetes resource name.
    NOTE: A restore name cannot be reused, even if the Db2uRestore resource is deleted.
  • spec.db2uCluster is an active db2uCluster in the same namespace as the Db2uRestore.
  • spec.db2uBackup is a complete db2uBackup in the same namespace as the Db2uRestore.

The following example shows the command syntax for running the Db2uRestore utility to recover the db2uBackup resource mybackup:

apiVersion: db2ubnr.databases.ibm.com/v1alpha1
kind: Db2uRestore
metadata:
  name: myrestore
spec:
  db2uCluster: mycluster
  db2uBackup: mybackup

You can check the status of the backup operation by running the following command:

oc get db2urestore <mybackup>

The Db2uRestore status indicates the state of the restore operation:

  • InProgress - The restore operation is ongoing.
  • Complete - The restore operation was successful.
  • InvalidSpec -There is something wrong with the fields of the Db2uRackup CR.
  • Error - The restore operation failed.

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PmdAAE","label":"Recovery-\u003ERestore"}],"ARM Case Number":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"11.5.8;and future releases"}]

Document Information

Modified date:
17 March 2023

UID

ibm16962833