Advanced Restore - SAP MaxDB iDataAgent

Table of Contents

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 destination client must reside in the same CommCell as the client whose data was backed up.
  • Note that when you perform restores other than in-place restores, the restored data assumes the rights (i.e., permissions) of the parent directory.

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:

  • The destination client must reside in the same CommCell as the client whose data was backed up.
  • The destination client should have the same SID name as the source client.
  • When you perform an out-of-place restore, the restored data assumes the rights (i.e., permissions) of the parent directory.

Validating the Backups

Before you perform a restore operation, you can validate if the backup that you want to restore is accessible, and the data is readable. You need to open a service session to perform the validation.

  1. Open the DBM Command Line Interface and type the following commands to list all of the external backup IDs:

    dbmcli -d MaxDb -u dbm,dbm –uUTL
    dbmcli on MaxDb>db_admin
    OK
    dbmcli on MaxDb>backup_ext_ids_get BackData2
    OK
    dbmcli on MaxDb>backup_ext_ids_list
    OK
    END
    AVAILABLE|MAXDB 262791520_85712 /sapdb/MAXDB/data/pipe/m0|DATA MIGRATION|2015-02-11 17:52:04|
    AVAILABLE|MAXDB 262791520_85712 /sapdb/MAXDB/data/pipe/m1|DATA MIGRATION|2015-02-11 17:52:04|

  2. Open a service session.

    dbmcli on MaxDb>service_connect
    OK

  3. Use the recover_check command to perform a consistency check of the backup. A 0 return code with the backup details as an output indicates that the consistency check is successful.

    dbmcli on MaxDb>recover_check BackData2 DATA ExternalBackupID "MAXDB 262791520_85712 /sapdb/MAXDB/data/pipe/m0,MAXDB 262791520_85712 /sapdb/MAXDB/data/pipe/m1" AUTOIGNORE
    OK
    Returncode 0
    Date 20150211
    Time 00181637
    Server sde-unx2
    Database MAXDB
    Kernel Version Kernel 7.9.08 Build 025-123-251-168
    Pages Transferred 2672
    Pages Left 0
    Volumes 2
    Medianame BackData2
    Location /sapdb/MAXDB/data/pipe/m1
    Errortext
    Label DAT_000000016
    Is Consistent true
    First LOG Page 3
    Last LOG Page
    DB Stamp 1 Date 20150211
    DB Stamp 1 Time 00175204
    DB Stamp 2 Date
    DB Stamp 2 Time
    Page Count 2643
    Devices Used 2
    Database ID sde-unx2:MAXDB_20150211_175204
    Max Used Data Page 0
    Converter Page Count 17

  4. End the active service session before you start the restore option of the backup.

    dbmcli on MaxDb>service_release
    OK

Restoring to a Different Client (Cross Machine Restore)

Perform a cross-machine restore when the original database host has been damaged or destroyed, and you need to restore the data to a different host from the backup.

Note: You must restore the following files on the destination database:

  • dbm.knl -This file contains the backup history
  • dbm.ebf - This file contains the external backup id

Before You Begin

  1. Perform a full backup.
  2. Build a destination computer. The source and destination computer must have the same operating system.
  3. Install the SAP for MaxDB software on the destination client. Configure the destination client so that it has identical DATA volumes and LOG volumes as the source host.
  4. Place the destination database in ADMIN mode.
  5. Install the SAP MaxDB agent on the destination computer.
  6. Configure the database instance on the destination CommServe computer.
  7. Define a backup medium on the destination computer by using the medium_put command. For information on how to use the medium_put command, see SAP for MaxDB Configuration.
  8. Configure the SAP MaxDB parameter file to include the srcCrossClient parameter. Set the value to the source client name.

Procedure

  1. If the the dbm.knl and dbm.ebf 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.
    1. Create an input file (for example, "file1.txt") that contains #NULL that you will use with the inquire operation.

      Example

      Expand All

      Windows

      more file1.txt
      #NULL

      UNIX

      [root@mac1 opt]# cat file1.txt
      #NULL

    2. Run the inquire operation with the input file to retrieve the job ids. The operation returns of all the backup jobs, ending with the latest backup job. On the command line, type the following substituting the parameters:

      backint.exe -u <database_name> -f inquire -t file -p <parameter_file> -i <input_file>

      Expand All

      Windows

      C:\Program Files\CommVault\Simpana\Base>set BI_CALLER=BACKINT_MAXDB
      C:\Program Files\CommVault\Simpana\Base>backint.exe -u CERT1 -f inquire -t file -p C:\SapMaxDbAgent\param -i C:\SapMaxDbAgent\file1.txt
      -------------------------- Output of inquire -------------------------
      BI_CALLER=<BACKINT_MAXDB>
      -------------------------- Parameter Specified -------------------------
      CvInstanceName=<Instance001>
      CvClientName=<sde-sap2>
      numstreams=<2>
      srccrossclient=<sde-sap5>
      src and dest dbname=<CERT1>
      -------------------------- backint Command Line -------------------------
      backintCmd=[backint.exe -u CERT1 -f inquire -t file -p C:\SapMaxDbAgent\param -i C:\SapMaxDbAgent\file1.txt ]
      CommServeHostName=basecs.idcprodcert.loc
      CommClientHostName=sde-sap2.idcprodcert.loc
      Galaxy CommCellID=2
      Galaxy ClientID=237
      Inquire has been requested
      Src Cross Client=<sde-sap5>
      Galaxy ClientInstanceID=2868
      Galaxy ClientAppType=79
      Galaxy ClientAppID=16293
      Galaxy SrcCrossClientID=575
      Galaxy CrossClientInstanceID=3123
      Galaxy CrossClientAppType=79
      Galaxy CrossClientAppID=17940

      #BACKUP 1023298_396222

      UNIX

      [root@rhel5sap64ismorethanthirtycharacters Base]# pwd
      /opt/simpana/Base
      [root@rhel5sap64ismorethanthirtycharacters Base]# export BI_CALLER=BACKINT_MAXDB
      [root@rhel5sap64ismorethanthirtycharacters Base]# ../SapMaxDbAgent/backint -u TESTDB -f inquire -t file -p /opt/simpana/SapMaxDbAgent/param -i /opt/file1.txt
      -------------------------- Output of inquire -------------------------
      BI_CALLER=<BACKINT_MAXDB>
      -------------------------- Parameter Specified -------------------------
      CvInstanceName=<Instance001>
      CvClientName=<rhel5sap64ismorethanthirtycharacters>
      numstreams=<2>
      srccrossclient=<maxdbrhel>
      src and dest dbname=<TESTDB>
      -------------------------- backint Command Line -------------------------
      backintCmd=[../SapMaxDbAgent/backint -u TESTDB -f inquire -t file -p /opt/simpana/SapMaxDbAgent/param -i /opt/input.txt ]
      CommServeHostName=basecs.idcprodcert.loc
      CommClientHostName=rhel5sap64ismorethanthirtycharacters
      Galaxy CommCellID=2
      Galaxy ClientID=670
      Inquire has been requested
      Src Cross Client=<maxdbrhel>
      Galaxy ClientInstanceID=2873
      Galaxy ClientAppType=79
      Galaxy ClientAppID=16312
      Rel -- - CS=<basecs.idcprodcert.loc> CC=<rhel5sap64ismorethanthirtycharacters>
      #BACKUP 1023298_386440
      #BACKUP 1023298_386435
      #BACKUP 1023298_386421
      #BACKUP 1023298_386419
      #BACKUP 1023298_386418

    3. Create an input file for the restore command that contains the last job id. For example, if the last backup job id is1023298_396222, the file looks like:
      Expand All

      UNIX

      [root@mac1 opt]# cat file2.txt
      1023298_396222

    4. Run the inquire operation with the input file that contains the last job id, to retrieve the the location of the catalog files. On the command line, type the following substituting the parameters:

      backint.exe -u <database_name> -f inquire -t file -p <parameter_file> -i <input_file>

      Expand All

      Example

      C:\Program Files\CommVault\Simpana\Base>backint.exe -u CERT1 -f inquire -t file -p C:\SapMaxDbAgent\param -i C:\SapMaxDbAgent\file2.txt
      -------------------------- Output of inquire -------------------------
      BI_CALLER=<BACKINT_MAXDB>
      -------------------------- Parameter Specified -------------------------
      CvInstanceName=<Instance001>
      CvClientName=<sde-sap2>
      numstreams=<2>
      srccrossclient=<sde-sap5>
      src and dest dbname=<CERT1>
      -------------------------- backint Command Line -------------------------
      backintCmd=[backint.exe -u CERT1 -f inquire -t file -p C:\SapMaxDbAgent\param -i C:\SapMaxDbAgent\file2.txt ]
      CommServeHostName=basecs.idcprodcert.loc
      CommClientHostName=sde-sap2.idcprodcert.loc
      Galaxy CommCellID=2
      Galaxy ClientID=237
      Inquire has been requested
      Src Cross Client=<sde-sap5>
      Galaxy ClientInstanceID=2868
      Galaxy ClientAppType=79
      Galaxy ClientAppID=16293
      Galaxy SrcCrossClientID=575
      Galaxy CrossClientInstanceID=3123
      Galaxy CrossClientAppType=79
      Galaxy CrossClientAppID=17940
      iPath=[\\.\pipe\pipe_mem1] qPath=[\\.\pipe\pipe_mem1]
      #BACKUP 1023298_396222 \\.\pipe\pipe_mem1
      iPath=[\\.\pipe\pipe_mem2] qPath=[\\.\pipe\pipe_mem2]
      #BACKUP 1023298_396222 \\.\pipe\pipe_mem2
      iPath=[\\.\pipe\pipe_mem3] qPath=[\\.\pipe\pipe_mem3]
      #BACKUP 1023298_396222 \\.\pipe\pipe_mem3
      iPath=[D:\sdb\cert1\wrk\dbm.ebf] qPath=[D:\sdb\cert1\wrk\dbm.ebf]
      #BACKUP 1023298_396222 D:\sdb\cert1\wrk\dbm.ebf
      iPath=[D:\sdb\cert1\wrk\dbm.knl] qPath=[D:\sdb\cert1\wrk\dbm.knl]
      #BACKUP 1023298_396222 D:\sdb\cert1\wrk\dbm.knl

      The history and catalog files found on the source are:

      D:\sdb\cert1\wrk\dbm.ebf

      D:\sdb\cert1\wrk\dbm.knl

    5. Create an input file that the restore operation will use.
      Option File Format
      Restore to same path <job id> <location of dbm.ebf file>

      <job id> <location of dbm.knl file>

      Example

      1023298_396222 D:\sdb\cert1\wrk\dbm.ebf

      1023298_396222 D:\sdb\cert1\wrk\dbm.knl

      Restore to a different path without overwriting the original catalog <job id> <location of dbm.ebf file> <new location of dbm.ebf file>

      <job id> <location of dbm.knl file> <new location of <location of dbm.knl file>

      Example

      1023298_396222 D:\sdb\cert1\wrk\dbm.ebf D:\new_location\dbm.ebf

      1023298_396222 D:\sdb\cert1\wrk\dbm.knl D:\new_location\dbm.knl

      Restore to a different SID Source SID Name = <source SID> whose path = <catalog with source SID directory>

      Destination SID Name =<destination SID> whose path =<catalog with destination SID directory>

      Example

      1023298_396391 D:\sdb\cert1\wrk\dbm.ebf D:\sdb\cert3\wrk

      1023298_396391 D:\sdb\cert1\wrk\dbm.knl D:\sdb\cert3\wrk

    6. Restore the catalog files. On the command line, type the following substituting the parameters:

      backint.exe -u <database_name> -f restore -t file -p <parameter_file> -i <input_file>

      Expand All

      Example

      C:\Program Files\CommVault\Simpana\Base>backint.exe -u CERT1 -f restore -t file -p C:\SapMaxDbAgent\param -i C:\SapMaxDbAgent\file3.txt
      Number of streams desired=<2> Number of files to restore=<2>
      -------------------------- Output of restore -------------------------
      BI_CALLER=<BACKINT_MAXDB>
      -------------------------- Parameter Specified -------------------------
      CvInstanceName=<Instance001>
      CvClientName=<sde-sap2>
      numstreams=<2>
      srccrossclient=<sde-sap5>
      src and dest dbname=<CERT1>
      -------------------------- backint Command Line -------------------------
      backintCmd=[backint.exe -u CERT1 -f restore -t file -p C:\SapMaxDbAgent\param -i C:\SapMaxDbAgent\file3.txt ]

      CommServeHostName=basecs.idcprodcert.loc
      CommClientHostName=sde-sap2.idcprodcert.loc
      Galaxy CommCellID=2
      Galaxy ClientID=237
      Src Cross Client=<sde-sap5>
      Galaxy ClientInstanceID=2868
      Galaxy ClientAppType=79
      Galaxy ClientAppID=16293
      Galaxy SrcCrossClientID=575
      Galaxy CrossClientInstanceID=3123
      Galaxy CrossClientAppType=79
      Galaxy CrossClientAppID=17940
      Total number of Collect Files Generated=<1>
      Setting the Number of streams desired=<1> as all the data resides on the same Media=<83427>.
      Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job
      Restore has been requested

      SID=[CERT1] BkpSet=[default] AppType=[79]
      Success in getting Job id=396229 Token=<396229:2:1>
      Success in init with JM
      Attaching CommServer Session
      Restoring from MediaId=<1463_MagVolId_83427>
      Restoring file=<D:\sdb\cert1\wrk\dbm.ebf>
      AfileNumber=817819, AcommCellId=2 AgroupNumber=439 archfilename=D:\sdb\cert1\wrk\dbm.ebf copy=823 BI
      D=396222 reqBID=396222 afileFlags=14d
      Enabling MULTI_TAG_HDR_SUPPORT
      #RESTORED 1023298_396222 D:\sdb\cert1\wrk\dbm.ebf
      SAPPERF: Archive File Name=<D:\sdb\cert1\wrk\dbm.ebf>, CumulativeSize=483 bytes, Write I/O Time=0.00
      0685 secs, Read I/O Time=4.216592 secs, Total (SAP + MA) I/O Time=4.217276 secs
      SAPPERF: Archive File Name =<D:\sdb\cert1\wrk\dbm.ebf>, Write I/O Throughput=2.365516 GB/Hr, MA I/O
      Throughput=0.000394 GB/Hr, Total I/O Throughput=0.000384 GB/Hr
      Restoring file=<D:\sdb\cert1\wrk\dbm.knl>
      AfileNumber=817820, AcommCellId=2 AgroupNumber=439 archfilename=D:\sdb\cert1\wrk\dbm.knl copy=823 BI
      D=396222 reqBID=396222 afileFlags=14d
      #RESTORED 1023298_396222 D:\sdb\cert1\wrk\dbm.knl
      SAPPERF: Archive File Name=<D:\sdb\cert1\wrk\dbm.knl>, CumulativeSize=767 bytes, Write I/O Time=3.23
      4993 secs, Read I/O Time=7.424840 secs, Total (SAP + MA) I/O Time=10.659833 secs
      SAPPERF: Archive File Name =<D:\sdb\cert1\wrk\dbm.knl>, Write I/O Throughput=0.000795 GB/Hr, MA I/O
      Throughput=0.000357 GB/Hr, Total I/O Throughput=0.000241 GB/Hr
      Successful restore; 2 File(s); total transferred bytes=767
      Success in sending JMSUCCESS to server
      Success in sending JMSUCCESS to server

  2. Perform the data and log restores. You can restore from a data backup, or a data and a log backup. On the command line, type the following.

    backup_ext_ids_get BACKData2
    backup_ext_ids_list

  3. Activate the database and recover the full backup. On the command line, type the following. Use a comma to separate each specified ID.

    db_activate RECOVER BACKData2 DATA ExternalBackupID, ExternalBackupIDN

  4. Restore the incremental backups. On the command line, type the following.

    recover_start BackPages2 PAGES ExternalBackupID, ExternalBackupIDN

  5. Restore the logs. On the command line, type the following.

    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. If you plan to do a full system restore on a Windows 2003 Server with an x64 platform, use the SAP for MaXDB iDataAgent for backup on x64 platform. You cannot do a full system restore on an x64 platform if you use 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 client and the source database:
    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 dbm.ebf root@sybserver5.company.com:/opt/sdb/data/cert1/wrk/dbm.ebf
    [root@sybserver2 wrk]# scp dbm.knl root@sybserver5.company.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
    ONLINE

  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. Verify the status of the database again.

    #> dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN

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

  5. Type the command to list all the External Backup IDs. The command should return OK and display a list of all External Backup IDs.

    dbmcli on CERT1>backup_ext_ids_list
    OK
    END
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem1|DATA MIGRATION|2013-09-06 01:35:46|
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem2|DATA MIGRATION|2013-09-06 01:35:46|

    If the command returns CONTINUE instead of END, information on further backups is available in next page. The information is not listed here because of the limited size of the response file. To display the next page of Backup IDs:

    • Repeat the same command.

      (OR)

    • Execute the following command:

      backup_ext_ids_listnext

  6. Type the following command to execute the restore of an entire database.

    For Unix:

    dbmcli on CERT1>recover_start BackData2 DATA ExternalBackupID "CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem3, CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem4”

    For Windows:

    dbmcli on CERT1>recover_start BackData2 DATA ExternalBackupID "CERT1 1023298_171929 \\.\pipe\pipe_mem1, CERT1 1023298_171929 \\.\pipe\pipe_mem2”

  7. The restore should complete without any errors.

    dbmcli on CERT1>exit
    OK

Restoring 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
    ONLINE

  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. Verify the status of the database again.

    #> dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN

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

  5. Type the command to list all the External Backup IDs. The command should return OK and display a list of all External Backup IDs.

    dbmcli on CERT1>backup_ext_ids_list
    OK
    END
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem1|DATA MIGRATION|2013-09-06 01:35:46|
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem2|DATA MIGRATION|2013-09-06 01:35:46|

  6. Type the command to execute the restore of an incremental backup.

    For Unix:

    dbmcli on CERT1>recover_start BackPages2 PAGES ExternalBackupID "CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem3, CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem4”

    For Windows:

    dbmcli on CERT1>recover_start BackPages2 PAGES ExternalBackupID "CERT1 1023298_171929 \\.\pipe\pipe_mem1, CERT1 1023298_171929 \\.\pipe\pipe_mem2”

  7. The restore should complete without any errors.

    dbmcli on CERT1>exit
    OK

Restoring 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
    ONLINE

  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. Verify the status of the database again.

    #> dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN

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

  5. Type the command to list all the External Backup IDs. The command should return OK and display a list of all External Backup IDs.

    dbmcli on CERT1>backup_ext_ids_list
    OK
    END
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem1|DATA MIGRATION|2013-09-06 01:35:46|
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem2|DATA MIGRATION|2013-09-06 01:35:46|

  6. Type the commands to restore the logs.
  7. For Unix:

    dbmcli on CERT1>recover_start BackLog LOG ExternalBackupID "CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem3, CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem4”

    For Windows:

    dbmcli on CERT1>recover_start BackLog LOG ExternalBackupID "CERT1 1023298_171929 \\.\pipe\pipe_mem1, CERT1 1023298_171929 \\.\pipe\pipe_mem2”

  8. 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 IDs:

[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
    ONLINE

  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. Verify the status of the database again.

    #> dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN

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

  5. Type the command to list all the External Backup IDs. The command should return OK and display a list of all External Backup IDs.

    dbmcli on CERT1>backup_ext_ids_list
    OK
    END
    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|

  6. Type the following command to execute the restore of entire database.

    For 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|

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

Restoring Logs from 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
    ONLINE

  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. Verify the status of the database again.

    #> dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN

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

  5. Type the command to list all the External Backup IDs. The command should return OK and display a list of all External Backup IDs.

    dbmcli on CERT1>backup_ext_ids_list
    OK
    END
    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|

  6. Type the following command to restore the logs from an incremental backup.

    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 sappg54.idclab.loc
    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 sappg54.idclab.loc:CERT1_20101202_231525
    Max Used Data Page 0
    Converter Page Count 20

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
    ONLINE

  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. Verify the status of the database again.

    #> dbmcli -d CERT1 -u dbm,dbm -uUTL
    dbmcli on CERT1>db_state
    OK
    State
    ADMIN

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

  5. Type the command to list all the External Backup IDs. The command should return OK and display a list of all External Backup IDs.

    dbmcli on CERT1>backup_ext_ids_list
    OK
    END
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem1|DATA MIGRATION|2013-09-06 01:35:46|
    AVAILABLE|CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem2|DATA MIGRATION|2013-09-06 01:35:46|

  6. Type the command to execute the restore.
  7. For UNIX:

    dbmcli on CERT1>recover_start BackData2 DATA ExternalBackupID "CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem3, CERT1 1023298_171929 /space/sdb/data/cert1/files/pipe_mem4”

    For Windows:

    dbmcli on CERT1>recover_start BackData2 DATA ExternalBackupID "CERT1 1023298_171929 \\.\pipe\pipe_mem1, CERT1 1023298_171929 \\.\pipe\pipe_mem2”

  8. The restore should complete without any errors.

    dbmcli on CERT1>exit
    OK

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:

  • You may want to use a specific MediaAgent to perform the browse and restore operation instead of the system selected default MediaAgent. For example, the default MediaAgent may be busy and you wish to use another MediaAgent which is idle, or you know the library attached to a specific MediaAgent contains the media associated with the data you wish to restore.
  • The default MediaAgent may have a problem accessing the devices (library, drive) and hence you wish to use another MediaAgent sharing the library to perform the browse and restore operation.

    This feature is applicable only for tape library. The operation will fail if the requested data is not available in the disk library attached to the specified MediaAgent.

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:

  • All jobs in the Job Controller.
  • All selected jobs in the Job Controller providing you have the correct security associations at the proper level for each job selected.
  • All data protection operations running for a particular client or client/agent.
  • All data protection operations running for a particular MediaAgent.

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.