Restoring the SAP HANA Database to a Disk (Application-Free Restore)

You can restore SAP HANA data and transaction log files directly to a disk without the need for an SAP HANA agent on the destination computer. After restoring the application data and logs, recover the SAP HANA database from the disk using the SAP HANA Studio interface.

Procedure

  1. On the client computer, run the qlogin comand to log on.

  2. On the computer where you will run the command, download the restore_to_disk.xml file.

  3. On the command line, go to software_installation_directory/Base, and then type the following command:

    /opt/commvault/Base/qoperation execute -af restore.xml -associations/backupsetName 'SourceHanaDatabaseName' instanceName 'SourceHanaSID' -associations/appName 'SAP HANA' -clientName 'SourceHanaPseudoClientName' -options/clientName 'SourceHanaPseudoClientName' -copyPrecedence/copyPrecedence '1' -destination/destPath 'destinationstagingpath' -destClient/clientName 'destHanaPrimaryNode' -fileOption/sourceItem 'commCellId:Jobid' -jobIds 'Jobid'

    where:

    • backupsetName is the source HANA backup set name.

    • instanceName is the name of the database instance.

    • appName is the SAP HANA application name .

    • clientName is the pseudo-client name of HANA.

    • options/clientName is the pseudo-client name of HANA.

    • copyPrecedence is the copyPrecedence number.

    • destination/destPath is the path to the destination staging directory.

    • destClient/clientName is the destination client name.

    • sourceItem is the CommCell ID and Job ID is in the format 2: Jobid.

      Note

      By default, the CommCell ID is always 2.

    • jobId is the backup jobID used for the application-free restore.

    Example:

    /opt/commvault/Base/qoperation execute -af restore.xml -associations/backupsetName 'default' instanceName 'TST' -associations/appName 'SAP HANA' -clientName 'sde-newhana2_TST' -options/clientName 'sde-newhana2_TST' -copyPrecedence/copyPrecedence '1' -destination/destPath '/tmp/' -destClient/clientName 'sde-newhana2' -fileOption/sourceItem '2:185' -jobIds '185'

    After you submit the job, the response will include the taskID and JobID for the restore job.

    <TMMsg_CreateTaskResp taskId="70">
    <jobIds val="195"/>
  4. Verify the status of the job. On the command line type the command:

    qlist job –j <job_id>

  5. After the job completes, run the qlogout command to log off the CommServe computer.

    The restore job creates a folder in the specified destination staging path with the JobID as the folder name.

    Example:

    sde-newhana2:/user1 # ll
    total 12
    drwx------ 3 tstadm sapsys   17 Apr  9 12:43 195 (195 is the jobID)
    drwx------ 3 tstadm sapsys   17 Apr  9 12:46 196
    drwx------ 3 root   sapsys   17 Apr  9 14:24 204
    drwx------ 3 root   sapsys   17 Apr  9 14:25 205
    drwx------ 3 root   sapsys   17 Apr  9 14:42 208
    sde-newhana2:/user1 # ll -R 195
    195:
    total 0
    drwx------ 3 tstadm sapsys 17 Apr  9 12:43 usr
    195/usr:
    total 0
    drwx------ 3 tstadm sapsys 17 Apr  9 12:43 sap
    195/usr/sap:
    total 0
    drwx------ 3 tstadm sapsys 17 Apr  9 12:43 TST
    195/usr/sap/TST:
    total 0
    drwx------ 3 tstadm sapsys 20 Apr  9 12:43 SYS
    195/usr/sap/TST/SYS:
    total 0
    drwx------ 3 tstadm sapsys 17 Apr  9 12:43 global
    195/usr/sap/TST/SYS/global:
    total 0
    drwx------ 3 tstadm sapsys 21 Apr  9 12:43 hdb
    195/usr/sap/TST/SYS/global/hdb:
    total 0
    drwx------ 3 tstadm sapsys 20 Apr  9 12:43 backint
    195/usr/sap/TST/SYS/global/hdb/backint:
    total 0
    drwx------ 2 tstadm sapsys 237 Apr  9 12:43 DB_TST
    195/usr/sap/TST/SYS/global/hdb/backint/DB_TST:
    total 49320
    -rwxr-xr-x 1 tstadm sapsys   155648 Apr  9 12:43 190_D_DATA_BACKUP_databackup_differential_0_1617950676545_0_1
    -rwxr-xr-x 1 tstadm sapsys 16785408 Apr  9 12:43 190_D_DATA_BACKUP_databackup_differential_1617949793329_1617950676545_2_1
  6. Before recovering the database, stop the database which you want to restore, and then set the Log/Catalog backup destination as FILE.

Loading...