Skip to main content
Skip table of contents

SAP HANA 2.0 plugin tools

Delphix provides the create_backup_metadata.sh script, which is bundled with the plugin. This script is required to be executed by customer for customer-created HANA backups, which are to be used to create or refresh a dSource. This script can be found at:

CODE
<path>/scripts/create_backup_metadata.sh

This script must be run prior to creating or refreshing a dSource from a customer-created backup. The script is not required for Delphix-initiated backups. The script must be run on the source instance where the source tenant database exists. The script retrieves and persists important metadata about the specific backup set. This information will be used by the plugin during the dSource creation and will then be stored in the metadata section of the dSource.

Prerequisites

  • The script assumes the user has the credentials of the tenant on the source HANA instance.

  • The script must be copied to the source host as the operating system user should have access to hdbsql. 

  • The script must be executable.

  • Correct backup files of the source must exist on the source host or the backup files should be accessible from the source host.

  • The script should have the write permissions in the directory where the backups have been kept.

You can run the create_backup_metadata.sh script in the following two ways.

  1. Interactive mode

  2. Providing the complete list of parameters (Non-Interactive mode)

Interactive mode

The mode allows you to input the values to the required/optional parameters one by one on the CLI. See the sample script run example below the Parameters table.

Parameters

The following table lists the optional and required parameters used by the script.

Parameter

Optional/Required

Description

Please enter the location of the Backup files: 

Required

Location of the Backup files

For example: /usr/sap/HDB/HDB00/source_backup

If the above provided location of the Backup files is different than the original location where backups were taken then please enter original location, otherwise press enter(OPTIONAL):

Optional

This is the original location where the backup files were created during the dSource creation which can be used later for recovery purposes

Provide this parameter when the location provided at the "Please enter the location of the Backup files:" parameter is different from the location where the backup files are kept now

For example: /usr/sap/HDB/HDB00/backup/data/DB_TEST1

Please enter the location of the Log files(OPTIONAL):

Optional

Location of the Log files

You may use logs for the recovery

For example: /usr/sap/HDB/HDB00/source_log

If the above provided location of the log files is different than the original location where log files were created then please enter original location, otherwise press enter(OPTIONAL):

Optional

This is the original location where the log files were created during the dSource creation which can be used later for recovery purposes

Provide this parameter when the location provided at the "Please enter the location of the Backup files:" parameter is different from the location where the log files are kept now

For example: /usr/sap/HDB/HDB00/backup/log/DB_TEST1 (Note that this is not a valid directory)

Please enter the Tenant Database Name:

Required

Name of the tenant database for which backups/logs were created

For example: TEST1

Please enter the SID of the HANA database:

Required

SID of the tenant database for which backups/logs are present

For example: HDB

Enter the Tenant User Name:

Required

Username to connect to the tenant database

For example: SYSTEM

Tenant User Password:

Required

Password to connect to the tenant database

Please enter the Instance Number:

Required

Instance number of the tenant database

For example: 00

Example

The following example shows an execution of the script with input parameters:

Usage

CODE
./create_backup_metadata.sh

Providing the complete list of parameters

This mode allows you to input the parameter values in a specified order at the run time. See the sample script run example below the Parameters table.

Parameters

The following table lists the optional and required parameters in the order that in which you need to pass the parameter values along with the script.

Parameter

Optional/Required

Description

TENANT_DATABASE_NAME

Required

Tenant database name for which the script needs to be run

SID

Required

SID of the HANA database

TENANT_USER_NAME

Required

Username to connect to the tenant database

TENANT_USER_PASSWORD

Required

Password to connect to the tenant database

INSTANCE_NUMBER

Required

Instance number of the HANA database

DATA_BACKUP_PATH

Required

The location where the backups are present

LOG_BACKUP_PATH

Optional

The location where the logs are present

ORIG_DATA_BACKUP

Optional

Original location where these backups were created. Do not provide any value if backups are present at the same location where they were created

ORIG_LOG_BACKUP_PATH

Optional

Original location where logs were created. Do not provide any value if the logs are present at the same location where they were created

Example 1

The following example shows an execution of the script with input parameter values in the above-specified order.

If all the mandatory parameters are not provided or parameters are not provided in the specified order, then the plugin will throw an error.

Example 2

The following example shows an error when all the mandatory parameter values are not provided.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.