Advanced Backup - DB2 iDataAgent

Table of Contents

Full Backups

Full backups provide the most comprehensive protection of data.

Backups for any client start with a full backup. The full backup becomes a baseline to which subsequent backup types are applied. For example, a full backup must be performed before a log backup can be initiated.

You can perform a full backup of an online or offline database. The default is online backup.

Use the following steps to run a full backup:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2 | <Instance> | <Backup_Set>.
  2. Right-click the <Subclient> and click Backup.
  3. Select Full as the backup type and click Immediate.
  4. Click OK.

    You can track the progress of the job from the Job Controller.  When the backup job has completed, the Job Controller displays Completed.

Incremental Backups

A DB2 incremental backup contains only the data that is new or has changed since the last full backup. On average, incremental backups consume less media and use less resources than full backups. The following illustration clarifies the nature of incremental backups. For simplicity, assume that there is a file system that contains five files as represented in the illustration:

Follow steps given below to perform an incremental backup:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2 | <Instance>  | <Backup_Set>.
  2. Right-click the <Subclient> and click Backup.
  3. Select Incremental as the backup type and click Immediate.
  4. Click OK.

    You can track the progress of the job from the Job Controller.  When the backup job has completed, the Job Controller displays Completed.

Differential or Delta Backups

A DB2 differential/delta backup contains only data that is new or has changed since the last backup (full, incremental, or delta), regardless of the type. On average, DB2 differential/delta backups consume less media and use less resources than full backups. The following illustration clarifies the nature of delta backups:

Follow steps given below to perform a differential/delta backup:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2 | <Instance> | <Backup_Set>.
  2. Right-click the <Subclient> and click Backup.
  3. Select Differential/Delta/Data Only as the backup type and click Immediate.
  4. Click OK.

    You can track the progress of the job from the Job Controller.  When the backup job has completed, the Job Controller displays Completed.

Data Only Backups

By default, differential/delta backups include logs during backups. However, you can exclude previously archived logs from backups and run a data only backup.

In order to perform a data only backup, the subclient should have been configured for data only backups. See Creating A Subclient for Data Only Backups for step-by-step instructions to create a separate subclient for data only backups.

Use the following steps to run a data only backup:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2 | <Instance> | <Backup_Set>.
  2. Right-click the <Subclient> configured for data only backup, and then click Backup.
  3. Select Differential/Delta/Data Only as the backup type and click Immediate.
  4. Click OK.

    You can track the progress of the job from the Job Controller.  When the backup job has completed, the Job Controller displays Completed.

Log Backups

You can apply the archive logs to an online backup in order to recover a lost or corrupted database. In order to perform an online backup with logs, the subclient should have been configured for online backups with logs. You can also configure an archive log subclient, or include the archive logs as part of an offline subclient.

See Creating A Subclient for Online Backups and  Creating A Subclient for Log Backups on how to create a separate subclient for log backups. log backups are always full backups.

Use the following steps to run backups with logs:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2 | <Instance> | <Backup_Set>.
  2. Right-click the <Subclient for Log Backups> and click Backup.
  3. Select Full as the backup type and click Immediate.
  4. Click OK.

    You can track the progress of the job from the Job Controller.  When the backup job has completed, the Job Controller displays Completed.

Disabling Switch Current Log

By default, when performing log backups, the current redo log file is closed (even if it is not filled up completely) and the next redo log file is used for writing using a log switch. The closed redo log file is then archived during the log phase. Use the following steps to disable the log switch:

Use the following steps to disable the current log switch:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2 | <Instance> | <Backup_Set>.
  2. Right-click the <Subclient> and click Properties.
  3. Click the Content tab.
  4. Click to clear the Backup Data box.

  1. Click Backup Arguments tab.
  2. Select the Backup Log Files check box.
  3. Select the Disable Switch Current Log check box.
  4. Click OK.

Offline Backup for Restoring a Non-Recoverable Database

DB2 supports backup and restore of an non-recoverable database.

Follow these steps.

  1. Disable the DB2 archive logs by setting the LOGREATAIN and LOGARCHMETH1 parameters to off.  See Configuring DB2 Database parameters ( Db2_config.sh/Db2_config.ps1 are not applicable for configuring non-recoverable databases.
  2. Configure this database on the CommCell.  Use either the default subclient or create a new subclient.  The subclient (whether default or new) must be offline and data only subclient.
  3. Run a full backup.

Performing an Offline Backup of a Standby Database

If you created a standby database by using the DB2 db2inidb command and the database is in a rollforward pending state and you have not applied logs, you must set the sSTANDBYBKUP additional setting to Y so that you can take an offline backup of the standby database.

Note: You cannot perform an offline backup for a HADR standby database if you apply the archive logs and leave the database in rollforward pending stage.

Procedure

  1. Enable the offline backup of a standby database
  2. Configure this database on the CommCell Console.  The subclient (whether default or new) must be offline subclient.
  3. Run a full backup.

Application Command Line Backups

Retention Rules for Command Line Full Backups

DB2 command line full backups are pruned based on the number of retention days.

Incremental backups performed through the CommCell Console after the command line full backup are kept, but will be orphaned when the command line full backup is aged. The DB2 history file has a record for the  incremental backups performed through the CommCell Console which depend on the command line full but the database is not recoverable from the incremental.

Command line jobs and  incremental backups performed through the CommCell Console must not be combined on the same database because they will not be recoverable.

Online Backups

Backup operations can also be performed from the application command line using the DB2 command prompt. In order to perform an application command line online backup, the Backup Set must be configured. Use the following steps to perform online backups from the application command line:

On a 32-Bit or 64-Bit Windows Platform:

Run the online backup command from the DB2 command prompt:

db2 backup db <database_name> online load '<software_install_path>\Base\Db2Sbt.dll'

where <database_name> is the name of the DB2 database and <software_install_path> is the install path for the agent software (e.g., level1/install).

On a 32-Bit or 64-Bit UNIX Platform:

Run the online backup command from the DB2 command prompt for a DB2 instance on a 32-bit AIX/Solaris or HP-UX or 32bit/64bit Linux or 31bit Linux on System Z:

db2 backup db <database name> load '<software install path>/Base/libDb2Sbt.so'

For a DB2 instance on 64-bit AIX/Solaris/HP PARISC or 64-bit Linux on System Z, replace Base with Base64.

Online Backups with Logs:

Run the following online backup command from the DB2 command prompt for online backups with logs:

db2 backup database <db_name> online load '<software install path>/Base/libDb2Sbt.so' include logs

where <db_name> is the name of the DB2 database and <software_install_path> is the install path for the agent software (e.g., level1/install).

Offline Backups

If a backup is run with the database offline, this job has an exclusive connection to the database; therefore, any other access to the database is not allowed while the backup is in progress. An offline backup cannot run if any other applications are already running on the database.

In order to perform a third-party command line offline backup, the backupset should be configured. Use the following steps to run offline backups from the third-party command line:

From the DB2 command prompt, type the appropriate offline backup command for the specific platform.

Example:

  • For a DB2 instance on a 32-bit AIX/Solaris or HP-UX or 32-bit/64-bit Linux or 31-bit Linux on System Z:

    db2 backup db <database_name> load '<software_install_path>/Base/libDb2Sbt.so'

  • For a DB2 instance on 64-bit AIX/Solaris/HP PARISC or 64-bit Linux on System Z:

    db2 backup db <database_name> load '<software_install_path>/Base64/libDb2Sbt.so'

  • For a DB2 instance on a 32-bit/64-bit Windows platform:

    db2 backup db <database_name> load '<software_install_path>\Base\Db2Sbt.dll'

    where <database_name> is the name of the DB2 database and <software_install_path> is the install path for the agent software (e.g., level1/install).

Delta or Incremental Backups

Use the following steps to run delta/incremental backups from the third-party command line:

db2 backup db <database_name> incremental [delta] load '<software_install_path>\Base\Db2Sbt.dll'

The incremental is for incremental backup; the incremental delta is for delta backup.

Performing Multi-Stream Backups

DB2 third party command line backups running on multiple streams will share a single Job ID in the Job Manager.

Use the following steps to run multi stream backups from the third party command line:

From the DB2 command prompt, type the backup command.

Example:

On UNIX Client:

db2 backup database database_name online load 'software_install_path/Base/libDb2Sbt.so' open <num_backup_sessions> sessions

On Windows Client:

db2 backup database <database_name> online load 'software_install_path\Base\Db2Sbt.dll' open <num_backup_sessions> sessions

where:

<database_name> is the name of the DB2 database

<software_install_path> is the install path for the agent software (e.g., level1/install

<num_backup_sessions> is the number of open sessions to use for the backup

For a DB2 instance on 64-bit AIX/Solaris/HP PARISC or 64-bit Linux on System Z, replace Base with Base64.

Scheduling Backups

Follow the steps given below to schedule a backup:
  1. From the CommCell Browser, navigate to Client Computers | <Client> | DB2 | <Instance> | <Backup Set>.
  2. Right-click the <Subclient> and click Backup.
  3. Select the Backup type.

  4. Click Schedule to schedule the backup for a specific time.
  5. Click Configure to set the schedule for the backup job. The Schedule Details dialog displays.

  6. Select the appropriate scheduling options. For example:

    Click Weekly.

    Check the days you want the run the backup job.

    Change the Start Time to 9:00 PM.

    Click OK to close the Schedule Details dialog.

    Click OK to close the Backup Options dialog.

  7. The backup job will execute as per the schedule.

Managing Jobs

Jobs can be managed in a number of ways. The following sections provide information on the different job management options available:

Restarting Jobs

Jobs that fail to complete successfully are automatically restarted based on the job restartability configuration set in the Control Panel. Keep in mind that changes made to this configuration will affect all jobs in the entire CommCell.

To Configure the job restartability for a specific job, you can modify the retry settings for the job. This will override the setting in the Control Panel. It is also possible to override the default CommServe configuration for individual jobs by configuring retry settings when initiating the job. This configuration, however, will apply only to the specific job.

Backup jobs for this Agent are resumed from the point-of-failure.

Configure Job Restartability at the CommServe Level

  1. From the CommCell Browser, click Control Panel icon.
  2. Select Job Management.
  3. Click Job Restarts tab and select a Job Type.
    • Select Restartable to make the job restartable.
    • Change the value for Max Restarts to change the maximum number of times the Job Manager will try to restart a job.
    • Change the value for Restart Interval (Mins) to change the time interval between attempts for the Job Manager to restart the job.
  4. Click OK.

Configure Job Restartability for an Individual Job

  1. From the CommCell Console, navigate to Client Computers | <Client> | DB2 | <Instance> | <Backup Set>.
  2. Right-click the <Subclient> and select Backup.
  1. Click Advanced.
  2. In the Advanced Backup Options dialog box, click the Job Retry tab.
  3. Select Enable Total Running Time and specify the maximum elapsed time before a job can be restarted or killed.

    Select Kill Running Jobs When Total Running Time Expires to kill the job after reaching the maximum elapsed time.

  4. Select Enable Number Of Retries and specify the number of retries.
  5. Click OK.

Controlling Jobs

The following controls are available for running jobs in the Job Controller window:

Suspend

Temporarily stops a job. A suspended job is not terminated; it can be restarted at a later time.

Resume

Resumes a job and returns the status to Waiting, Pending, Queued, or Running. The status depends on the availability of resources, the state of the Operation Windows, or the Activity Control setting.

Kill

Terminates a job.

Suspending a Job

  1. From the Job Controller of the CommCell Console, right-click the job and select Suspend.
  2. The job status may change to Suspend Pending for a few moments while the operation completes. The job status then changes to Suspended.

Resuming a Job

  1. From the Job Controller of the CommCell Console, right-click the job and select Resume.
  2. As the Job Manager attempts to restart the job, the job status changes to Waiting, Pending, or Running.

Killing a Job

  1. From the Job Controller of the CommCell Console, right-click the job and select Kill.
  2. Click Yes when the confirmation prompt appears if you are sure you want to kill the job. The job status may change to Kill Pending for a few moments while the operation completes. Once completed, the job status will change to Killed and it will be removed from the Job Controller window after five minutes.

Additional Options

The following table describes the available additional options to further refine your backup operations:
Option Description Related Topics
Startup Options

The Startup Options are used by the Job Manager to set priority for resource allocation. This is useful to give higher priority to certain jobs. You can set the priority as follows:

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and click Startup tab.
  3. Click Change Priority.
  4. Enter a priority number - 0 is the highest priority and 999 is the lowest priority.
  5. Select the Start up in suspended State check box to start the job in a suspended state.
  6. Click OK.
Refer to Job Priority and Priority Precedence.
Alerts

This option enables users or user groups to get automatic notification on the status of the data protection job. Follow the steps given below to set up the criteria to raise notifications/alerts:

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and select the Alert tab.
  3. Click Add Alert.
  4. From the Add Alert Wizard dialog box, select the required threshold and notification criteria and click Next.
  5. Select the required notification types and click Next.
  6. Select the recipients and click Next.
  7. Click Finish.
  8. Click OK.
Refer to Alerts and Notifications.
Vault Tracker

This feature provides the facility to manage media that is removed from a library and stored in offsite locations. Depending on your Vault Tracker setup, select the required options. Use the following steps to access and select the Vault Tracker options.

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and select the Vault Tracking tab.
  3. Select the required options.
  4. Click OK.
Refer to Vault Tracker.
Extended Data Retention

This option allows you to extend the expiration date of a specific job. This will override the default retention set at the corresponding storage policy copy. Follow the steps given below to extend the expiration date:

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and select the Media tab.
  3. Select one of the following options:
    • Infinite - Select this option to extend the expiration date by infinite number of days
    • Number of day - Select this option to specify the number of days to extend the expiration date and then enter the number of days.
  4. Click OK.
Refer to Extended Retention Rules.
Allow Other Schedules To Use Media Set

The Allow Other Schedules to use Media Set option allows jobs that are part of the schedule or schedule policy and using the specific storage policy to start a new media. It also prevents other jobs from writing to the same set of media.

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and select the Media tab.
  3. Select the Allow Other Schedules To Use Media Set check box.
  4. Click OK.
Refer to Creating an Exportable Media Set.
Mark Media Full

This option marks the media as full, two minutes after the successful completion of the data protection job. This option prevents another job from writing to this media. Follow the steps given below:

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and select Media tab.
  3. Select the Mark Media Full on Success check box.
  4. Click OK.
Refer to Start New Media.
Start New Media

The Start New Media option enables you to start the data protection operation on a new media. This feature provides control over where the data physically resides. Use the following steps to start the data protection operation on a new media:

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and select the Media tab.
  3. Select the Start New Media check box.
  4. Click OK.
Refer to Start New Media.
Data Path Options

Data Protection operations use a default Library, MediaAgent, Drive Pool, and Drive as the Data Path. You can use this option to change the data path if the default data path is not available. Follow the steps given below to change the default data path:

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

  1. Right-click the Subclient in the right pane and click Backup.
  2. Click Advanced and select the Data Path tab.
  3. Select the MediaAgent and Library.
  4. Select the Drive Pool and Drive for tape library.
  5. Click OK.
Refer Change Data Path.
CommCell Readiness Report The CommCell Readiness Report provides you with vital information such as connectivity and readiness of the Client, MediaAgent, and CommServe. It is useful to run this report before performing a backup or a recovery operation. Follow the steps given below to generate the report:
  1. On the CommCell Console menu bar, select the Reports tab.
  2. Click Readiness.

    The Report Selection dialog box appears.

  3. If necessary, select Reports | CommServe | CommCell Readiness in the left pane.
  4. Select the Computers tab, and then click Modify below the Computers list.
  5. In the dialog box that appears, clear Include All Client Computers and All Client Groups.
  6. Select the appropriate client from the Exclude list, and then click Include >.
  7. Click OK.
  8. Select the MediaAgent tab, and then clear Include All MediaAgents.
  9. Select the appropriate MediaAgent from the Exclude list, and then click Include >.
  10. Click Run.

    The report appears in your default Web browser.

Refer to CommCell Readiness Report.
Backup Job Summary Report The Backup Job Summary Report provides you with information about all the backup jobs that are run in last 24 hrs for a specific subclient. You can get information such as status, time, data size etc. for each backup job. It is useful to run this report after performing the backup. Follow the steps given below to generate the report:
  1. From the Tools menu in the CommCell Console, click Reports.
  2. Navigate to Reports | Jobs | Job Summary.
  3. Click Data Management on the General tab in the right pane.
  4. Click the Computers tab.
  5. Click Subclient and select the Edit tab.
  6. Navigate to Client Computers | <Client> | File System | Backup Set | Subclient.
  7. Click Run.
Refer to Backup Job Summary Report.
Calendar Backup Job Summary Report The Calendar Backup Job Summary Report provides the total amount of backup jobs run (along with their job status) for a specified time period. Follow the steps given below to generate the report:
  1. From the Tools menu in the CommCell Console, click Reports.
  2. Navigate to Reports | Jobs | Job Summary.
  3. Click Data Management on the General tab in the right pane, and then click Calendar.
  4. Click Run.
Refer to Backup Job Summary Report.