Currently Being Moderated

Hana DB backup & restores ? & FAQ

Backup and Recovery of HANA Database

 

 


For the need of optimal performance, the SAP HANA database holds the data in memory.

During normal database operation, data is automatically saved from memory to disk at regular SAVEPOINTS. Additionally, all data changes are recorded in the redo log. The redo log is saved from memory to disk with each committed database transaction. After a improper shutdown, the database can be restarted like any disk-based database, and it returns to its last consistent state by replaying the redo log since the last SAVEPOINT.

 

This SAVEPOINT consists of 3 Stages:

 

Stage A

• All modified pages are determined that are not yet written to disk. The

SAVE POINT coordinator triggers writing of these pages.

 

Stage B:

• The write operations for phase 3 are prepared.

• A consistent change lock is acquired → no write operations are allowed.

• All pages are determined that were modified during phase 1 and written

to a temporary buffer.

• List of open transactions is retrieved.

• Row store information for uncommitted changes made during phase 1 is

written to disk.

• Current log position is determined (log position from which logs must be

read during restart).

• Change lock is released.

 

Stage C

• All data is written to disk. Changes are allowed again during this phase.

• Temporary buffers created in phase 2.

• List of open transactions

• Row store check point is invoke

• Log queue is flushed up to the SAVEPOINT log position

• Restart record is written (containing e.g. the SAVEPOINT log position)

 

While SAVEPOINTs and log writing protect your data against power failures,

SAVEPOINTs do not help if the persistent storage itself is damaged.

 

Database backup can be done manually and also can be scheduled to run automatically

 

Manual backups are done through

                SAP HANA Studio

                DBA COCKPIT

                SQL COMMAND

Scheduling  can be done

                Using DBA Calendar in DBA COCKPIT

                Using script (though SQL Interface)

 

Performing Backups

You can specify whether data and log backups are written to the file system or

using third-party backup tools. The Backint for SAP HANA interface performs

all the actions needed to write the backup data to external storage. The backup

tools communicate directly with the SAP HANA database through the Backint for

SAP HANA interface.

Backint can be configured both for data backups and for log backups.

Data and logs can only be backed up when the SAP HANA database is

Online

Backup and recovery always applies to the whole database. It is not possible

 

to backup and recover individual database objects.

At the beginning of a recovery, all the data and log backups to be recovered

must be available.

The SAP HANA database software version used during the recovery must

always be the same or higher than the version of the software used to create

the backup.

When the data area is backed up, all the payload data from all the servers is backed

  1. This happens in both single-host and multihost environments.

LOG Backup

 

Log backups are done at regular intervals to allow the reuse of log segments.

Log segment is backed up during these situations:

• The log segment is full

• The log segment is closed after exceeding the configured time threshold

• The database is started

 

Enabling and Disabling of Automatic log backup can be done by changing the value of the parameter enable_auto_log_backup.

 

Default: enable_auto_log_backup = yes

 

Maintain Parameter - log_mode

log_mode = overwrite

Log segments are freed by savepoints and no log backup is performed. For

example, this can be useful for test installations that do not need to be backed

up or recovered.

log_mode = legacy In legacy mode, no log backup is performed. Log segments

are retained until a full data backup is performed. This is to allow recovery from

the most recent full backup and the log in the log area. This was the default setting

for SAP HANA SPS 02.

 

 

 

 

FAQS are attached...

 

 


Comments

Delete Document

Are you sure you want to delete this document?

Actions