Advanced - DB2 SnapProtect Backup

Table of contents

Managing Snapshots

List Snapshots

Mount Snapshots

Delete Snapshots

Revert a Snapshot

Snap Reconciliation

Excluding the Online Log Volumes During SnapProtect Backup

Restoring Database from a Point in Time

Restoring Data from a Backup Copy

NFS SnapProtect for DB2

Supported Volume Managers

Options not applicable for DB2

Additional Options

Managing Snapshots

The snapshots of the data created by the SnapProtect backup are also available for various other operations like list, mount, unmount, delete, or revert.

List Snapshots

The browse operation provides the capability to see the snapshots created for an agent, job, or a snapshot copy. The list of the snapshots displayed is corresponding to the entity selected for the browse operation, for e.g., browsing the snapshots for an agent will display all the snapshots created for the selected agent. You can view volume or disk related information for the snapshots. Follow the steps given below to browse snapshots.
  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent>.
  2. Right-click the subclient and click List Snaps.
  1. The Snaps created during SnapProtect operation dialog box displays a list of all the snapshots created for the selected subclient. It also displays important information about each snapshot, including the source month path, snap mount path, the storage array, and the source client.

    Click the Disk View tab to display the snapshot name, e.g. SP_2_79_1286222629.

You can also browse snapshots at the instance level of the DB2 Agent.

Mount Snapshots

You can mount any available snapshot to access the data included in the snapshot. It is recommended that you select the option to protect a snapshot when it is mounted, as this will ensure that the changes made to the snapshot when it is mounted are not retained when you unmount the snapshot and the snapshot is usable for data protection operations. Follow the steps given below to mount snapshots:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent>.
  2. Right-click the subclient and click List Snaps.
  1. Right-click the snapshot that you wish to mount and click Mount.
  2. Click Yes.
  3. In the Mount Path dialog box, specify the destination client and the path on the client in the Destination Client and Destination Path fields.

    On a Windows platform, enter a CIFS Share Name for the Agent.

  4. If you do not wish to save any changes made to the mounted snapshot after the snapshot is unmounted, select Protect Snapshot during mount.
  5. Click OK.
If you do not select Protect Snapshot during mount, the changes made to snapshot when it is mounted will be retained after the snapshot is unmounted and the snapshot can no longer be used for restore.

Unmount Snapshots

Follow the steps given below to unmount snapshots:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent>.
  2. Right-click the subclient and click List Snaps.
  1. Right-click the snapshot you wish to unmount and click Unmount.
  2. Click Yes when prompted if you want to continue.
If the snapshot does not get unmounted, select the Force Unmount option to mark the snapshot as unmounted.

Delete Snapshots

Snapshots can either be deleted using job-based pruning or from the list of displayed snapshots when browsing snapshots. Data Aging can also be used to define the retention rules and pruning of snapshots. Follow the steps given below to delete snapshots:

  • Manual deletion of snapshots is not recommended. When a snapshot is deleted, it is no longer possible to perform data recovery operations from the snapshot copy. However, if a backup copy was created from the snapshot, data recovery operations can be performed from the backup copy.
  • Ensure that the snapshot to be deleted is not mounted.
  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent>.
  2. Right-click the subclient and click List Snaps.
  1. Right-click the snapshot you wish to delete.
    Ensure all snapshots with the same Job ID are selected for a successful deletion operation.
  2. Click Delete.
  3. Enter the confirmation text string, erase snapshots.
  4. Click OK.

Revert a Snapshot

You can use the revert operation to bring the data back to the point-in-time when the snapshot was taken. This operation overwrites any modifications to the data since the time when the snapshot was created. This option is available if the storage arrays that you are using supports revert. Revert operations are supported on NetApp File Servers but not from SnapVault or SnapMirror snapshots. You can either perform an application aware revert or a hardware specific revert.

Review the following before performing a revert operation:

  • It is recommended to verify the contents of the backup and ensure that you want to perform a revert operation as it is an irreversible operation.
  • If you plan to perform a revert operation, you will not be able to use the associated storage policy for further auxiliary copy operations.

Perform an Application Aware Revert

  1. From the CommCell Browser, right-click the entity that contains the data you want to restore, and click All Tasks | Browse Backup Data.
  2. From the Browse Options dialog box, click OK.
  3. Select the data you want to revert and click Recover All Selected.
  4. From the Restore Options dialog box, click Advanced.
  5. Select the Use hardware revert capability if available option.
  6. Click OK to confirm the revert operation.
  7. Click OK from the Advanced Restore Options dialog box.
  8. Click OK to start the revert.
    • An application aware revert operation reverts back all the volumes included in the backup.
    • For NetApp NFS configurations:
      • This operation reverts all data on the file server volume, not just the data that is associated with the application.
      • A volume revert deletes all snapshots that were created after the snapshot to which you are reverting.
      • If you perform a volume revert on the source for a SnapVault/SnapMirror copy, and the snapshot to which you are reverting was created before the most recent snap moved to the SnapVault/SnapMirror copy, then the SnapVault/SnapMirror copy operation no longer works.

Perform a Hardware Specific Revert

  1. From the CommCell Console, navigate to Client Computers | <Client>.
  2. Right-click the subclient and click List Snaps.
  3. Right-click the snapshot that you wish to delete and click Use hardware revert capability if available.
  4. Enter the confirmation text string, confirm.
  5. Click OK.
  • A hardware specific revert operation reverts back the volume included in the snapshot.
  • For NetApp NFS configurations:
    • This operation reverts all data on the file server volume, not just the data that is associated with the snapshot.
    • A volume revert deletes all snapshots that were created after the snapshot to which you are reverting.
    • If you perform a volume revert on the source for a SnapVault/SnapMirror copy, and the snapshot to which you are reverting was created before the most recent snap moved to the SnapVault/SnapMirror copy, then the SnapVault/SnapMirror copy operation no longer works.

 

Snap Reconciliation

Snapshots may be deleted from the array due to factors like low disk space on the array, number of snapshots exceeds the threshold etc., and the jobs corresponding to these deleted snapshots can no longer be used for any data recovery or backup copy operations. You can use the nRunSnapRecon registry key to start snap reconciliation to check for missing snapshots once in every 24 hours and marks jobs corresponding to the missing snapshots as invalid.

Excluding the Online Log Volumes During SnapProtect Backup

Use sSKIPONLINELOGSNAP registry key to exclude the online logs during the snap backup if the log volumes are separated from data volumes in DB2 database.

  1. From the CommCell Browser, navigate to the Client Computers.
  2. Right-click the <Client>, and then click Properties.
  3. Click the Registry Key Settings tab.
  4. Click Add.
  5. In the Name box, type sSKIPONLINELOGSNAP.
  6. In the Location box, select or type DB2 Agent from the list.
  7. In the Type box, select String as value.
  8. In the Value box, type y or Y and then click OK.

Restoring Database from a Point in Time

You can restore a database from a point in time. This is useful if you want to restore certain configurations/contents in the database that are not reflected in the latest backup. For example, you can use this option to restore a SnapProtect backup if your latest backup was a traditional backup.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2.
  2. Right-click the backup set and then click All Tasks | Restore.
  3. Click the Recover Database tab.
  4. Select To a point in Time.
  5. Select the date and time of the backup you want to restore.
  6. Click OK.

Restoring Data from a Backup Copy

You can perform a restore from the backup copy by setting the appropriate copy precedence number.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent>.
  2. Right-click the entity that contains the snapshots you want to restore, and point to All Tasks | Browse Backup Data.
  3. Click OK.
  4. From the Browse window, select the data you want to restore in the right pane and click Recover All Selected.
  5. From the Restore Options for All Selected Items window, click Advanced.
  6. Click the Copy Precedence tab and select the Restore from Copy Precedence checkbox.
  7. In the Copy Precedence box, type the copy precedence number for the backup copy.

 8.   Click OK.

 9.   Click OK to close the Restore Options window and start the restore job.

NFS SnapProtect for DB2

You can perform a SnapProtect backup for DB2 when the database is on a NFS Volume. However, you will require a root access in the storage device's NFS configuration to be able to read and write on the accessible DB2 files i.e., the host on which the NFS Volume is mounted.

Consider the following while performing a SnapProtect backup for data or databases that reside on a NFS Volume:

Supported Volume Managers

  • Logical Volume Manager
    • All versions supported on AIX and Linux
    • Versions 1.0 and 2.x supported on HP-UX
  • VERITAS Volume Manager (VxVM) 5.0 for AIX, Linux and Solaris
  • Solaris ZFS Mirror
  • Solaris Volume Manager
When using the Solaris Volume Manager, ensure that a complete disk is used for a metaset. Also, ensure that the metaset is owned by single host and the ownership of the metaset is attained before performing the SnapProtect backup operations.

Supported Configurations:

  • One Physical Volume containing one Logical Volume
  • One Physical Volume containing one or more Logical Volumes
  • Multiple Physical Volumes containing one Logical Volume
  • Multiple Physical Volumes containing one or more Logical Volume

The adjacent diagram summarizes the Volume Manager support for SnapProtect backup.

Options not applicable for DB2

The following options do not apply to snap restore for the DB2 iDataAgent:

DB2 Restore Options dialog box

DB2 Advanced Restore Options dialog box

Additional Options

Several additional options are available to further refine your backup operations. The following table describes the additional options:

Option Description Related topics
SCSI Reservation SCSI reservation can be enabled for SnapProtect backup for all the agents. Use the registry key nSCSIReserveForSnap to enable SCSI reservation. Enabling SCSI Reservation prevents other applications (SCSI3 compliant) from using the reserved SCSI Device (i.e. the mounted snapshot).
If this option is enabled and the hardware does not support this type of operation, subsequent data protection jobs may fail.
For more information on registry keys, Registry keys
Pre/Post Commands The Pre/Post commands for SnapProtect backup can either be executed on the proxy or the source computer. You can use the Pre/Post Process tab of the Subclient Properties dialog box to select where you wish to execute the Pre/Post commands. SnapProtect backup supports Pre/Post commands for the agents that support it.
Use of Pre/Post Snap commands is not supported when using Data Replicator as the storage array.
For more information on using the Pre/Post commands, see Pre/Post Processes.
View Snapshot Details You can view the details of a snapshot for an agent, job, or a snapshot copy. When you right-click any of these entities, you will be able to browse all the snapshots corresponding to the selected entity.
  1. From the CommCell Browser, right-click the entity that contains the snapshots you want to browse, and click All Tasks | List Snaps.
  2. The Snaps created during SnapProtect operation dialog box displays a list of all the snapshots created for the selected entity and displays important information about each snapshot, including the source mount path, snap mount path, the storage array, and the source client.
  3. Right-click the snapshot and click Details to view the snapshot properties.
 
Select a Job for Backup Copy You can select a specific job for creating backup copy. Once selected, the Move Snap to Tape field for the specific job will be changed to Picked (i.e., the next backup copy operation will move this job to media).
  1. Right-click a storage policy containing SnapProtect backup jobs, and then click View Jobs.
  2. Right-click the job and then click Pick for Backup Copy.
 
Disable a Job for Backup Copy You can prevent a job from being moved to media. You can apply this option to those jobs that were previously selected for moving to media. On selecting this option, the Move Snap to Tape field for the specific job will be changed to Not Picked (i.e., the next backup copy operation will not move this job to media).
  1. Right-click a storage policy containing SnapProtect backup jobs and then click View Jobs.
  2. Right-click the job and then click Do not Backup Copy.
 
Offline Snap Copy Job Summary Report Offline Snap Copy Job Summary Report provides job summary details of backup copy jobs for moving snapshots to media. See Backup Copy Job Summary Report for more details

Back to Top