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:
<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.
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
./create_backup_metadata.sh