SnapProtect - Configuration - DB2

Once the DB2 iDataAgent is installed, configure an Instance and a Backup Set to facilitate backups. Each Backup Set references a DB2 database. Also it is recommended to create separate subclients for SnapProtect operations.

The following sections provide the necessary steps required to create and configure these components for a first SnapProtect backup of the DB2 database.

DB2 Configuration

Note: When you modify the LOGARCHMETH1 parameter, you must perform an offline full backup.  When you do this, DB2 will move the database out of the BACKUP_PENDING state.

Automatically Updating DB2 Parameters

You can automatically update DB2 parameters (LOGARCHMETH1, LOGARCHOPT1, VENDOROPT, TRACKMOD, etc.,) using Db2_config.sh on Unix and Db2_config.ps1 on windows to perform backups and restores. See Automatically updating DB2 parameters for more information.

Manually Updating DB2 Parameters

You can manually configure the following parameters to back up any type of DB2 database online or offline, update the database configuration parameters when DB2 agent is installed on a cluster or multiple instances of SnapProtect are installed.

From the DB2 console, type the following command to set the LOGARCHOPT1 parameter:

db2 update db cfg for <database name> using LOGARCHOPT1 "'CvClientName=<CvClientName>,CvInstanceName=<CvInstanceName>'"

Example:

db2 update db cfg for test_db using LOGARCHOPT1 "'CvClientName=testhost,CvInstanceName=Instance001'"

Type the following command to set the VENDOROPT parameter:

db2 update db cfg for <database name> using VENDOROPT "'CvClientName=<CvClientName>,CvInstanceName=<CvInstanceName>'"

Example:

db2 update db cfg for test_db using VENDOROPT "'CvClientName=testhost,CvInstanceName=Instance001'"

Auto Discover the DB2 Instance

  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click DB2, point to All Tasks, and then click Discover Instances.
  3. In the confirmation dialog, click Yes.

Configure the DB2 Instance

  1. From the CommCell Browser, navigate to Client Computers | <Client>.

    Right-click DB2 and click All Tasks | New Instance.

  2. On the General tab of the Creating New Instance dialog box:
    • Enter the Instance Name.
    • In the Home box, click Browse or enter the path to the DB2 application files.
    • In the User Account section, click Change.

      In the User Account field, type the user name and password to access the DB2 application. and click OK.

  3. On the Data Backup tab under the Storage Device tab of the Creating New Instance dialog box:
    • In the Default Storage Policy box, select a storage policy name for data backups.
  4. On the Command Line Backup tab under the Storage Device tab of the Creating New Instance dialog box:
    • In the Storage Policy for Command Line Backup box, select a storage policy name.
  5. On the Log Backup tab under the Storage Device tab of the Creating New Instance dialog box:
    • In the Storage Policy for All Log Files box, select a storage policy name for log backups.
  6. Click OK.

Create the DB2 Backup Set

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2.
  2. Right-click the <Instance> and click All Tasks | Create New Backup Set.
  3. On the Creating New Backup Set dialog box, under Available DB Names, click the database name, and then click the arrow button to move the database name to the Selection box.
  4. Click OK.

Create the DB2 Subclient

  1. From the CommCell Browser, navigate to Client Computers |< Client > | DB2 | <Instance>.
  2. Right-click the <BackupSet>, point to All Tasks, and then click New Subclient.
  3. On the Creating New Subclient dialog box, navigate to the General tab and enter the Subclient name.
  4. On the Creating New Subclient dialog box, navigate to the Storage Device tab and select or type the Storage Policy in the combo box.
  5. On the Creating New Subclient dialog box, navigate to the SnapProtect Operations tab and select the  SnapProtect check box and the Snap engine from Available Snap Engines list.

    From the Use Proxy list, select the MediaAgent where SnapProtect and backup copy operations will be performed.

    When performing SnapProtect backup using proxy, ensure that the operating system of the proxy server is either same or higher version than the client computer.

  6. On the Creating New Subclient dialog box, navigate to the Backup Arguments tab:
    • To create an offline backup, select Offline Backup and check the Backup Log Files check box.
    • To create an online backup, select Online Backup.
  7. Click OK.

Skip this section if not using Solaris.

Enable SnapProtect Backups on Solaris Zone

Follow the steps given below to enable SnapProtect backups on each of the non-global zone clients containing the application data.

  1. From the CommCell Console, navigate to Client Computers | <Client>
    • Right-click the client and select Properties.
    • Click Advanced.
  2. In the Advanced Client Properties (General) tab
    • Select the Global zone host name from the drop-down list.
    • Click OK.

      • We support disks on a global zone mounted using loopback File System on a non global zone.
      • This option need not be enabled if you are using a NFS share. This is because when using NFS mount paths, the operations are limited to the non-global zone and does not use the global zone.

  3. Click OK and repeat the above steps on all the non-global zone clients containing the application data.

Skip the following section if you already created a snapshot copy.

Create a Snapshot Copy

The following section provides step-by-step instructions for creating a Snapshot Copy for a Storage Policy.

  1. From the CommCell Browser, navigate to Policies | Storage Policies.

    Right-click the <Storage_Policy> and click All Tasks | Create New Snapshot Copy.

  2. Specify the following to create a Snapshot Copy:
    1. Type the Copy Name in the Copy Name box.
    2. From the Library list, select the name of Library.
    3. From the MediaAgent list, select the name of a MediaAgent.
    4. From the Drive Pool list, select the name of a Drive Pool.
    5. From the Scratch Pool list, select the name of the Scratch Pool.

      Drive Pool and Scratch Pool are not applicable for disk libraries.

    6. Click OK.

The newly created Snapshot Copy can be associated with the subclient from which the snap backup is performed. In this case, the Snapshot Copy acts as the primary copy and therefore will contain only the metadata information associated with the snapshot Backup.

Configuring a Backup Copy

A backup copy operation provides the capability to copy snapshots of the data to any media. It is useful for creating additional standby copies of data and can be performed during the SnapProtect backup or at a later time.

Follow the steps given below to configure Backup Copy for moving snapshots to media.

  1. Open CommCell Console:
    • From the CommCell Browser, navigate to Policies | Storage Policies.
    • Right-click the <Storage Policy> and click Properties.

  2. Click the Snapshot tab.

    Select Enable Backup Copy checkbox to enable movement of snapshots to media.

    Click OK.