SnapProtect - Frequently Asked Questions - DB2

Table of Contents

Can I perform an SnapProtect backup for log files?

During an SnapProtect backup, log files are not moved to the snapshot copy even if you select Backup Log Files option in the subclient where the backup operation is being performed. Log files always use the traditional backup method, not the SnapProtect backup. Even if the data and logs are on the same subclient, the SnapProtect backup for data and the traditional log backup will run as two separate jobs.

Can I perform an SnapProtect backup while a log backup job is in progress?

No. When you perform an SnapProtect Backup while a log backup job is in progress, an SnapProtect job may fail. Hence, we recommend you to avoid performing an SnapProtect Backup while a log backup job is in progress.

Which volumes are included for snap during DB2 SnapProtect operation?

All the volumes that include the path listed in db2 "select dbpartitionnum, type, path from sysibmadm.dbpaths" for each db partition are snapped.

Is the volume with SnapProtect archive log path also snapped during a DB2 SnapProtect job?

No. The log backup is performed in a traditional backup method as a separate job.

If a subclient for DB2 SnapProtect backup contains both the data and logs, the log backup is initiated with a separate Job ID. During the data aging process, this may lead to pruning the data backup before a log backup if both the jobs are marked as FULL. Thus, the log backup would be marked as Incremental even though the entire set of logs available in SnapProtect log archive directory are backed up. The log backups are marked as incremental only to make the data and log backups as part of the same cycle.

Can I restore individual tablespaces from SnapProtect backups?

No. You cannot perform a tablespace restore (partial restore) from DB2 SnapProtect backups. However, you can perform a point-in-time restore of a tablespace from a regular backup image, if the last backup image is an SnapProtect backup on a snap copy or on a backup copy. You can restore an entire DB2 database from snap backup images on any copy.

Is the symbolic or soft link path supported for SnapProtect backup for this iDataAgent?

Yes, they are supported if you use a UNIX environment. The destination volumes referenced by Symbolic/Soft links are automatically included in the SnapProtect backups. Soft link directory structure is supported on both NFS and SAN volume.

What provisioning policies can I use?

Provisioning Policies are optional to use. During the creation of the secondary snapshot copy, the following Provisioning Policies are automatically created and available for selection in the CommCell Console:

  • SnapProtect_RAID-DP
  • SnapProtect_Dedupe
  • SnapProtect_Mirror_Destination

If you need to create your own provisioning policy, ensure it is defined with the following naming convention in the OCUM server:

SnapProtect_<provisioning_policy_name>

where "SnapProtect_" is the prefix required for the provisioning policy to be available in the SnapProtect software.

What happens when a vault or mirror copy is created?

During an Auxiliary Copy job, a new dataset is created or an existing dataset is modified with new data members, as explained in the following flow of events:

  1. When the SnapProtect software assigns data to the service catalogue, a new baseline transfer may have started in the OnCommand Unified Manager (OCUM) server.
  2. The Auxiliary Copy job details display its status as the baseline transfer is in progress.
  3. Once the baseline transfer is completed, the SnapProtect software adds the snaps to the backup list, and the backup starts with the OCUM.
  4. If SnapMirror is the destination copy, then the SnapProtect software sends a command to update the mirror.

    The OCUM job is monitored and marked as completed/failed depending on the OCUM job status.

How are snapshots copied during a backup copy operation?

The snapshots are copied to media in a sequential order. If you wish to perform an inline backup copy operation and a previously selected snapshot has not been copied to media, the current SnapProtect backup job will complete without creating the backup copy and you will need to create an offline backup copy for the current backup.

What should I take into account when using Retention by number of Jobs?

Configuring a storage policy or snapshot copy with job based retention is recommended for File System and File System like Agents, and not for Database Agents.

Review the following scenarios if you are using the retention by number of jobs configuration:

  • During a browse operation, deleted files may be displayed for recovery. If the jobs containing these files are pruned by the retention criteria, the deleted files will be irrecoverable.
  • You may need to manually delete jobs from deconfigured clients. These clients will continue to retain the old jobs since new jobs will not run again on them.
  • When you associate a new storage policy to a subclient, it is important to perform a full backup operation in order to be retained by the new storage policy. The old storage policy will continue to retain the old jobs until you manually delete them.

What UTF setting should be used for volume language?

To successfully browse and restore files on a NetApp filer that contain Unicode characters, it is recommended to use the UTF-8 setting for volume language. Please consult with NetApp for implications of changing volume language.

How is the OnCommand Unified Manager server affected when a snap copy is deleted?

If you delete a snapshot copy, the following components in the OnCommand Unified Manager server will be affected:

  • The storage services associated to the snapshot copy will be deleted.
  • Datasets associated with the deleted storage service will be deleted.

    Secondary volumes/datasets are not deleted as they are stored in case you need to perform a restore operation from a deleted dataset. Secondary datasets can be removed manually, if needed.

  • Any relationship associated with a dataset will be deleted within a configurable period of time defined in the OnCommand Unified Manager server.
  • Base snapshot copies remain available.

Can we automatically update DB2 parameters?

Yes. You can automatically update DB2 parameters (LOGARCHMETH1, LOGARCHOPT1, VENDOROPT, TRACKMOD, etc.,) using Db2_config.sh script to perform backups and restores.

On UNIX Clients:

This script is available in SnapProtect_path/iDataAgent on UNIX client. This Script can be used to set the DB2 Database Configurations to use SnapProtect DB2 on UNIX iDataAgent to perform a data backup on a single node DB2 Instance, Log Backup and Log Archival. This script also checks if the instance user has read/write permissions on the Archive/Retrieve/Audit error directories. You should be a DB2 instance user and need to be added to the UNIX group of SnapProtect to run this script.

 DB2 configurations that are modified are as follows:

LOGARCHMETH1
LOGARCHOPT1
VENDOROPT
LOGARCHMETH2 to OFF
TRACKMOD to ON

>./db2_config.sh -d testdb -i Instance001

Usage:
db2_config.sh -h
 
---- Prints usage information

db2_config.sh -d <dbname> [-i <SnapProtect_instance>]
 
---- Updates configuration settings for database <dbname> for the currently logged in db2 instance user. Optionally, you may specify a SnapProtect instance with which <dbname> configuration is to be configured.

If no SnapProtect instance is specified, Instance001 would be used.
  
---- Also verifies if the instance has read/write permissions on the Archive/Retrieve directories
dbserveaix3:/db2data/SnapProtect/iDataAgent>./Db2_config.sh -d db1 -i Instance001

Example:

# su - db2inst1
$ cd /opt/SnapProtect/iDataAgent
$ ./Db2_config.sh -d testdb -i Instance002
OPTIND is now 5
DBNAME=testdb INSTANCE=Instance002

Input:: DBNAME=testdb INSTANCE=Instance002

set_db_params
check_dir
get_db2_paths
/u01/database/db2/GDB2Archive
/u01/database/db2/GDB2Audit
/u01/database/db2/GDB2Retrieve
/u01/database/db2/GDB2Archive is accessible
/u01/database/db2/GDB2Retrieve is accessible
/u01/database/db2/GDB2Audit is accessible

get_base_dir
Base directory: /opt/simpana2/Base
DB2 User: db2inst1
DB2 Home: /home/db2inst1
DB2SYSC Path: /home/db2inst1/sqllib/adm/db2sysc
get_client_name
Client Name: ggux18
Executing:: db2 update db cfg for testdb using LOGARCHMETH1 VENDOR:/opt/SnapProtect/Base/libDb2Sbt.so
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
Executing:: db2 update db cfg for testdb using LOGARCHOPT1 CvClientName=ggux18,CvInstanceName=Instance002
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
Executing:: db2 update db cfg for testdb using VENDOROPT CvClientName=ggux18,CvInstanceName=Instance002
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
Executing:: db2 update db cfg for testdb using LOGARCHMETH2 OFF
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
Executing:: db2 update db cfg for testdb using TRACKMOD ON
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
<<<<<<<<<ENDED>>>>>>>>>
$

If you update LOGARCHOPT1 and VENDOROPT parameters, you must restart the database after running this script.

On Windows Clients:

The script Db2_config.ps1 is located under SnapProtect\Base location.
The Windows powershell needs run it from SnapProtect_instalation\Base\Db2_config.ps1.

Use the following steps to run this script from the DB2 command line prompt:

  1. Enable the powerShell script execution on the system:

    powershell Set-ExecutionPolicy Unrestricted

  2. Execute the script:

    powershell.\SnapProtect_instalation\Base\Db2_config.ps1

    Usage:

    db2_config.ps1
    -- Prints usage information
    db2_config.ps1 -d <dbname> [-i <SnapProtect_instance>]
    -- Updates configuration settings for database <dbname> for the default db2 instance.

  3. Disable the powerShell script execution on the system:

    powershell Set-ExecutionPolicy Restricted

Is multi instancing supported?

No. Multi instancing is not supported for SnapProtect backup.

Can I use Media Explorer to restore data?

No. Restore of SnapProtect backup data using Media Explorer is not supported. However, Media Explorer can be used to restore SnapProtect backup data from the backup copy.

How do I determine the number of streams to be used for a restore operation from an SnapProtect backup?

For DB2 iDataAgent, when restoring from a snapshot using file system, the number of streams depends on the number of mount points used for the restore operation. Similarly, when restoring from a backup copy using file system, the number of streams depends on the number of media groups used for the restore operation.

Can I perform an SnapProtect backup of RDM disks for an agent from a virtual machine host?

Yes. It is supported to run an SnapProtect backup operation of Raw Device Map (RDM) disks for any Windows-based Agent configured in a virtual machine. Ensure the iSCSI Initiator is configured on the client computer to access the storage device in order to perform a successful SnapProtect operation.

What are the commands used for device discovery?

During an SnapProtect backup job, the SnapProtect software runs a set of commands to discover storage devices.

The following table displays the commands that are used to list, rescan and delete adapters/devices for each operating system:

Operating System List Fibre Channel Adapters Rescan Fibre Channel Adapters Rescan ISCSI Devices Delete Device

AIX

<Base>/scan_fc_adapters.sh cfgmgr -l <hba_name> cfgmgr -l <iscsi_adapter> rmdev -d -l <hdisk_name>

HP-UX

<Base>/scan_fc_adapters.sh
  1. Obtain the path for the host bus adapter (HBA):

    ioscan -unfC fc

  2. Scan the HBA path

    ioscan -H <HBA_path>

  For Legacy HP-UX (earlier than 11.23):

rmsf –a <device>

For non-Legacy HP-UX:

  1. Obtain persistent name mapping:

    ioscan –m dsf

  2. Check device availability:

    ioscan –kNF <device>

  3. Delete the device:

    rmsf –H <device>

Linux

<Base>/scan_fc_adapters.sh
  1. Perform the hardware loop initialization (LIP):

    echo 1 > /sys/class/fc_host/<$host>/issue_lip

  2. Perform a SCSI mid-level rescan:

    echo '---' > /sys/class/fc_host/<$host>/scan

  • For Red Hat 4 computers:

    /sbin/iscsi -rescan

  • For SuSE Linux 9 computers:

    /etc/init.d/iscsi reload /bin/rescan-scsi-bus.sh -r –L 512 –w –c --nooptscan

  • For SuSE Linux 10 and Red Hat 5 computers:

    /sbin/iscsiadm -m session -R

echo 1 > /sys/block/<device>/device/delete

Solaris

<Base>/scan_fc_adapters.sh cfgadm -c configure <controller> devfsadm -i iscsi devfsadm -C -c disk

Can I create my own commands to perform device discovery?

Yes, you can customize the device deletion and the rescan logic by creating the following additional settings:

Key Description
DeleteDevice This key will trigger a custom script which will perform an OS level device deletion. Once all the devices are removed, the SnapProtect software will remove the LUNs from the storage arrays.

Use this key if you need to unmount snapshots that are mapped to either the proxy or source machine. The key will delete all devices mapped to the machine.

Follow the steps below to create this Additional Setting:

  1. From the CommCell Browser, navigate to Client Computers.
  2. Right-click the <Client>, and the click Properties.
  3. Click the Additional Settings tab.
  4. Click Add.
  5. In the Name box, type DeleteDevice. The Category and Type details will be automatically displayed.
  6. In the Value box, type the full path to the script. The device name will be passed as an argument.
  7. Click OK.
RefreshBUS This key will trigger a custom script for each host bus adapter that needs to be rescanned.

Use this key if you need to rescan the machine for any new devices each time a snapshot is mounted or unmounted.

Follow the steps below to create this Additional Setting:

  1. From the CommCell Browser, navigate to Client Computers.
  2. Right-click the <Client>, and the click Properties.
  3. Click the Additional Settings tab.
  4. Click Add.
  5. In the Name box, type RefreshBUS. The Category and Type details will be automatically displayed.
  6. In the Value box, type the full path to the script. The WWPN of the adapter will be passed as an argument.
  7. Click OK.

After creating the above Additional Settings, you can use the following script examples:

On Linux Computers

On AIX Computers

How does SnapProtect select target devices during clone or snap Operation?

When you configure an storage device using Array Management in the CommCell Console, the Device Group text box defines the target device group where SnapProtect will move the source and target devices during SnapProtect backup operations. This option does not specify the source device group (from where a device should be found during Snap/Clone operations.

The following table explains the default behavior for selecting a Snap or Clone target device:

Scenarios based on Array Management options Target device is selected from... Source and target devices are moved to...
Device Group is not specified and Use devices only from this device group is not checked Any device in the array CV_PROTECTION_GROUP device group
Device Group is not specified but Use devices only from this device group is checked CV_PROTECTION_GROUP device group CV_PROTECTION_GROUP device group
Device Group is specified but Use devices only from this device group is not checked Any device in the array The device group specified in Device Group
Device Group is specified and Use devices only from this device group is checked The device group specified in Device Group The device group specified in Device Group

Can I perform an app free restore (restoring an SnapProtect backup image on a disk) using CommCell Console?

No. You can only restore a regular backup image to a location on a disk. Currently, you cannot perform an app free restore (restoring an SnapProtect backup image on a disk) using CommCell Console.

Why can't I see the SnapProtect backup image on the Restore Options dialog?

The SnapProtect software uses a file system backup, so there is no backup image for the restore,  Use the Recover option.  Navigate to the Recover Database tab on the DB2 Restore Options dialog.

Why does the CommCell show the old storage path after updating the database log path?

DB2 requests that you restart the database after changing the online log path (newlogpath) parameter.  The DB2 Restore Options dialog box will show the correct storage paths after restarting the database and making a full backup.

Can I add a new storage path or tablespace container for an SnapProtect restore?

No, it is not supported. For an SnapProtect restore, the source and target  will be balanced. If there is one storage path on the source, then it should have only one storage path on the target database after the redirect restore.