hana sps07 backup & recovery

36
What´s New? SAP HANA SPS 07 Backup & Recovery (Delta from SPS 06 to SPS 07) SAP HANA Product Management November, 2013

Upload: sap-database-technology

Post on 13-May-2015

634 views

Category:

Technology


9 download

DESCRIPTION

What´s New? SAP HANA SPS 07 - Backup & Recovery

TRANSCRIPT

Page 1: HANA SPS07 Backup & Recovery

What´s New? SAP HANA SPS 07 Backup & Recovery(Delta from SPS 06 to SPS 07)SAP HANA Product Management November, 2013

Page 2: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 2Public

Agenda

Backup

Recovery

Storage snapshot support

Scale-out support

Deactivation of log mode LEGACY

Certification

More information

Page 3: HANA SPS07 Backup & Recovery

Backup

Page 4: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 4Public

SAP HANA can check data and log backups for integrity using the hdbbackupcheck command line tool

It is recommended to check backups, for example, after transfer to a different storage medium. Both backups to the file system and backups to a 3rd party backup tool via the Backint interface can be checked using hdbbackupcheck. hdbbackupcheck reads in the specified part of the backup, checks its meta data for correctness and consistency, and checks the content for any later changes.

hdbbackupcheck is located in the following directory: /usr/sap/<SID>/SYS/exe/hdb

Syntax

hdbbackupcheck [options] <file> [-i <backupid>] [-e <ebid>]-v displays all known information <file> backup file name (full path)-i <backupid> checks if the backup corresponds to the specified backup ID-e <ebid> external backup ID; mandatory for checking backups in 3rd party backup tool

More information SAP Note 1869119 - Checking backups using hdbbackupcheck

What’s New in SAP HANA SPS 07: Backup and RecoveryConsistency check for data and log backups (I)

Page 5: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 5Public

Example 1: Simple check, data backup is OKhdbbackupcheck backup/data/COMPLETE_DATA_BACKUP_databackup_1_1

Backup '/usr/sap/XXX/HDB09/backup/data/COMPLETE_DATA_BACKUP_databackup_1_1' successfully checked.

Example 2: Verbose check information, data backup is corruptedhdbbackupcheck -v backup/data/COMPLETE_DATA_BACKUP_databackup_0_1

Check backup '/usr/sap/XXX/HDB09/backup/data/COMPLETE_DATA_BACKUP_databackup_0_1'.[...] ERROR: [110088] Error reading backup from 'FILE' '/usr/sap/XXX/HDB09/backup/data/COMPLETE_DATA_BACKUP_databackup_0_1‚[110010] Unable to read source type information from backup '[FILE][/usr/sap/XXX/HDB09/backup/data/COMPLETE_DATA_BACKUP_databackup_0_1]‚ERROR: [110059] The backup /usr/sap/XXX/HDB09/backup/data/COMPLETE_DATA_BACKUP_databackup_0_1 appears to be corrupt, size is 163801ERROR: Backup '/usr/sap/XXX/HDB09/backup/data/COMPLETE_DATA_BACKUP_databackup_0_1' check failed.

Example 3: Additionally check whether the log backup corresponds to the specified backup IDhdbbackupcheck backup/log/log_backup_1_0_491968_494784 -i 1380028606841

ERROR: [110057] Backup /usr/sap/XXX/HDB09/backup/log/log_backup_1_0_491968_494784 has Backup ID 1380028606713, but is expected to have Backup ID 1380028606841ERROR: Backup '/usr/sap/XXX/HDB09/backup/log/log_backup_1_0_491968_494784' check failed.

What’s New in SAP HANA SPS 07: Backup and RecoveryConsistency check for data and log backups (II)

Page 6: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 6Public

With SPS 07, the backup ID is now appended to the log backup file name

Note: Log backups with the old file name layout can still be used for recovery.

Example: Log backup of the service with volume ID 4 Old format:Log_backup_4_0_14498624_14500288

New format:Log_backup_4_0_14498624_14500288.1380197735496

What’s New in SAP HANA SPS 07: Backup and RecoveryLog backup: Changed file name layout

Page 7: HANA SPS07 Backup & Recovery

Recovery

Page 8: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 8Public

In addition to SAP HANA studio, recovery is now also available on the command line

SQL statements for recovery cannot be executed using the normal SQL clients such as hdbsql (recovery requires the database to be offline). For this reason, the Python script recoverSys.py is used to pass SQL statements to SAP HANA.

Prerequisites SAP HANA operating system user credentials

Recovery steps1. The administrator calls the script with the required parameters, thus specifying recovery target time, recovery

type and further options

2. The script stops the SAP HANA database, prepares and executes the recovery

3. After the master name server of the SAP HANA database started successfully, the script terminates.Note: At this point, the recovery is not complete yet. We recommend to call the script using the --wait option, which will ensure that the script waits until the recovery has finished.

What’s New in SAP HANA SPS 07: Backup and RecoveryRecovery on the command line (I)

Page 9: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 9Public

recoverSys.py syntax

You need to call recoverSys.py as follows:

HDBSettings.sh recoverSys.py [parameters] Using the parameters, you pass the SQL command to recover the database If you run HDBSettings.sh recoverSys.py without any parameters, recoverSys.py performs a recovery

to the most recent point in time For more information on the parameters, see the SAP HANA Administration Guide

Example Recover the database to a point in time and force the script to wait until the recovery has finishedHDBSettings.sh recoverSys.py --wait --command="RECOVER DATABASE UNTIL TIMESTAMP '2013-08-22 15:00:00'"

What’s New in SAP HANA SPS 07: Backup and RecoveryRecovery on the command line (II)

Page 10: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 10Public

SQL syntax for recovery

RECOVER DATABASE <until_definition> [<source_definition>] [USING BACKUP_ID <int_const> | USING SNAPSHOT] [USING GUID <str_const>] [CHECK ACCESS [ALL|USING FILE|USING BACKINT]] | <execute_recover_data>

Examples Point in time recovery to 3pm UTC using data backups from directory /backup with prefix MONDAY and log

backups from additional directoriesRECOVER DATABASE UNTIL TIMESTAMP '2011-08-22 15:00:00' USING DATA PATH ('backup/MONDAY/') USING LOG PATH ('/backup/logs1/','/backup/logs2/')

Data recovery without log replay using data backup files from directory /backup with prefix MONDAYRECOVER DATA ALL USING FILE ('/backup/MONDAY') CLEAR LOG

What’s New in SAP HANA SPS 07: Backup and RecoveryRecovery on the command line (III)

Page 11: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 11Public

An option to check whether you can reach a specified recovery target with the available backups has been added to the hdbbackupdiag command line tool.

hdbbackupdiag is located in the following directory: /usr/sap/<SID>/SYS/exe/hdb

Checks: All necessary backups are available and can be accessed For file system backups:

– File exists at the original location or at a location that has been specified– The current operating system user has read privileges for the file– File size matches the size information from the file header– The backup ID in the file matches with the backup ID recorded in the backup catalog

For backups written to a 3rd party backup tool:– Backup is available in the 3rd party backup tool

Note: hdbbackupdiag does not check the backup content for consistency (use hdbbackupcheck).

What’s New in SAP HANA SPS 07: Backup and RecoveryCheck whether recovery can be executed with the available backups (I)

Page 12: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 12Public

Syntax

hdbbackupdiag --check [options]-d Directory where backup catalog is located-i <backupid> ID of the data backup that is to serve as basis for the recovery-u "YYYY-MM-DD HH:MM:SS" Target in UTC; if not specified youngest reachable time is used

Examplehdbbackupdiag --check -d $DIR_INSTANCE/backup/log –i 1380028112722 found backup catalog 1380031306827 from file /usr/sap/XXX/HDB09/backup/log/log_backup_0_0_0_0.1380031306827using backup catalog 1380031306827 from file /usr/sap/XXX/HDB09/backup/log/log_backup_0_0_0_0.1380031306827Backup '/usr/sap/XXX/HDB09/backup/data/COMPLETE_DATA_BACKUP_new_databackup_0_1' successfully checked.[...] Backup '/usr/sap/XXX/HDB09/backup/log/log_backup_4_0_13483264_13489600' successfully checked.

More information SAP Note 1873247: Checking recoverability with hdbbackupdiag --check

What’s New in SAP HANA SPS 07: Backup and RecoveryCheck whether recovery can be executed with the available backups (II)

Page 13: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 13Public

In addition to checking for missing backups at the start of a recovery, SAP HANA now also automatically checks file system backups for corruption

If a corruption is detected, for example size or backup ID do not match with the information that is recorded in the backup catalog, the recovery is not started and details are displayed in the recovery wizard and written to the backup log file.

Note: The extended checks are executed for file system backups only. If a 3rd party backup tool is used, only the existence of the backups on the 3rd party backup server is verified.

What’s New in SAP HANA SPS 07: Backup and RecoveryExtended automatic checks for file system backups at the start of a recovery

Page 14: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 14Public

What’s New in SAP HANA SPS 07: Backup and RecoveryImproved recovery progress reporting in SAP HANA studio

Progress reporting for a recovery now shows the recovery in more detail

After the initial collection of system information for the recovery, the recovery wizard now shows the following phases (progress per service) Phase 1: Data recovery

– using data backup or snapshot Phase 2: Log recovery

– using log backups and/or log that is still available in the log area

Phase 3: Restart

Page 15: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 15Public

A running recovery can now be cancelled from the recovery wizard in SAP HANA Studio

You need to confirm the cancelation. After you have canceled a recovery, you have to start a new recovery.

What’s New in SAP HANA SPS 07: Backup and RecoveryCancel recovery from SAP HANA studio

Page 16: HANA SPS07 Backup & Recovery

Storage snapshot support

Page 17: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 17Public

SAP HANA supports the creation of storage snapshots, which can later be used for SAP HANA recovery

There is a loose coupling between SAP HANA and the storage tool: storage snapshots are recorded in the SAP HANA backup catalog

Creating a snapshot1. Using SAP HANA studio, prepare the database

for the storage snapshot. Technically, this createsan internal data snapshot.

2. Using the storage tool, create a storagesnapshot of the SAP HANA data area

3. In SAP HANA studio, confirm the storagesnapshot as successful. An entry including theexternal backup ID is written to the backupcatalog

What’s New in SAP HANA SPS 07: Backup and RecoveryStorage snapshot support (I)

SAP HANA Database

External StorageStorage

Tool

SAP HANA studio

Data Area (Disk)

Data snapshot

Prepare database

Create storagesnapshot

Confirm storagesnapshot

Page 18: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 18Public

Creating a snapshot1. In the Systems view in SAP HANA studio, right-click on the system and choose Storage Snapshot...

Then choose the Prepare option.Alternatively, you can use the SQL command:BACKUP DATA CREATE SNAPSHOT COMMENT ‘snapshot_test’

2. Using the storage tool, create a storage snapshot of the SAP HANA data area

3. In SAP HANA studio, confirm the successful storage snapshot and enter the external snapshot ID.Alternatively, you can use the SQL command:BACKUP DATA CLOSE SNAPSHOT BACKUP_ID 3456789 SUCCESSFUL 'storage_id_12345‘

Storage snapshots are listed in the backup catalog. You can either display the backup catalog in SAP HANA studio, or query it using SQL (system view M_BACKUP_CATALOG).

What’s New in SAP HANA SPS 07: Backup and RecoveryStorage snapshot support (II)

Page 19: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 19Public

SQL syntax

BACKUP DATA CREATE SNAPSHOT [COMMENT <string>] Prepares the database for the storage snapshot (creates internal data snapshot) The internal data snapshot is a global internal savepoint similar to the internal savepoint for a data backup. As

long as the data snapshot exists, no complete data backup is possible The data snapshot automatically gets a SAP HANA backup ID, which is stored in the backup catalog The optional comment is also stored in the backup catalog

BACKUP DATA CLOSE SNAPSHOT BACKUP_ID <backup_id> <handshake><handshake>:= SUCCESSFUL <external_id> | UNSUCCESSFUL [<error_reason>]<external_id> identifier provided by the storage tool Confirm successful storage snapshot As a result, SAP HANA marks the snapshot as valid in the backup catalog, and adds the external ID of the

storage snapshot

What’s New in SAP HANA SPS 07: Backup and RecoveryStorage snapshot support (III)

Page 20: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 20Public

Recovery using a snapshot1. Using the storage tool, transfer the storage

snapshot to the data area of the SAP HANA database

2. Using SAP HANA studio, recover the database using the storage snapshot as basis (available in the recovery wizard)Note: All recovery options are available, including point-in-time recovery using log backups/log from the log area.

What’s New in SAP HANA SPS 07: Backup and RecoveryStorage snapshot support (IV)

SAP HANA Database

External StorageStorage

Tool

SAP HANA Studio

Recover database

Transfer storagesnapshot to data areaData Area (Disk)

Snapshot

Page 21: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 21Public

Recovery using a snapshot1. Stop the SAP HANA database

2. Using the storage tool, transfer the storage snapshot to the data area of the database

3. In the Systems view in SAP HANA studio, right-click on the system, select Recover... and choose recovery type and log backup location as usual

4. On the Select Backup page, choose the storage snapshot from the listo Only the storage snapshot that was transferred to the

data area is marked as available and can be usedo Other storage snapshots are also listed, but marked as

unavailable

5. Specify further recovery options as usual and start the recovery

What’s New in SAP HANA SPS 07: Backup and RecoveryStorage snapshot support (V)

Page 22: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 22Public

SQL syntax

RECOVER DATABASE <until_definition> USING SNAPSHOT <until_definition> Recovery target (timestamp or log position)

Recover database using a storage snapshot Prerequisite: The storage snapshot needs to be available in the data area before the recovery starts

Example: Recover the database to a point in time based on a storage snapshotRECOVER DATABASE UNTIL TIMESTAMP '2011-09-30 15:00:00' USING SNAPSHOT

What’s New in SAP HANA SPS 07: Backup and RecoveryStorage snapshot support (VI)

Page 23: HANA SPS07 Backup & Recovery

Security

Page 24: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 24Public

If storage snapshots are used as backups, the root key for the data volume encryption is included in the automatic backup of the SSFS

The SSFS is always part of the data backup, but for file system or BACKINT backups it does not include the data volume encryption root key.

The root key is only needed in recovery scenarios where a storage snapshot is used as the basis for the recovery.

What’s New in SAP HANA SPS 07: Backup and RecoverySSFS: Data volume encryption root key included in backup

Page 25: HANA SPS07 Backup & Recovery

Scale-out support

Page 26: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 26Public

When a new host is added, the database now records this and automatically writes an initial data backup for this new host

The backup history is not interrupted. Up to SPS 07, a complete data backup needed to be executed after adding a new host in a scale-out scenario, with users not able to work in the database until the data backup had finished.

What’s New in SAP HANA SPS 07: Backup and Recovery“Add host” integration into logging

Page 27: HANA SPS07 Backup & Recovery

Deactivation of log modeLEGACY

Page 28: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 28Public

What’s New in SAP HANA SPS 07: Backup and RecoveryDeactivation of log mode LEGACY

Log mode LEGACY is deactivated in SAP HANA SPS 07

Log mode legacy has not been recommended since SAP HANA SPS 03

If a system is still running in log mode LEGACY, an upgrade to SAP HANA SPS 07 will fail with the error message that the log mode first needs to be set to either NORMAL or OVERWRITE

For productive systems, we recommend log mode NORMAL because it provides the highest security with regard to the restoration of data for a recovery of the SAP HANA database. In log mode NORMAL, the system automatically creates log backups that can be used for a recovery in addition to the data backups. However, more backup space is required in this log mode due to the log backups. Therefore, an operational concept for administrating data and log backups is a prerequisite for using log mode NORMAL.

For more information, see SAP Notes 1645183 - Changing log mode for SAP HANA DB 1823343 - Deactivate log mode LEGACY with SAP HANA SPS 07

Page 29: HANA SPS07 Backup & Recovery

Certification

Page 30: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 30Public

SAP HANA Backup and RecoveryBackint Certification

In August 2013, SAP certified IBM Tivoli Storage Manager for Enterprise 6.4 for SAP HANA

Certification is an installation prerequisite for backup tools using the “Backint for SAP HANA” interface. SAP Note 1730932 (Using backup tools with Backint) Release announcement

Certified tools (as of 2013-08-14)

Online listing of certified tools: http://www.sap.com/partners/directories/SearchSolution.epx “Certification Category” = “SAP Certified – Integration with SAP HANA” ”SAP-Defined Integration Scenarios” = "HANA-BRINT 1.1”

Information for tool vendors: http://scn.sap.com/docs/DOC-34483

Vendor Certified Backup Tool Support Process

Symantec NetBackup 7.5 SAP Note 1913568

IBM Tivoli Storage Manager for Enterprise 6.4 SAP Note 1913500

Page 31: HANA SPS07 Backup & Recovery

More Information

Page 32: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 32Public

SAP HANA documentation

Available on the SAP Help Portal at http://help.sap.com/hana_platform SAP HANA Administration Guide,

“Backing Up and Recovering the SAP HANA Database” SAP HANA Technical Operations Manual

Important SAP Notes 1642148: FAQ: SAP HANA database backup and recovery 1730932: Using backup tools with Backint 1869119: Check backup integrity For further notes on backup/recovery, see BC-DB-HDB-BAC

Backint for SAP HANA certification Certification announcement and description

What’s New in SAP HANA SPS 07: Backup and RecoveryMore information

Page 33: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 33Public

Disclaimer

This presentation outlines our general product direction and should not be relied on in making a purchase decision. This presentation is not subject to your license agreement or any other agreement with SAP.

SAP has no obligation to pursue any course of business outlined in this presentation or to develop or release any functionality mentioned in this presentation. This presentation and SAP’s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice.

This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.

Page 34: HANA SPS07 Backup & Recovery

Thank youContact information

Andrea KristenSAP HANA Product [email protected]

To get the best overview of what’s new in SAP HANA SPS 07, read this blog.

Page 35: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 35Public

© 2013 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

Page 36: HANA SPS07 Backup & Recovery

© 2013 SAP AG. All rights reserved. 36Public

© 2013 SAP AG. Alle Rechte vorbehalten.

Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.

Einige der von der SAP AG und ihren Distributoren vermarkteten Softwareprodukte enthalten proprietäre Softwarekomponenten anderer Softwareanbieter.

Produkte können länderspezifische Unterschiede aufweisen.

Die vorliegenden Unterlagen werden von der SAP AG und ihren Konzernunternehmen („SAP-Konzern“) bereitgestellt und dienen ausschließlich zu Informationszwecken. Der SAP-Konzern übernimmt keinerlei Haftung oder Gewährleistung für Fehler oder Unvollständigkeiten in dieser Publikation. Der SAP-Konzern steht lediglich für Produkte und Dienstleistungen nach der Maßgabe ein, die in der Vereinbarung über die jeweiligen Produkte und Dienstleistungen ausdrücklich geregelt ist. Keine der hierin enthaltenen Informationen ist als zusätzliche Garantie zu interpretieren.

SAP und andere in diesem Dokument erwähnte Produkte und Dienstleistungen von SAP sowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und verschiedenen anderen Ländern weltweit. Weitere Hinweise und Informationen zum Markenrecht finden Sie unter http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark.