Ova

How do I change my HANA log backup location?

Published in HANA Log Backup 5 mins read

Changing your SAP HANA log backup location can be accomplished by either adjusting the file system path for log backups or by switching to an external backup interface, such as Backint. Each method offers distinct advantages and configuration steps to suit your data management strategy.

How Do I Change My HANA Log Backup Location?

Modifying your SAP HANA log backup location ensures that your critical transaction logs are stored efficiently and securely, aligning with your disaster recovery and data retention policies. This can involve either updating the file system directory or integrating with a third-party backup solution.

1. Changing the File System Path for Log Backups

For file system-based log backups, the destination path is defined by a specific parameter within your SAP HANA configuration. This method is straightforward and involves updating the basepath_logbackup parameter.

Method 1: Using SAP HANA Cockpit

The SAP HANA Cockpit provides a graphical interface to manage database configurations, making it user-friendly for administrators.

  1. Access SAP HANA Cockpit: Log in to your SAP HANA Cockpit.
  2. Navigate to Database Configuration: Go to Configuration and Monitoring > Database Configuration.
  3. Locate Backup Section: In the Database Configuration interface, filter or navigate to the backup section.
  4. Modify basepath_logbackup:
    • Find the parameter basepath_logbackup.
    • Open the change dialog for this parameter.
    • Enter the new desired file system path for your log backups (e.g., /hana/log_backup_new). Ensure this path exists and the HANA operating system user (<sid>adm) has the necessary write permissions.
    • Save your changes.

Method 2: Using SQL Commands

For those who prefer command-line interfaces or need to script changes, SQL commands offer a direct way to modify configuration parameters.

  1. Connect to HANA Database: Use an SQL client (like SAP HANA Studio, DB Client, or HDBSQL) to connect to your SAP HANA database with a user having system administration privileges.

  2. Execute ALTER SYSTEM Command: Run the following SQL statement, replacing /path/to/new/log/backup with your actual desired path:

    ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('backup', 'basepath_logbackup') = '/path/to/new/log/backup' WITH RECONFIGURE;
    • global.ini: Specifies the configuration file.
    • SYSTEM: Indicates that the change applies system-wide.
    • backup: Refers to the section within global.ini.
    • basepath_logbackup: The parameter being modified.
    • WITH RECONFIGURE: Applies the changes immediately without requiring a database restart.

    Example: To set the new log backup path to /sap/hana/backups/log_files, the command would be:

    ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('backup', 'basepath_logbackup') = '/sap/hana/backups/log_files' WITH RECONFIGURE;

2. Utilizing Backint for Log Backups

Instead of saving log backups to a local file system path, you can integrate SAP HANA with a third-party backup tool via the Backint interface. This allows for centralized backup management, often to tape libraries or cloud storage, and is a significant change in the backup location and management strategy.

To enable Backint for your log backups, you need to adjust a specific parameter in your SAP HANA configuration.

  1. Locate the Parameter: Find the log_backup_using_backint parameter. This parameter is located within the [backup] section of the global.ini parameter file.
  2. Access Change Dialog: You can manage this setting through the SAP HANA Cockpit's Database Configuration interface. Navigate to Configuration and Monitoring > Database Configuration and filter for log_backup_using_backint in the backup section.
  3. Specify Destination Type: Open the change dialog for log_backup_using_backint. To enable backups using Backint, specify true as the value for this parameter. This designates Backint as your log backup destination type.
  4. Save Changes: After setting the value to true, save your changes.

Key Considerations for Backint:

  • Third-Party Tool Integration: Ensure your chosen third-party backup tool (e.g., IBM Spectrum Protect, Veritas NetBackup, Dell EMC Data Domain) is properly installed and configured on the SAP HANA server, and integrated with the SAP HANA Backint agent.
  • Configuration Files: Backint integration typically requires additional configuration files (e.g., backint.cfg) that specify how the external backup tool should operate with HANA.
  • Performance: Monitor the performance of your log backups and restores when using Backint, as it involves network and external storage considerations.

Important Considerations for Log Backup Location Changes

Regardless of the method you choose, several best practices should be followed:

  • Permissions: Ensure the <sid>adm operating system user has full read and write permissions to the new log backup destination. Incorrect permissions are a common cause of backup failures.
  • Disk Space: Verify that the new file system location has sufficient disk space to accommodate log backups, considering growth over time. For Backint, ensure your external backup system has adequate capacity.
  • Monitoring: Implement robust monitoring for your log backup jobs to detect and alert on any failures immediately.
  • Backup Retention: Adjust your backup retention policies as needed for the new location to comply with your organization's data retention requirements.
  • Disaster Recovery Plan: Update your disaster recovery documentation to reflect the new log backup location or strategy.
Backup Method Configuration Parameter Destination Type Common Use Cases
File System basepath_logbackup Local/Network File System Simple setup, direct disk access
Backint log_backup_using_backint External Backup System (e.g., Tape, Cloud) Centralized backup, long-term retention, advanced features

By carefully planning and executing these steps, you can successfully change your SAP HANA log backup location, enhancing your database's reliability and manageability.