9/06/2016

How to take data Online Backup in DB2?

Data Backups in DB2

Offline Backup:

Offline backup means we can take the data when there are no connections from the applications to the database. No need to configure any database configuration parameter such as LOGARCHMETH1, LOGARCHMETH2 etc..

Command:

db2 backup database <db-name> to <path> compress

Here compress shrinks the backup file size.

Online Backup:

We have different options in DB2 Online Data Backup. Those are:

==> Online Backup
==> Online Incremental Backup
==> Online Incremental Delta Backup

Online Backup:

To configure the Online Backup we must set the database configuration parameter "LOGARCHMETH1" or "LOGARCHMETH2" to a specific path or to logretain.

To set the "LOGARCHMETH1" parameter

db2 update db cfg for <db-name> using logarchmeth1 'DISK:/db2/db2backup/archive/'

Once it is done the database goes into backup pending state. To overcome this we must take the offline backup for the first time. Otherwise we cannot establish connection to the database.

How to take Full Online Data Backup:

db2 backup db <db-name> online to <path> compress include logs

Here include logs packs the logs which are required to recover the database in the same data backup image. So if we transfer backup image to a disaster recovery site, there is no need to send log files separately.

How to take Online Incremental Backup:

The data changes from the last full backup backed up in Incremental Backup. 

db2 backup db <db-name> online incremental to <path> compress

How to take Online Incremental Delta Backup:

The data changes from last full backup or incremental backup backed up in Incremental Delta Backup.

db2 backup db <db-name> online incremental delta to <path> compress


2 comments:

  1. If you really want to experience best storage and best online data synchronization, then it is better that you discover DataBaGG earliest and avail the best of solutions. Best Information Management Solutions

    ReplyDelete

ads