Why it's required ?
Whenever you want to perform hardware move or system copy for your HANA system, including all the customer configurations which are set on ini files, you have to always copy them from source to target server. Let's consider another scenario, if you have to restore your HANA system with some previous point in time, because someone messed up with your current HANA existing configurations, that caused a major incident and your system is now unstable. You can recover the data, from last backups but your configurations are gone now unless and until you are also backing up config files separately.
What if HANA can take care of itself and you do not even need to bother about such critical configurations ? let's see it further.
What is changed ?
As of HANA 2.0 SPS06 onwards, content of the configuration files can be backed up with each (delta or full) data backup, and will be included in the metadata backup. Yes, you read it absolutely right.
- By default, a data backup does not include user configuration files (.ini files).
- Also by default, a recovery does not restore user configuration files.
How this works ?
To configure SAP HANA to include or exclude user configuration files, there are 2 ways to achieve it :
Include in HANA Configuration
In the backup section of the global.ini parameter file, locate the parameter include_configuration_backup.
include_configuration_backup = false # this is an online configuration change, no DB restart is needed.
Note : The parameter can be overruled by the additional SQL options during a backup.
Perform via SQL
The BACKUP DATA, statement offers a new option: INCLUDE CONFIGURATION. It backs up the user configuration files (.ini files) as part of the data backup. The user configuration files are stored without encryption in the metadata of the data backup. The user configuration files are not compressed. Eg :
2021-12-09T06:48:03+01:00 P0045916 17d9dbc0088 INFO BACKUP SAVE DATA started  2021-12-09T06:48:03+01:00 P0045916 17d9dbc0088 INFO BACKUP command: BACKUP DATA FOR SYSTEMDB USING BACKINT ('test_backup_with_config') INCLUDE CONFIGURATION; ... 2021-12-09T06:48:03+01:00 P0045916 17d9dbc0088 INFO BACKUP BACKUP will write to the following files : 2021-12-09T06:48:03+01:00 P0045916 17d9dbc0088 INFO BACKUP to backint: /usr/sap/SHT/SYS/global/hdb/backint/SYSTEMDB/test_backup_with_config_databackup_0_1 2021-12-09T06:48:03+01:00 P0045916 17d9dbc0088 INFO BACKUP to backint: /usr/sap/SHT/SYS/global/hdb/backint/SYSTEMDB/test_backup_with_config_databackup_1_1 2021-12-09T06:48:03+01:00 P0045916 17d9dbc0088 INFO BACKUP meta data backup: configuration backup included ... 2021-12-09T06:48:22+01:00 P0045916 17d9dbc0088 INFO BACKUP SAVE DATA finished successfully
Data backups of tenant databases include the user configuration files in the DATABASE layer.
Data backups of the system database include the user configuration files in the SYSTEM layer. This also includes the nameserver.ini. However, nameserver.ini files cannot be restored as part of a recovery. You can manually restore the backup of the nameserver.ini file. To display the content of the backed-up nameserver.ini files, you can use hdbbackupcheck.
For a recovery, you can use the INCLUDE CONFIGURATION option with the RECOVER DATA or RECOVER DATABASE statements to restore the user configuration files (.ini files) from a backup.
It is easy to verify that user configuration files are backed up or not using below methods :
1. Confirm that a backup contains backups of user configuration files... The M_BACKUP_CATALOG_FILES system view includes the following: CONFIGURATION_INCLUDED.
hdbsql SYSTEMDB=> select DATABASE_NAME,SOURCE_TYPE_NAME,SERVICE_TYPE_NAME,DESTINATION_TYPE_NAME,CONFIGURATION_INCLUDED from SYS_DATABASES.M_BACKUP_CATALOG_FILES where CONFIGURATION_INCLUDED = 'TRUE'; | DATABASE | SOURCE_T | SERVICE_TYP | DESTINA | CONF | | -------- | -------- | ----------- | ------- | ---- | | SHT | topology | indexserver | backint | TRUE | | SYSTEMDB | topology | nameserver | backint | TRUE | | SHT | topology | indexserver | backint | TRUE |
2. View the content of the user configuration in a data backup...
Use the --dump -c <.ini file> option of the hdbbackupcheck tool.