sap / sap.sap_operations / 1.25.0 / module / hana_backup Create SAP HANA database file backup | "added in version" 1.1.0 of sap.sap_operations" Authors: Ondra Machacek (@machacekondra)sap.sap_operations.hana_backup (1.25.0) — module
Install with ansible-galaxy collection install sap.sap_operations:==1.25.0
collections: - name: sap.sap_operations version: 1.25.0
Create backup of SAP HANA database to files or using BACKINT interface Full Backup: complete SAP HANA database backup. Differential Backup: the data changed since the last full data backup. Incremental Backup: the data changed since the last full data backup or the last delta backup. https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/15b4aa82ae7544f78f809e35add006ce.html
- name: Fetch the binary path of the hdbsql sap.sap_operations.parameter_info: instance_number: "00" name: DIR_INSTANCE register: dir_instance
- name: Create a full HANA backup for SYSTEMDB sap.sap_operations.hana_backup: database_user_password: CHANGEME prefix: MONDAY database_name: SYSTEMDB binary_path: "{{ dir_instance.parameter_value | first }}"
- name: Create a full HANA backup for RHE tenant sap.sap_operations.hana_backup: database_user_password: CHANGEME prefix: MONDAY binary_path: "{{ dir_instance.parameter_value | first }}"
- name: Create a full HANA backup for RHE tenant - all options used sap.sap_operations.hana_backup: database_user_password: CHANGEME database_name: RHE prefix: MONDAY destination: /backups comment: Created with ansible binary_path: "/my/custom/path" wait: false
host: description: - Name of the host on which the database instance is running. type: str type: choices: - INCREMENTAL - DIFFERENTIAL - FULL default: FULL description: - Backup type. - Delta backups can only be created after a data backup has been created. type: str wait: default: true description: - Wait for the operation to complete before returning. - If set to C(true), module will wait on backup task to complete. - If set to C(false), module will schedule the backup task and return immediately. - Please be aware you cannot run two backups in parallel for one SAP HANA database. type: bool prefix: default: '' description: - The data backup files are prepended with the prefix. - Previous backup files will be overwritten if prefix was already used before (for file backups). type: str backend: choices: - FILE - BACKINT default: FILE description: - Create the backup in the file or using the third-party backup tool with BACKINT interface. type: str comment: default: '' description: - Comment to be included into backup. type: str tooloption: description: - String that is forwarded to the third-party backup tool. - This parameter is used only in case C(type) is I(BACKINT). type: str binary_path: default: '' description: 'Path to hdbsql binary. ' type: str destination: default: '' description: 'Directory where where backup data are stored for file backups. <hanasid>adm user should have write permissions to that directory. ' type: str database_name: default: SYSTEMDB description: 'SAP HANA system tenant or SYSTEMDB to backup. If not provided SYSTEMDB is default value. From SYSTEMDB other tenants can be backed up. From tenant only itself can be backed up. ' type: str database_user: description: - A user which to be used to connect to database. SYSTEM user is used if no user is specified. type: str instance_number: description: - Instance number of the database engine. type: str hdbsqluserstore_key: description: - hdbuserstore record to be used to connect to database. type: str database_user_password: description: - Password for HANA SYSTEM database user. Or a user specified in C(database_user) parameter. type: str