Creating a DB2 Clone Environment

You can duplicate the source database by cloning the snapshots that were created during the backup when you use any of the following arrays:

  • NetApp
  • Pure Storage
  • EMC Timefinder 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 and different instance from the backup.

Note: You must use a snap copy to create a clone.

Before You Begin

  1. Enable the database clone feature.
  2. Verify that the DB2 database version on both the source database and the destination databases are the same.
  3. Install the DB2 Agent on the destination client, and the MediaAgent on the proxy.
  4. Configure the following entities on the destination CommCell Console:
    1. The destination client
    2. The destination instance
  5. Perform an SnapProtect full backup on the source database.


  1. From the CommCell Browser, expand Client Computers > client > DB2 >instance.
  2. Right-click the backup_set, point to All Task, and then click Clone.

    The Browse and Restore 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, and then type a date and time in End Time.
  4. In the right pane of the CommCell Browser window, select the entire database to clone, and then click Clone.

    The 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 Destination Instance 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 box, type the name of the database.

      Note: The database name must be a new database that does not exist. The database name must be 8 or fewer characters

    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 the full permissions to the staging directory.

    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. Optional: To have the SnapProtect software overwrite the existing clone database with the clone that you want to create, select the Overwrite if clone exists check box.
  6. Configure the copy precedence:
    1. Click Advanced.

      The Advanced Restore Options dialog box appears.

    2. 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.
    3. Click OK.

      The Clone Options dialog box appears.

  7. Optional: 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.

  8. Click OK.


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