100% found this document useful (1 vote)
93 views6 pages

Backup and Recovery HANA Theory

Uploaded by

anime090106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
93 views6 pages

Backup and Recovery HANA Theory

Uploaded by

anime090106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

BACKUP AND RECOVERY

The normal database backup and recovery principles apply to SAP HANA. The SYSTEMDB and all
tenants are separate databases, which can be individually backed up and restored.

SAP HANA supports the following backups

1)Data Backup

2)Delta Backup (incremental ,Differential Backup)

3)Log Backup

Data Backups:

A data backup includes all the data that is required to recover the database to a consistent state. A data
backup is comprised of both business data and administrative data. Administrative data can be roles, models,
information models, and topology information. With a data backup, only the actual data is backed up.

A data backup does not include: Unused space in the database, The log area

The data area is backed up in parallel for each of the SAP HANA services. If SAP HANA is running on multiple
hosts, a data backup includes all the service-specific backup parts for all the hosts. To ensure the safety of your
data, data backups should be stored on multiple different backup destinations outside the SAP HANA
database.
Delta Backups:

Delta backups allow you to reduce the amount of data that is backed up, compared to full data
backups. In turn, this means that delta backups are normally faster to create than full data backups.
In addition, a database recovery using delta backups is normally faster than with log backups. With
delta backups, only the changed data is recovered, whereas with log backups, each log entry needs
to be processed separately before it is recovered. Processing multiple log backups is normally more
processor-intensive than recovering a small number of delta backups.

Delta backups back up only data that has been changed since the last full data backup or the last
delta backup

Incremental Backups: These backups only store data changes since the last data backup (either
the last data backup or the last delta backup). Incremental backups are faster and require less
storage space than full backups, but restoring data from incremental backups can be more time-
consuming because each incremental backup since the last full backup needs to be processed.

Differential Backups: These backups store data changes since the last full backup, irrespective of
other differential or incremental backups that have occurred since then. While differential
backups require more storage space than incremental backups, they offer faster data recovery
times as they only need the last full backup and the last differential backup for a restore
operations.

If you are using a third-party backup tool to create delta backups, you need to ensure that the
backup agent executable (hdbbackint) is configured correctly.This hdbbackint call is sent internally
by SAP HANA and is recorded in the backint.log file.

Log Backups: The Redo Log is a critical component in HANA system, capturing all changes made to
the database. Regular backups of the Logs are crucial for database recovery to the most recent
committed transaction in the event of a database failure. Log backups help in ensuring minimal data
loss during a recovery scenario.

Log Mode:

SAP HANA can run in the following log modes: normal and overwrite Note After installation, SAP
HANA temporarily runs in log mode overwrite. This ensures that the log area does not grow
excessively. After you create the first full data backup, SAP HANA runs in the default log mode
Normal.

Normal: In log mode normal, log backups are created automatically if automatic log backups are
ena bled. Log mode normal is recommended to provide support for point-in-time recovery.
Automatic log backups can prevent the log area from filling.

In log mode normal, log segments are backed up automatically in the following situations:

● The log segment is full.


● The log segment is closed after the configured time interval has been reached if at least one
commit has been made.

● The database is started.

After a log segment has been backed up, SAP HANA can reuse the space that a log segment occupied
in the log area to overwrite it with new log entries. A log segment in the log area is freed and its
space can be reused only after:

1)The log segment is closed and a savepoint has been written.

2)The log segment has been backed up.

If the log area becomes full and no more log segments can be created in the file system, a log full
situation arises and the database freezes. If the log area is full, no more log entries can be written
until a log backup has been completed and the log segment is no longer needed to re start the
database.

Do not delete log segments at operating system level, as this will make the log area unusable. As a
consequence, the database may stop working immediately, and it will not be possible to restart the
database

Overwrite:

No log backups are created. When savepoints are written, log segments are immediately freed to be
overwritten by new log entries. When log mode overwrite is active, the Log Backup Settings in the
Backup Console cannot be changed. Log mode overwrite can be useful for installations that do not
need to be backed up or recovered. For example, for test installations.

Log mode overwrite is not recommended for production systems. With log mode overwrite, a point-
in-time recovery is not possible. For recovery, only data backups are available; no log backups exist.
Only the following recovery option can be selected: Recover the database to a specific data backup
or storage snapshot.

You can switch between the SAP HANA log modes: normal and overwrite

Procedure

1. In SAP HANA studio, go to the Configuration tab.

2. Open global.ini, then open the persistence section.

3. Locate the parameter log_mode.

4. Double-click to open the change dialog.

5. Specify the new log mode. The new log mode can be either normal or overwrite. To reset SAP
HANA to log mode normal, choose Restore Default.

6. Save. The change takes effect immediately.

Destination for the Log Backups:

By default, file-based log backups are written to: usr/sap/<SID>/HDB<NR>/backup/<SID>/log

You can change the default destination for file-based log backups FROM STUDIO.
Log Backup Interval :By default, the log backup interval is 15 minutes (900s). You can change the
interval at which log backups are created. If the log segments become full before the log backup
interval, the logs are backed up automatically.

The log backup interval takes effect only if automatic log backups are enabled. To enable automatic
log backups, the log mode must be NORMAL.

You can specify the log backup interval using the Backup Console in SAP HANA studio. Alternatively,
you can configure the parameter log_backup_timeout_s in the global.ini configuration file.

A log backup interval of 15 minutes (or less) is recommended for production systems.

If you specify a timeout of 0, log backups are created only when a log segment is full and when
services are restarted.

RECOVERY:

To perform a recovery, an SAP HANA database needs to be shut down.

For this reason, during recovery, a database cannot be accessed by end users or applications.

An SAP HANA database cannot be recovered to an SAP HANA database with a lower software
version. The SAP HANA software version used for the recovery must always be the same version or
higher than the SAP HANA database used to create the data backup or storage snapshot.

Backup is online ,Recovery is off line. If your hana data base is encrypted, while backup data
uncrypted and backedup.

You can cancel a recovery while it is running. However, be aware that canceling a recovery makes
the database state inconsistent. SAP HANA prevents an inconsistent database from being started. To
be able to work with the database again after cancelling a recovery, you would need to perform the
recovery again.

To recover the database, you need at least one full backup (data backup or storage snapshot).

The data backup can be file-based or it can be created using a third-party backup tool

If a full backup is physically available, but not recorded in the backup catalog, that backup can still be
used to recover the database. At the time of recovery, you need to specify its location.

At the beginning of a recovery, all the data and log backups to be used must be either accessible in
the file system or available through a third-party backup tool.

Recovery of SAP HANA database is required in the following situations −

1)A disk in the data area is unusable or disk in the log area is unusable.
2)As a consequence of a logical error, the database needs to be reset to its state at a particular point
in time.
3)You want to create a copy of the database.
RECOVERY TYPES IN HANA:

Most Recent State − Used for recovering the database to the time as close as possible to the
current time. For this recovery, the data backup and log backup have to be available since last data
backup and log area are required to perform the above type recovery.

Point in Time − Used for recovering the database to the specific point in time. For this recovery, the
data backup and log backup have to be available since last data backup and log area are required to
perform the above type recovery

Specific Data Backup − Used for recovering the database to a specified data backup. Specific data
backup is required for the above type of recovery option.

IMPORTANT POINTS:

1)Data backup and Log back can happen at same time

2)two data backups we can’t schedule on same time

3)incremental backup and differential backup we can,t take in same time

4)By default log mode= over write, once you take backup first time log mode will be NORMAL

Automatic backup enabled in log mode Normal.In log mode over write --point in time recovery not
possible, log backup not possible.

5)It is not possible to backup and recover individual database objects . backup and recovery always
apply to the whole database.

You might also like