Creating a DB2 Clone Environment

You can duplicate the source database by cloning the snapshots that were created during the backup. For information about which arrays are supported, see Application Clone.

You can use the cloning feature to complete the following tasks:

  • Quickly duplicate large databases

  • Create test environments

  • Retrieve data quickly without using resources on the production environment

  • Alleviate the load on production servers

You can create a clone from an existing data and log volume full backup. When you create a clone, you must specify the reservation period. The system automatically frees up the staging path and the clone database when the reservation period expires.

Schedule clones to run periodically so that the clones are refreshed regularly.

You can create a clone on a new database that is on a different host or different instance from the backup.

Note

You must use a snap copy to create a clone.

Before You Begin

  • Verify that the DB2 database version on both the source database and the destination databases are the same.

  • Install the DB2 Agent on the destination client, and the MediaAgent on the proxy. If you do not use a proxy server, then install the MediaAgent package on the destination client.

  • The proxy client or the destination server must have access to the storage array that contains the source database volumes.

  • Configure the following entities on the destination CommCell Console:

    • The destination client

    • The destination instance

  • Perform an IntelliSnap full backup on the source database.

Procedure

  1. From the CommCell Browser, expand Client Computers > client > DB2 > instance.

  2. Right-click the backup_set, point to All Tasks, and then click Clone.

    The Clone Options dialog box appears.

  3. On the Time Range tab, specify the backup to use for the clone.

    • To use the latest backup, select Latest Backup, and then click View Content.

    • To use a backup from a specific time, select Time Range, type a date and time in End Time, and then click View Content.

  4. In the right pane of the CommCell Browser window, select the entire database to clone, and then click Clone.

    The DB2 Instant Clone Options dialog box appears.

  5. On the Clone Options tab, specify the destination information:

    1. From the Destination Client list, select the clone destination client.

      Note

      The destination client must be configured on the CommCell Console.

    2. From the Instance Name list, select the clone destination instance.

      Note

      The source and destination instance must run the same DB2 version.

      The DB2 Home box displays the full path to the destination DB2 home directory.

    3. To change the destination DB2 user, click Change, and then type the credentials for the DB2 user.

      Note

      The user can be different from the one that you configured for the backup set or instance in the CommCell Console.

    4. In the Target Database Name box, type the name of the database.

      Note

      The database name can be an existing database name or a new name. The database name must be 8 or fewer characters. If you use an existing database, select the Overwrite if clone exists check box.

    5. In the Staging Directory box, type the full path to the directory that the software uses to stage the clone.

      The staging directory can reside on the destination client or on a LUN device.

      The software places the online log files in this directory.

      Note

      The clone job grants full permissions to the staging directory and subfolders. The staging path must be accessible by the DB2 user or UNIX group.

    6. In the Reservation Period box, specify the time in days and hours that the software retains the test environment.

      Note

      The default time to retain the clone is 1 hour. When the reservation expires, the software dismounts the database and deletes the mount point.

    7. To have the Commvault software overwrite the existing clone database with the clone that you want to create, select the Overwrite if clone exists check box.

  6. Click Advanced.

    The Advanced Restore Options dialog box appears.

  7. On the Copy Precedence tab, select Restore from copy precedence, and then, in the Copy Precedence box, type the precedence number of the snapshot copy.

  8. If you are using an array that does not have cloning capability and want to configure a proxy server as a SCSI server, on the Data Path tab, select the proxy server from the Use Proxy list, and then select the Use proxy as SCSI server check box.

  9. Click OK.

    The DB2 Instant Clone Options dialog box appears.

  10. To automatically refresh the clone with the latest backup, on the Job Initiation tab, select Schedule, and then click Configure Schedule Pattern.

    For information on how to configure a restore schedule, see Schedule Restores.

  11. Click OK.

Result

The destination client contains a clone of the DB2 database.

The restore job shows a size of 0 for the following data because the clone operation does not involve a data transfer:

  • Objects

  • Application size

Loading...