Advanced - SAP for MAXDB Restore

Table of contents

Related Topics

Choosing Restore Types

Choosing the Restore Destination

Restoring to a Different Client (Cross Machine Restore)

Restoring to a Different Client With Different Database Name (Cross Machine Restore)

Restoring a Full Backup

Restoring Incremental Backup

Restoring Logs

Restoring Automatic Logs

Restore from a secondary copy

Restore Using a Specific Library or Drive Pool

Manage Restore Jobs

Control Jobs

Capabilities and Required Actions

Provides comprehensive information on licensing.

Choosing Restore Types

When restoring SAP for MAXDB data, it is important to consider the backup type that was originally performed.

The following table illustrates the types of restores available for each backup type:

Backup Type

Restore Level

Notes

Offline Backup Restore Entire Database

Recover Database

Since the database is offline and is consistent, there is no need for logs.
Online Backup Restore Entire Database

Restore Logs

 
Selective Online Full Backup Restore Entire Database

Restore Logs

 
Log backup Restore Logs  

Choosing the Restore Destination

By default, this iDataAgent restores data to the client computer from which it originated; this is referred to as an in-place restore. You can also restore the data to another client computer in the CommCell. Keep in mind the following considerations when performing such restores:

The following section enumerates the types of restore destinations that are supported by this iDataAgent.

In-Place Restore

When restoring data, the SAP for MAXDB iDataAgent provides the facility to restore the data to the same path/destination on the client computer from which the data originated; this is referred to as an in-place restore.

Out-of-Place Restore

You can also restore data to a different client computer in the CommCell using the same path/destination. This can include restoring either individual data or the entire database to another computer.

Keep in mind the following considerations when you perform out-of-place restores:

Restoring to a Different Client (cross machine restore)

In cases when the original client computer is damaged, you need to restore the SAP for MAXDB database to a different host. This is called a cross-machine restore. Whenever you perform such a restore, ensure that the destination machine has sufficient disk space to accommodate the restored database.

Prior to performing a cross-machine restore, perform the following:

  1. Build a secondary (destination) client computer, and assign a different name to this computer. Both the source client computer and the destination client computer must have the same operating system.
  2. Install the SAP for MAXDB software on the destination client. On the destination client, create the database and volume that are identical to those on the source client. Ensure that the database is in ADMIN mode.
  3. Install the SAP for MAXDB iDataAgent on the destination client and configure the database instance on the CommServe.
  4. Define a backup medium on the destination computer using the medium_put command.
  5. In the parameter file, include the srccrossclient parameter followed by the name of the source client. For example:

    srccrossclient

    magnum.company.com

  6. If the dbm.knl and dbm.ebf catalog files do not exist on the destination client and if the source client is still available, copy these files if they are available. Otherwise, restore these files manually by using the Backint interface.

    For example:

    1. Get the full set of backup job IDs. Specifically, create an input file called file1.txt. Ensure that the contents of the file is #NULL, and run an inquiry to get a list of backups. For example:

      backint -u -f inquire -t file -p param -l file1.txt

    2. Using the last job ID to get the catalog files, create an input file called file2.txt, and include the last job ID in the file (e.g., SAP_0_28). Then execute the following command:

      backint -u -f inquire -t file -p param -i file2.txt

    3. Restore the catalog files. Specifically, create an input file called file3.txt. Include contents similar to the following in the file:

      SAP_0_28 d:\maxdb\sdb\data\wrk\CLDB\dbm.ebf

      SAP_0_28 d:\maxdb\sdb\data\wrk\CLDB\dbm.knl

      Then, execute the following command to restore the dbm.knl and dbm.ebf catalog files:

      backup backint -u -f restore -t file -p param -i inp3.txt

  7. Perform the required data and log restores to the destination client by using the following command:

    backup_ext_ids_get BACKData2

    backup_ext_ids_list

    Activate the database and recover the full backup. Use a comma to separate each ID specified.

    db_activate RECOVER BACKData2 DATA ExternalBackupID "… , …"

    Then, restore from the incremental backups.

    recover_start BackPages2 PAGES ExternalBackupID "… , …"

    Then, restore all the logs.

    recover_start BackLog LOG ExternalBackupID "…"

    recover_replace BackLog ExternalBackupID "…"

    recover_replace BackLog ExternalBackupID "…"

    recover_ignore

Same Operating System - Different Version

Restoring data associated with different versions of the operating system is supported. For example, you can restore file system data secured from a Windows 2000 client computer to a client computer with Windows 2003, or Solaris 7 to Solaris 8, etc. If you plan to do a full system restore on a Windows 2003 Server with an x64 platform, use an SAP for MAXDB iDataAgent for backup on x64 platform. You cannot do a full system restore on an x64 platform if you are using SAP for MAXDB iDataAgent for 32bit platform.

Restoring to a Different Client with Different Database Name (Cross Machine Restore)

In cases when the original client computer is damaged, you need to restore the SAP for MAXDB database to a different host. This is called a cross-machine restore. Whenever you perform such a restore, ensure that the destination machine has sufficient disk space to accommodate the restored database.

Prior to performing a cross-machine restore, perform the following:

  1. Build a secondary (destination) client computer, and assign a different name to this computer. Both the source client computer and the destination client computer must have the same operating system.
  2. Install the SAP for MaxDB software on the destination client. Ensure that the SAP for MaxDB software version is same for the source and destination client.
  3. On the destination client, create the database and volume that are identical to those on the source client. Ensure that the database is in ADMIN mode.
  4. Install the SAP for MaxDB iDataAgent on the destination client and configure the database instance on the CommServe.
  5. Define a backup medium on the destination computer using the medium_put command.
  6. In the parameter file, add the parameters srcCrossClient and srcCrossDbName followed by the name of the source and destination clients:
    For example:

    srcCrossClient

    sybserver5

    srcCrossDbName

    CERT1

  7. From the CommCell Console, configure an instance for the destination client. For step-by-step instructions, see Getting Started - SAP MaxDB iDataAgent - Configuration.
  8. From the source client, execute the following backups using the given commands:

    B1 – Full Online Backup

    Execute the following command to perform a full online backup:

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN
    ---

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL -c backup_start BackData2 Migration
    OK
    Returncode 0
    Date 20130808
    Time 00104536
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 432
    Pages Left 0
    Volumes 2
    Medianame BackData2
    Location /opt/sdb/data/cert1/files/pipe_mem2
    Errortext
    Label DAT_000000018
    Is Consistent true
    First LOG Page 26520
    Last LOG Page
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00104449
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 393
    Devices Used 2
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page 0
    Converter Page Count 12

    B2 – Incremental Backup in Cold (Offline) Mode

    Execute the following command to perform an incremental backup in cold (offline) mode:

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN
    ---
    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL -c backup_start BackPages2 Migration
    OK
    Returncode 0
    Date 20130808
    Time 00105614
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 4024
    Pages Left 0
    Volumes 2
    Medianame BACKPages2
    Location /opt/sdb/data/cert1/files/pipe_mem4
    Errortext
    Label PAG_000000019
    Is Consistent true
    First LOG Page 37186
    Last LOG Page
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00105612
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 3971
    Devices Used 2
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page 0
    Converter Page Count 12

    B3 - Backup of Logs

    Execute the following command to perform backup of logs:

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm db_warm
    OK
    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL -c backup_start BackLog
    OK
    Returncode 0
    Date 20130808
    Time 00110905
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10824
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert1/files/pipe_mem5
    Errortext
    Label LOG_000000005
    Is Consistent
    First LOG Page 26290
    Last LOG Page 37186
    DB Stamp 1 Date 20130807
    DB Stamp 1 Time 00183022
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00105612
    Page Count 10803
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    B4 – Incremental Backup in Warm (Online) Mode

    Execute the following command to perform an incremental backup in warm (online) mode:

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL -c backup_start BackPages2 Recovery
    OK
    Returncode 0
    Date 20130808
    Time 00111617
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 8288
    Pages Left 0
    Volumes 2
    Medianame BACKPages2
    Location /opt/sdb/data/cert1/files/pipe_mem4
    Errortext
    Label PAG_000000020
    Is Consistent true
    First LOG Page 48088
    Last LOG Page
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00111617
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 8240
    Devices Used 2
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page 0
    Converter Page Count 18

    B5 – Full Backup in Warm (Online) Mode

    Execute the following command to perform a full backup in warm (online) mode:

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL -c backup_Start BackData2 Recovery
    OK
    Returncode 0
    Date 20130808
    Time 00112006
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 8664
    Pages Left 0
    Volumes 2
    Medianame BackData2
    Location /opt/sdb/data/cert1/files/pipe_mem2
    Errortext
    Label DAT_000000021
    Is Consistent true
    First LOG Page 48089
    Last LOG Page
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00112005
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 8622
    Devices Used 2
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page 0
    Converter Page Count 18

    B6 – Backup of Logs

    Execute the following command to perform backup of logs:

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL -c backup_start BackLog
    OK
    Returncode 0
    Date 20130808
    Time 00112600
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert1/files/pipe_mem5
    Errortext
    Label LOG_000000006
    Is Consistent
    First LOG Page 37187
    Last LOG Page 48089
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00111435
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112005
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    B7 – Backup of Logs Again

    Execute the following command to perform backup of logs again:

    sybserver5:/opt/sdb/data/cert1/data # dbmcli -d CERT1 -u dbm,dbm -uUTL -c backup_start BackLog
    OK
    Returncode 0
    Date 20130808
    Time 00112910
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert1/files/pipe_mem5
    Errortext
    Label LOG_000000007
    Is Consistent
    First LOG Page 48090
    Last LOG Page 58990
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00112828
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112846
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

  9. To get the catalog files for backup IDs, copy the dbm.knl and dbm.ebf files from the source client to the destination client.

    [root@sybserver2 wrk]# scp root@sybserver5.commvault.com:/opt/sdb/data/cert1/wrk/dbm.ebf .
    [root@sybserver2 wrk]# scp root@sybserver5.commvault.com:/opt/sdb/data/cert1/wrk/dbm.knl .
    [root@sybserver2 wrk]# cat dbm.ebf
    5203AF100003|DAT_000000018|CERT1 1023362_78302 /opt/sdb/data/cert1/files/pipe_mem1|DATA MIGRATION|2013-08-08 10:45:36|BACK|0||BackData2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem1|0|
    5203AF100003|DAT_000000018|CERT1 1023362_78302 /opt/sdb/data/cert1/files/pipe_mem2|DATA MIGRATION|2013-08-08 10:45:36|BACK|0||BackData2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem2|1|
    5203B18C0010|PAG_000000019|CERT1 1023362_78308 /opt/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2013-08-08 10:56:14|BACK|0||BACKPages2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem3|0|
    5203B18C0010|PAG_000000019|CERT1 1023362_78308 /opt/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2013-08-08 10:56:14|BACK|0||BACKPages2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem4|1|
    5203B4910012|LOG_000000005|CERT1 1023362_78322 /opt/sdb/data/cert1/files/pipe_mem5|LOG RECOVERY |2013-08-08 11:09:05|BACK|0||BackLog|vftPipe|NO|0|8|S|/opt/sdb/data/cert1/files/pipe_mem5|0|
    5203B6410015|PAG_000000020|CERT1 1023362_78327 /opt/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2013-08-08 11:16:17|BACK|0||BACKPages2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem3|0|
    5203B6410015|PAG_000000020|CERT1 1023362_78327 /opt/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2013-08-08 11:16:17|BACK|0||BACKPages2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem4|1|
    5203B7250017|DAT_000000021|CERT1 1023362_78331 /opt/sdb/data/cert1/files/pipe_mem1|DATA MIGRATION|2013-08-08 11:20:06|BACK|0||BackData2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem1|0|
    5203B7250017|DAT_000000021|CERT1 1023362_78331 /opt/sdb/data/cert1/files/pipe_mem2|DATA MIGRATION|2013-08-08 11:20:06|BACK|0||BackData2|vftPipe|NO|0|8|M|/opt/sdb/data/cert1/files/pipe_mem2|1|
    5203B8880019|LOG_000000006|CERT1 1023362_78333 /opt/sdb/data/cert1/files/pipe_mem5|LOG RECOVERY |2013-08-08 11:26:00|BACK|0||BackLog|vftPipe|NO|0|8|S|/opt/sdb/data/cert1/files/pipe_mem5|0|
    5203B946001C|LOG_000000007|CERT1 1023362_78335 /opt/sdb/data/cert1/files/pipe_mem5|LOG RECOVERY |2013-08-08 11:29:10|BACK|0||BackLog|vftPipe|NO|0|8|S|/opt/sdb/data/cert1/files/pipe_mem5|0|

  10. From the destination client, execute the following restores using the given commands:

    db_activate Database to the First Full Backup (B1)

    Execute the following command to activate database to the first full backup:

    dbmcli on cert2>db_activate recover BackData2 DATA ExternalBackupID "CERT1 1023362_78302 /opt/sdb/data/cert1/files/pipe_mem1,CERT1 1023362_78302 /opt/sdb/data/cert1/files/pipe_mem2"
    OK
    Returncode 0
    Date 20130808
    Time 00084709
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 424
    Pages Left 0
    Volumes 2
    Medianame BackData2
    Location /opt/sdb/data/cert2/files/pipe_mem2
    Errortext
    Label DAT_000000018
    Is Consistent true
    First LOG Page 26520
    Last LOG Page
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00104449
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 393
    Devices Used 2
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page 0
    Converter Page Count 12

    Restore of the Incremental Backup (B2)

    Execute the following command to restore from an incremental backup:

    dbmcli on cert2>recover_start BackPages2 PAGES ExternalBackupID "CERT1 1023362_78308 /opt/sdb/data/cert1/files/pipe_mem3,CERT1 1023362_78308 /opt/sdb/data/cert1/files/pipe_mem4"
    OK
    Returncode 0
    Date 20130808
    Time 00084940
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 4016
    Pages Left 0
    Volumes 2
    Medianame BACKPages2
    Location /opt/sdb/data/cert2/files/pipe_mem3
    Errortext
    Label PAG_000000019
    Is Consistent true
    First LOG Page 37186
    Last LOG Page
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00105612
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 3971
    Devices Used 2
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page 0
    Converter Page Count 12

    Restore of the Log Backup (B3)

    Execute the following command to restore from the log backup:

    dbmcli on cert2>recover_start BackLog LOG ExternalBackupID "CERT1 1023362_78322 /opt/sdb/data/cert1/files/pipe_mem5"
    OK
    Returncode -8020
    Date 20130808
    Time 00085125
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10824
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert2/files/pipe_mem5
    Errortext
    Label LOG_000000005
    Is Consistent
    First LOG Page 26290
    Last LOG Page 37186
    DB Stamp 1 Date 20130807
    DB Stamp 1 Time 00183022
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00105612
    Page Count 10803
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    Restore of the Log Backup (B6)

    Execute the following command to restore from the log backup:

    dbmcli on cert2>recover_replace BackLog ExternalBackupID "CERT1 1023362_78333 /opt/sdb/data/cert1/files/pipe_mem5"
    OK
    Returncode -8020
    Date 20130808
    Time 00085327
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert2/files/pipe_mem5
    Errortext
    Label LOG_000000006
    Is Consistent
    First LOG Page 37187
    Last LOG Page 48089
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00111435
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112005
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    Restore of the Log Backup (B7)

    Execute the following command to restore from the log backup again:

    dbmcli on cert2>recover_replace BackLog ExternalBackupID "CERT1 1023362_78335 /opt/sdb/data/cert1/files/pipe_mem5"
    OK
    Returncode -8020
    Date 20130808
    Time 00085545
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert2/files/pipe_mem5
    Errortext
    Label LOG_000000007
    Is Consistent
    First LOG Page 48090
    Last LOG Page 58990
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00112828
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112846
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    Completion of Restores

    Run the following command after the restore is complete:

    dbmcli on cert2>recover_ignore
    OK
    Returncode 0
    Date 20130808
    Time 00085545
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert2/files/pipe_mem5
    Errortext
    Label LOG_000000007
    Is Consistent
    First LOG Page 48090
    Last LOG Page 58990
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00112828
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112846
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    Check Database

    Verify the database after the restore:

    dbmcli on cert2>db_state
    OK
    State
    ONLINE
    dbmcli on cert2>quit
    OK
    [root@sybserver2 log]# sdbfill CERT2 check 0 3000000 10000 0 a DBA DBA
    Checking table 'sdbfill'.
    Fetched first (0 0.000000 0.000000)
    table 'sdbfill' is OK.

  11. Now, execute the following commands for another round of restores.

    db_activate Database to the Full Backup (B5)

    Execute the following command to activate database to the full backup:

    dbmcli on cert2>db_activate recover BackData2 DATA ExternalBackupID "CERT1 1023362_78331 /opt/sdb/data/cert1/files/pipe_mem1,CERT1 1023362_78331 /opt/sdb/data/cert1/files/pipe_mem2"
    OK
    Returncode 0
    Date 20130808
    Time 00092027
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 8656
    Pages Left 0
    Volumes 2
    Medianame BackData2
    Location /opt/sdb/data/cert2/files/pipe_mem2
    Errortext
    Label DAT_000000021
    Is Consistent true
    First LOG Page 48089
    Last LOG Page
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00112005
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 8622
    Devices Used 2
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page 0
    Converter Page Count 18

    Restore of the Log Backup (B6)

    Execute the following command to restore from the log backup:

    dbmcli on cert2>recover_replace BackLog LOG ExternalBackupID "CERT1 1023362_78333 /opt/sdb/data/cert1/files/pipe_mem5"
    OK
    Returncode -8020
    Date 20130808
    Time 00092417
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert2/files/pipe_mem5
    Errortext
    Label LOG_000000006
    Is Consistent
    First LOG Page 37187
    Last LOG Page 48089
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00111435
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112005
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    Restore of the Log Backup (B7)

    Execute the following command to restore from the log backup again:

    dbmcli on cert2>recover_replace BackLog ExternalBackupID "CERT1 1023362_78335 /opt/sdb/data/cert1/files/pipe_mem5"
    OK
    Returncode -8020
    Date 20130808
    Time 00092538
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert2/files/pipe_mem5
    Errortext
    Label LOG_000000007
    Is Consistent
    First LOG Page 48090
    Last LOG Page 58990
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00112828
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112846
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    Completion of Restores

    Run the following command after the restore is complete:

    dbmcli on cert2>recover_ignore
    OK
    Returncode 0
    Date 20130808
    Time 00092538
    Server sybserver5
    Database CERT1
    Kernel Version Kernel 7.8.02 Build 021-121-242-175
    Pages Transferred 10832
    Pages Left 0
    Volumes 1
    Medianame BackLog
    Location /opt/sdb/data/cert2/files/pipe_mem5
    Errortext
    Label LOG_000000007
    Is Consistent
    First LOG Page 48090
    Last LOG Page 58990
    DB Stamp 1 Date 20130808
    DB Stamp 1 Time 00112828
    DB Stamp 2 Date 20130808
    DB Stamp 2 Time 00112846
    Page Count 10815
    Devices Used 1
    Database ID sybserver5:CERT1_20130723_163654
    Max Used Data Page
    Converter Page Count

    Check Database

    Verify the database after the restore:

    [root@sybserver2 log]# sdbfill CERT2 check 0 3000000 10000 0 a DBA DBA
    Checking table 'sdbfill'.
    Fetched first (0 0.000000 0.000000)
    table 'sdbfill' is OK.

Restoring a Full Backup

At times, if the database gets corrupted, you might need to restore the entire database and recover it back to the current state. However, in order to recover a database, you will also need to restore the logs. You can perform a restore operation to restore and recover an entire database. You can restore the database in-place or out-of-place using the same path/destination.

1. Open the DBM Command line Interface and verify the status of the database. #> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

2. MAXDB should be in admin (cold) state to perform a basic restore operation. If the database is in online (warm) mode, execute the following command. #> dbmcli -d CERT1 -u dbm,dbm db_cold
3. Type the following command to check all backup IDs. The command should return OK. # dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>

backup_ext_ids_get BackData2

OK

4. Type the following command to list all the External Backup ID's. The command should return OK and display a list of all External Backup ID's. dbmcli on CERT1>

backup_ext_ids_list

OK

END

5. Type the following command to execute the restore of entire database. For Unix:

dbmcli on CERT1>recover_start

BackData2 DATA

ExternalBackupID

"CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem3,

CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem4

For Windows:

dbmcli on CERT1>recover_start

BackData2 DATA

ExternalBackupID

"CERT1 SAP_1011379_351

\\.\pipe\pipe_mem1,

CERT1 SAP_1011379_351

\\.\pipe\pipe_mem2"

6. The restore should complete without any errors. dbmcli on CERT1>exit

OK

Restoring Incremental Backup

Use the following steps to restore an incremental backup:

1. Open the DBM Command line Interface and verify the status of the database. #> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

2. Type the command to check for all backup IDs. The command should return OK. # dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>

backup_ext_ids_get BackData2

OK

3. Type the command to list all the External Backup ID's. The command should return OK and display a list of all External Backup ID's. dbmcli on CERT1>

backup_ext_ids_list

OK

END

4. Type the command to execute the restore of an incremental backup For Unix:

dbmcli on CERT1>recover_start

BackPages2 PAGES ExternalBackupID

"CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem3,

CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem4

For Windows:

dbmcli on CERT1>recover_start

BackPages2 PAGES ExternalBackupID

"CERT1 SAP_1011379_352

\\.\pipe\pipe_mem3,

CERT1 SAP_1011379_352

\\.\pipe\pipe_mem4"

5. The restore should complete without any errors. dbmcli on CERT1>exit

OK

Restoring Logs

Use the following steps to restore the logs:

1. Open the DBM Command line Interface and verify the status of the database. #> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

2. Type the command to verify all backup IDs. The command should return OK. # dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>

backup_ext_ids_get BackData2

OK

3. Type the command to list all the External Backup ID's. The command should return OK and display a list of all External Backup ID's. dbmcli on CERT1>

backup_ext_ids_list

OK

END

4. Type the commands to restore the logs. For Unix:

dbmcli on CERT1>recover_start

BackLog LOG ExternalBackupID

"CERT1 SAP_1020127_8509

/space/sdb/data/cert1/files/pipe_mem5”

For Windows:

dbmcli on CERT1>recover_replace

BackLog ExternalBackupID

"CERT1 SAP_1011379_353

\\.\pipe\pipe_mem5"

5. The restore should complete without any errors. dbmcli on CERT1>exit

OK

Restoring Automatic Logs

Use the following steps to restore automatic log backups:

Prepare for Restores

Type the command to acquire the backup ID's:
[root@sappg54 files]# dbmcli -d CERT1 -u dbm,dbm
dbmcli on CERT1>backup_ext_ids_get BackData2
OK

---
dbmcli on CERT1>backup_ext_ids_list
OK
END
AVAILABLE|CERT1 SAP_xxxxxxx_8506 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-02 23:13:45|
AVAILABLE|CERT1 SAP_xxxxxxx_8506 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-02 23:13:45|
AVAILABLE|CERT1 SAP_xxxxxxx_8507 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-02 23:15:25|
AVAILABLE|CERT1 SAP_xxxxxxx_8507 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-02 23:15:25|
AVAILABLE|CERT1 SAP_xxxxxxx_8508 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-02 23:18:53|
AVAILABLE|CERT1 SAP_xxxxxxx_8508 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-02 23:18:53|
AVAILABLE|CERT1 SAP_xxxxxxx_8509 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:20:17|
AVAILABLE|CERT1 SAP_xxxxxxx_8511 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_xxxxxxx_8511 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_xxxxxxx_8514 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_xxxxxxx_8514 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_xxxxxxx_8517 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:27:17|
AVAILABLE|CERT1 SAP_xxxxxxx_8518 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:34:43|
AVAILABLE|CERT1 SAP_xxxxxxx_8519 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:35:03|
AVAILABLE|CERT1 SAP_xxxxxxx_8521 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:34:58|
AVAILABLE|CERT1 SAP_xxxxxxx_8522 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:27:15|
AVAILABLE|CERT1 SAP_xxxxxxx_8530 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_xxxxxxx_8530 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_xxxxxxx_8531 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_xxxxxxx_8531 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_xxxxxxx_8532 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:30:53|
AVAILABLE|CERT1 SAP_xxxxxxx_8533 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:31:13|
AVAILABLE|CERT1 SAP_xxxxxxx_8534 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:45:18|
AVAILABLE|CERT1 SAP_xxxxxxx_8535 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:45:17|
AVAILABLE|CERT1 SAP_xxxxxxx_8536 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:44:51|

---
dbmcli on CERT1>

Delete the log & data Segments:

dbmcli on CERT1>db_cold
OK

---
dbmcli on CERT1>db_state
OK
State
ADMIN

---
dbmcli on CERT1>quit
OK

Activate the Database to restore from first Full Backup

Type the command to activate the database:
Db_activate to the first full backup
                
AVAILABLE|CERT1 SAP_1020127_8511 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8511 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8514 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_1020127_8514 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_1020127_8517 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:27:17|
AVAILABLE|CERT1 SAP_1020127_8518 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:34:43|
AVAILABLE|CERT1 SAP_1020127_8519 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:35:03|
AVAILABLE|CERT1 SAP_1020127_8521 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:34:58|
AVAILABLE|CERT1 SAP_1020127_8522 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:27:15|
AVAILABLE|CERT1 SAP_1020127_8530 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_1020127_8530 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_1020127_8531 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_1020127_8531 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_1020127_8532 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:30:53|
AVAILABLE|CERT1 SAP_1020127_8533 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:31:13|
AVAILABLE|CERT1 SAP_1020127_8534 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:45:18|
AVAILABLE|CERT1 SAP_1020127_8535 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:45:17|
AVAILABLE|CERT1 SAP_1020127_8536 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:44:51|
....
.....
Restoring from backup Job ID 8511
AVAILABLE|CERT1 SAP_1020127_8511 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8511 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-02 23:29:08|
....
....

[root@sappg54 files]# dbmcli -d CERT1 -u dbm,dbm –uUTL
dbmcli on CERT1>db_activate recover BackData2 DATA ExternalBackupID "CERT1 SAP_1020127_8511 
/space/sdb/data/cert1/files/pipe_mem1, CERT1 SAP_1020127_8511 /space/sdb/data/cert1/files/pipe_mem2"
OK
Returncode              0
Date                    20101203
Time                    00010519
Server                  sapclient.company.com
Database                CERT1
Kernel Version          Kernel    7.7.04   Build 028-123-194-355
Pages Transferred       8608
Pages Left              0
Volumes                 2
Medianame               BackData2
Location                /space/sdb/data/cert1/files/pipe_mem2
Errortext
Label                   DAT_000000003
Is Consistent           true
First LOG Page          22115
Last LOG Page
DB Stamp 1 Date         20101202
DB Stamp 1 Time         00232825
DB Stamp 2 Date
DB Stamp 2 Time
Page Count              8574
Devices Used            2
Database ID             sapclient.company.com:CERT1_20101202_231525
Max Used Data Page      0
Converter Page Count    11

---
dbmcli on CERT1>

restore from Incremental Backup

Type the command to restore from incremental backup:
AVAILABLE|CERT1 SAP_1020127_8514 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_1020127_8514 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-02 23:39:02|


dbmcli on CERT1>recover_start BackPages2 ExternalBackupID "CERT1 SAP_1020127_8514 
/space/sdb/data/cert1/files/pipe_mem3, CERT1 SAP_1020127_8514 /space/sdb/data/cert1/files/pipe_mem4"
OK
Returncode              0
Date                    20101203
Time                    00010812
Server                  sapclient.company.com
Database                CERT1
Kernel Version          Kernel    7.7.04   Build 028-123-194-355
Pages Transferred       4096
Pages Left              0
Volumes                 2
Medianame               BackPages2
Location                /space/sdb/data/cert1/files/pipe_mem4
Errortext
Label                   PAG_000000004
Is Consistent           true
First LOG Page          32999
Last LOG Page
DB Stamp 1 Date         20101202
DB Stamp 1 Time         00233730
DB Stamp 2 Date
DB Stamp 2 Time
Page Count              4055
Devices Used            2
Database ID             sapclient.company.com:CERT1_20101202_231525
Max Used Data Page      0
Converter Page Count    20

---

Restore from Job ID

Type the command to restore from a Job ID:
Restore Data from backup xxx1

AVAILABLE|CERT1 SAP_1020127_xxx1 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_1020127_xxx1 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-03 00:37:41|

---
dbmcli on CERT1>db_state
OK
State
OFFLINE

---
dbmcli on CERT1>db_cold
OK

---
dbmcli on CERT1>db_state
OK
State
ADMIN

---
dbmcli on CERT1>db_activate recover BackData2 DATA ExternalBackupID "CERT1 SAP_1020127_xxx1 
/space/sdb/data/cert1/files/pipe_mem1, CERT1 SAP_1020127_xxx1 /space/sdb/data/cert1/files/pipe_mem2"
OK
Returncode              0
Date                    20101203
Time                    00042756
Server                  sapclient.company.com
Database                CERT1
Kernel Version          Kernel    7.7.04   Build 028-123-194-355
Pages Transferred       8600
Pages Left              0
Volumes                 2
Medianame               BackData2
Location                /space/sdb/data/cert1/files/pipe_mem2
Errortext
Label                   DAT_000000006
Is Consistent           true
First LOG Page          43903
Last LOG Page
DB Stamp 1 Date         20101203
DB Stamp 1 Time         00003741
DB Stamp 2 Date
DB Stamp 2 Time
Page Count              8574
Devices Used            2
Database ID             sapclient.company.com:CERT1_20101202_231525
Max Used Data Page      0
Converter Page Count    20

Restore Logs from the log job with time stamp greater than that of the current Job ID

Type the command to Restore Logs from the log job with time stamp greater than that of the current Job ID xxx1:
Ex: JobID with time stamp that is just greater xxx1 is xxx6. Please obtain this from the below backup list.

AVAILABLE|CERT1 SAP_1020127_8511 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8511 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8514 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_1020127_8514 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_1020127_8517 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:27:17|
AVAILABLE|CERT1 SAP_1020127_8518 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:34:43|
AVAILABLE|CERT1 SAP_1020127_8519 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:35:03|
AVAILABLE|CERT1 SAP_1020127_8521 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:34:58|
AVAILABLE|CERT1 SAP_1020127_8522 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-02 23:27:15|
AVAILABLE|CERT1 SAP_1020127_8530 /space/sdb/data/cert1/files/pipe_mem3|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_1020127_8530 /space/sdb/data/cert1/files/pipe_mem4|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_1020127_8531 /space/sdb/data/cert1/files/pipe_mem1|DATA  MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_1020127_8531 /space/sdb/data/cert1/files/pipe_mem2|DATA  MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_1020127_8532 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:30:53|
AVAILABLE|CERT1 SAP_1020127_8533 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:31:13|
AVAILABLE|CERT1 SAP_1020127_8534 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:45:18|
AVAILABLE|CERT1 SAP_1020127_8535 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:45:17|
AVAILABLE|CERT1 SAP_1020127_8536 /space/sdb/data/cert1/files/pipe_mem5|LOG   RECOVERY |2010-12-03 00:44:51|

Job ID xxx6 was at 00:44:51, which falls next from the time stamp of xxx1 at 00:37:41

Selection of Log job ID to restore is the key for Auto Log Restore.

Restore Logs from Job ID xxx6

dbmcli on CERT1>db_state
OK
State
OFFLINE

---
dbmcli on CERT1>db_cold
OK

---

Restore this job with the syntax "recover_start" as below.
dbmcli on CERT1>recover_start BackLog LOG ExternalBackupID "CERT1 SAP_1020127_xxx6 
/space/sdb/data/cert1/files/pipe_mem5"
OK
Returncode              -8020
Date                    20101203
Time                    00043242
Server                  sapclient.company.com
Database                CERT1
Kernel Version          Kernel    7.7.04   Build 028-123-194-355
Pages Transferred       4320
Pages Left              0
Volumes                 1
Medianame               BackLog
Location                /space/sdb/data/cert1/files/pipe_mem5
Errortext
Label                   LOG_000000009
Is Consistent
First LOG Page          41557
Last LOG Page           45892
DB Stamp 1 Date         20101203
DB Stamp 1 Time         00003100
DB Stamp 2 Date         20101203
DB Stamp 2 Time         00004449
Page Count              4300
Devices Used            1
Database ID             sapclient.company.com:CERT1_20101202_231525
Max Used Data Page
Converter Page Count

Apply next log job in the sequence

Type the command to apply the next log job in the sequence:
Apply next log with the sequence according its time stamp.
In this case next log needs to be applied from Job ID xxx5

Recover Replace of Log from Job ID xxx5:

Make sure to run this as Recover_Replace
dbmcli on CERT1>recover_replace BackLog ExternalBackupID 
"CERT1 SAP_1020127_xxx5 /space/sdb/data/cert1/files/pipe_mem5"
OK
Returncode              -8020
Date                    20101203
Time                    00043323
Server                  sapclient.company.com
Database                CERT1
Kernel Version          Kernel    7.7.04   Build 028-123-194-355
Pages Transferred       4320
Pages Left              0
Volumes                 1
Medianame               BackLog
Location                /space/sdb/data/cert1/files/pipe_mem5
Errortext
Label                   LOG_000000010
Is Consistent
First LOG Page          45893
Last LOG Page           50225
DB Stamp 1 Date         20101203
DB Stamp 1 Time         00004449
DB Stamp 2 Date         20101203
DB Stamp 2 Time         00004501
Page Count              4300
Devices Used            1
Database ID             sapclient.company.com:CERT1_20101202_231525
Max Used Data Page
Converter Page Count

Apply next log till the Database is consistent

Type the command to apply the next log till the database is consistent:
Apply next log with the sequence according its time stamp.
In this case next log needs to be applied from Job ID xxx4

Recover Replace of Log from Job ID xxx4:

Make sure to run this as Recover_Replace

Recover Replace Log Job ID xxx4:
dbmcli on CERT1>recover_replace BackLog ExternalBackupID 
"CERT1 SAP_1020127_xxx4 /space/sdb/data/cert1/files/pipe_mem5"
OK
Returncode              -8020
Date                    20101203
Time                    00043444
Server                  sapclient.company.com
Database                CERT1
Kernel Version          Kernel    7.7.04   Build 028-123-194-355
Pages Transferred       4320
Pages Left              0
Volumes                 1
Medianame               BackLog
Location                /space/sdb/data/cert1/files/pipe_mem5
Errortext
Label                   LOG_000000011
Is Consistent
First LOG Page          50226
Last LOG Page           54560
DB Stamp 1 Date         20101203
DB Stamp 1 Time         00004501
DB Stamp 2 Date         20101203
DB Stamp 2 Time         00004513
Page Count              4300
Devices Used            1
Database ID             sapclient.company.com:CERT1_20101202_231525
Max Used Data Page
Converter Page Count

Bring the database online

Once all the applicable logs with greater time stamp were restored, run Recover_Ignore command to bring database online:
Now Recover Ignore to get the DB consistent and open state:

dbmcli on CERT1>recover_ignore
OK
Returncode              0
Date                    20101203
Time                    00043444
Server                  sapclient.company.com
Database                CERT1
Kernel Version          Kernel    7.7.04   Build 028-123-194-355
Pages Transferred       4320
Pages Left              0
Volumes                 1
Medianame               BackLog
Location                /space/sdb/data/cert1/files/pipe_mem5
Errortext
Label                   LOG_000000011
Is Consistent
First LOG Page          50226
Last LOG Page           54560
DB Stamp 1 Date         20101203
DB Stamp 1 Time         00004501
DB Stamp 2 Date         20101203
DB Stamp 2 Time         00004513
Page Count              4300
Devices Used            1
Database ID             sapclient.company.com:CERT1_20101202_231525
Max Used Data Page
Converter Page Count

---
dbmcli on CERT1>db_state
OK
State
ONLINE

---
dbmcli on CERT1>

Restoring Logs from first Full Backup

1. Open the DBM Command line Interface and verify the status of the database. #> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

2. MAXDB should be in activated status to perform a restore operation on the first full backup. If the database is inactive, execute the following command. AVAILABLE|CERT1 SAP_1020127_8511

/space/sdb/data/cert1/files/pipe_mem1

|DATA MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8511

/space/sdb/data/cert1/files/pipe_mem2

|DATA MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem3

|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem4

|PAGES MIGRATION|2010-12-02 23:39:02|
AVAILABLE|CERT1 SAP_1020127_8517

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-02 23:27:17|
AVAILABLE|CERT1 SAP_1020127_8518

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-02 23:34:43|
AVAILABLE|CERT1 SAP_1020127_8519

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-02 23:35:03|
AVAILABLE|CERT1 SAP_1020127_8521

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-02 23:34:58|
AVAILABLE|CERT1 SAP_1020127_8522

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-02 23:27:15|
AVAILABLE|CERT1 SAP_1020127_8530

/space/sdb/data/cert1/files/pipe_mem3

|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_1020127_8530

/space/sdb/data/cert1/files/pipe_mem4

|PAGES MIGRATION|2010-12-03 00:34:09|
AVAILABLE|CERT1 SAP_1020127_8531

/space/sdb/data/cert1/files/pipe_mem1

|DATA MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_1020127_8531

/space/sdb/data/cert1/files/pipe_mem2

|DATA MIGRATION|2010-12-03 00:37:41|
AVAILABLE|CERT1 SAP_1020127_8532

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-03 00:30:53|
AVAILABLE|CERT1 SAP_1020127_8533

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-03 00:31:13|
AVAILABLE|CERT1 SAP_1020127_8534

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-03 00:45:18|
AVAILABLE|CERT1 SAP_1020127_8535

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-03 00:45:17|
AVAILABLE|CERT1 SAP_1020127_8536

/space/sdb/data/cert1/files/pipe_mem5

|LOG RECOVERY |2010-12-03 00:44:51|

3. Type the following command to execute the restore of entire database. Example:

Restoring from backup Job ID 8511
AVAILABLE|CERT1 SAP_1020127_8511

/space/sdb/data/cert1/files/pipe_mem1

|DATA MIGRATION|2010-12-02 23:29:08|
AVAILABLE|CERT1 SAP_1020127_8511

/space/sdb/data/cert1/files/pipe_mem2

|DATA MIGRATION|2010-12-02 23:29:08|

4. After restoring all the logs required, verify the recovered database. [root@sapclient  files]#

dbmcli -d CERT1 -u dbm,dbm –uUTL
dbmcli on CERT1>db_activate recover

BackData2 DATA ExternalBackupID

"CERT1 SAP_1020127_8511

/space/sdb/data/cert1/files/pipe_mem1,

CERT1 SAP_1020127_8511

/space/sdb/data/cert1/files/pipe_mem2"
OK
Returncode 0
Date 20101203
Time 00010519
Server sapclient.company.com
Database CERT1
Kernel Version Kernel 7.7.04

Build 028-123-194-355
Pages Transferred 8608
Pages Left 0
Volumes 2
Medianame BackData2
Location

/space/sdb/data/cert1/files/pipe_mem2
Errortext
Label DAT_000000003
Is Consistent true
First LOG Page 22115
Last LOG Page
DB Stamp 1 Date 20101202
DB Stamp 1 Time 00232825
DB Stamp 2 Date
DB Stamp 2 Time
Page Count 8574
Devices Used 2

Restore from a secondary copy

SAP for MAXDB iDataAgent provide the capability of restoring data from secondary copies from SAP command line. This is useful for restoring data when the primary copy is unavailable. To utilize this feature, add the CV_restCopyPrec parameter followed by the copy precedence number 2 into the parameter file prior to running the restore. Ensure that you have run a backup of the SAP MAXDB database prior to starting restore from a secondary copy. Ensure that you have run an auxiliary copy operation after completing the backup.

1. Open the DBM Command line Interface and verify the status of the database. #> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

2. Type the command to check for all backup IDs. The command should return OK. # dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>backup_ext_ids_get BackData2

OK

3. Type the command to list all the External Backup ID's. The command should return OK and display a list of all External Backup ID's. dbmcli on CERT1>backup_ext_ids_list

OK

END

4. Type the command to execute the restore. For Unix:

dbmcli on CERT1>recover_start

BackData2 DATA ExternalBackupID

"CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem3,

CERT1 SAP_1020127_8514

/space/sdb/data/cert1/files/pipe_mem4

For Windows:

dbmcli on CERT1>recover_start

BackData2 DATA ExternalBackupID

"CERT1 SAP_1011379_351

\\.\pipe\pipe_mem1,

CERT1 SAP_1011379_351

\\.\pipe\pipe_mem2"

5.. The restore should complete without any errors. dbmcli on CERT1>exit

Restore Using a Specific Library or Drive Pool

Data can be restored/recovered from any compatible library and drive type in the CommCell. By default the system automatically identifies and restores/recovers data from any configured library in the CommCell, even if the media is not available in the original library in which the data protection operation was performed. Data Recovery operations use a specific data path - MediaAgent, Library and Drive Pool - to perform the restore operations. When the default options are selected, the system automatically chooses the most appropriate data path. For comprehensive information on choosing an alternate data path, see Data Recovery Operations using Alternate Data Paths.

In some situations you may want to use another data path to perform a data recovery operation. In such a situation, you can specify the MediaAgent, Library and/or the Drive Pool.

Consider the following examples:

Managing Jobs

Once you initiate the restore operation, a restore job is generated in the Job Controller. A single job ID will be generated in Job Controller. You can view the progress of the job through Job Controller.

You can view the specific historical information about the job once the job is completed from the client computer, iDataAgent, or instance level in the CommCell Console.

Control Jobs

The Kill control option to terminate a job is available for this iDataAgent in the Job Controller window:

This control can be applied to:

You can Kill a job from the Job Controller of the CommCell Console.

  1. 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.

Back to Top