2019独角兽企业重金招聘Python工程师标准>>> hot3.png

SAP HANA Backup and Recovery

Skip to end of metadata

  • Created by Paul Power, last modified on Nov 23, 2017

Go to start of metadata

  • Purpose
  • System Privileges
  • How to Perform a Backup
  • Manual Backup Check
  • Recovery
  • Common Questions
  • Issues and Reported Problems
  • Related Documents
  • Related Videos:
  • Related SAP Notes/KBAs

Purpose

This page is to explain the steps on how to perform a basic backup and recovery. At the end of this guide, there will be frequently asked questions and common problems that are encountered. For an in-depth explanation of the backup and recovery process, please see the Admin guide http://help.sap.com/hana/SAP_HANA_Administration_Guide_en.pdf.

System Privileges

In order to do a backup, the user will need the following privileges

  1. BACKUP ADMIN or BACKUP OPERATOR
  2. CATALOG READ

How to Perform a Backup

You can perform a full data backup through HANA Studio and also through SQL Statements.

Studio

Open SAP HANA Studio and on the navigator side (left hand side) expand your system and double click the ‘Backup’ icon

1-28-2015%2011-10-44%20AM.jpg?version=2&modificationDate=1422472329000&api=v2

Press the "Backup" button.
** For a multi-tenant database, you will have the option to backup the system database and the tenant database. **

1-28-2015%2011-14-14%20AM.jpg?version=2&modificationDate=1422474193000&api=v2

The following popup will appear.

1-28-2015%2011-15-42%20AM.jpg?version=1&modificationDate=1422472588000&api=v2

Click Next

1-28-2015%2011-17-01%20AM.jpg?version=2&modificationDate=1422474221000&api=v2

The backup will then show you the backup status and then finish.

1-28-2015%2011-17-58%20AM.jpg?version=2&modificationDate=1422474248000&api=v2

The backup will finish with the summary page.

1-28-2015%2011-18-38%20AM.jpg?version=1&modificationDate=1422472732000&api=v2

SQL Command for Backups

The SQL Command to perform a full data backup follows the syntax:

BACKUP DATA USING FILE ('<name of backup>')

1-28-2015%2011-50-42%20AM.jpg?version=1&modificationDate=1422474917000&api=v2

Manual Backup Check

Although automatic checks take place while complete data backups and log backups are performed, you should manually re-check the integrity of any backup if it is copied or moved to another location.

hdbbackupcheck -v <Backup file>

1-28-2015%2011-39-39%20AM.jpg?version=1&modificationDate=1422474066000&api=v2

Recovery

To recover a SAP HANA database, the database needs to be shut down. During recovery, the database therefore cannot be accessed by end users or applications.

It may be necessary to recover the SAP HANA database in the following situations:

  • A disk in the data area is unusable.
  • A disk in the log area is unusable.
  • As a consequence of a logical error, the database needs to be reset to its state at a particular point in time.
  • You want to create a copy of the database.

There are a few different types of recovery

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.

Specific Log Position: This recovery type is an advanced option that can be used in exceptional cases where a previous recovery failed.

Restrictions for Recovery

  • A SAP HANA database cannot be recovered to a SAP HANA database with a lower software version. The SAP HANA database software version used for the recovery must always be the same version or higher than the SAP HANA database used to create the backup.
  • There can be any number of hosts in the target system, provided that the number and type of services is identical in both the source and the target system.
  • With SAP HANA multi-tenant database containers, recovery using snapshots is not supported yet. Tenant databases can be recoverd via the relevant system database only.

Recovery Process

The database can be recovered from HANA Studio and also from SQL Commands.

Studio

Right click on the HANA system and then select "Backup and Recovery", then "Recovery"

1-28-2015%202-47-18%20PM.jpg?version=1&modificationDate=1422485375000&api=v2

The HANA system will stop and then the recovery wizard will appear. From here, select the recovery option. In this example, I chose to recover from 2 hours ago.

1-28-2015%202-53-36%20PM.jpg?version=1&modificationDate=1422485671000&api=v2

Ensure that the log backup directory is correct. ** This is important if you are recovering onto a different HANA instance **

1-28-2015%202-54-46%20PM.jpg?version=1&modificationDate=1422485747000&api=v2

The location of the data backup is specified next

1-28-2015%202-56-41%20PM.jpg?version=1&modificationDate=1422485848000&api=v2

Additional Settings.

1-28-2015%202-57-47%20PM.jpg?version=2&modificationDate=1422485915000&api=v2

Confirm all of the settings are correct and then select Finish.

1-28-2015%202-59-18%20PM.jpg?version=1&modificationDate=1422486013000&api=v2

The recovery will take some time. After HANA has performed the recovery, the following screen is displayed. The HANA system will start automatically after a successful recovery.

1-28-2015%203-17-02%20PM.jpg?version=1&modificationDate=1422487037000&api=v2

Command Line

The Python script recoverSys.py supplies the restore command to the services and starts the database.

  ie) python /usr/sap/<SID>/SYS/exe/hdb/python_support/recoverSys.py --password=<sidadm passwd> --wait --command="RECOVER DATABASE UNTIL TIMESTAMP '2013-03-29 23:59:59'"

1. Restore until most recent state - choose a current timestamp or one in the future

      RECOVER DATABASE UNTIL TIMESTAMP 'YYYY-MM-DD HH:MM:SS'

Ex: RECOVER DATABASE UNTIL TIMESTAMP '2013-03-22 15:00:00'

2. Restore untilPoint in time

      RECOVER DATABASE UNTIL TIMESTAMP 'YYYY-MM-DD HH:MM:SS'

   Restore until point in time with timestamp using further directories containing log backups

RECOVER DATABASE UNTIL TIMESTAMP 'YYYY-MM-DD HH:MM:SS' CHANGE ALL LOG USING PATH ('/usr/sap/SH1/HDB00/backup/logs1/‘,'/usr/sap/SH1/HDB00/backup/logs2/')

Ex: RECOVER DATABASE UNTIL TIMESTAMP '2013-03-01 15:00:00' USING DATA PATH ('/usr/sap/SH1/HDB00/backup/data/COMPLETE') USING LOG PATH ('/usr/sap/SH1/HDB00/backup/logs1/‘,'/usr/sap/SH1/HDB00/backup/logs2/')

Common Questions

The following are problems have been encountered by customers in the past.

Q: Can backups be recovered to a SAP HANA database with a higher software version?

A:  This is answered in SAP Note 1642148 - FAQ: SAP HANA Database Backup & Recovery

"

Yes.

You can recover data and log backups created with a SAP HANA database software version lower or equal to the target database. Data and log backups cannot be recovered to a SAP HANA database with a lower software version.

If you are updating your SAP HANA database from a maintenance revision to a support package, certain restrictions apply.

More information: SAP Note 1948334 (SAP HANA Database Update Paths for Maintenance Revisions)

"

Q: I am recovering using a backup from a multi-node to a single-node environment, what should I check before performing this recovery?

A: The most common problem with recovery from a different system is a mismatch in topology. For example, the backup was taken from a system that has 2 indexservers and you want to recover it on a system that has only 1 indexserver. If you attempt to do this, the recover will fail and you will need to recover back to the original state.

The most common service that is mismatching is the Embedded statistics server. To check this, compare the nameserver.ini in the source and the target for [statisticsserver] -> active = true.
The second most common service that is mismatching is the indexserver. Consult SAP Note 2093572 - SAP HANA Migration from Multi-Node to Single-Nodefor more details on how to configure the target system to match the backup landscape.

Q: If a recovery fails, my HANA server does not start.

A: This is a typical behavior of HANA. You must recover from a working backup (that has the same topology)

Q: How do you perform a system refresh?

A: Follow this note to perform a system refresh using SWPM. Please see SAP Note 1844468 - Homogenous system copy on SAP HANA

Q: I'm performing a recovery from SPS09, is there anything I need to be aware of?

A: If you have upgraded to SPS09, you should ensure that you perform a full data backup prior to attempting a recovery. See SAP Note 2119628 - Missing or wrong data after recovery of older backup with SAP HANA SPS09.. After you have successfully recovered again, perform another full data backup. See SAP Note 2097985 - Point-in-Time Recovery Fails After Data Restore.

Q: If there is a failed backup, what do I do first?

A: Consult the backup.log for more details on the error. This is one of the first things to do. Once you determine the error, you can search SAP KBA's for a solution.

Q: What is the process of archiving system-based backups?

A: Refer to SAP Note 1817703 - Archiving file system-based backups  and SAP Note 2096851 - Management of Old Backups in HANA, to determine if backup files can be archived.

Q: We want to upgrade our Backint system, what needs to be done on HANA?

A: Refer to SAP Note 2009486 - Disable SAP HANA log backups during upgrade of third-party backup tool that supports the Backint for SAP HANA interface

Q. When copying or refreshing one SAP HANA system from a backup taken from another SAP HANA system, can the schema name be changed?

A. It is not possible to change the schema name on the SAP HANA database. Please see SAP Note 1642148 - FAQ: SAP HANA Database Backup & Recovery

Q: My backups are performing slow, what can I do?
A:  SAP Note 1835075 - Analyze backup and recovery performance issues,  provides detailed steps on how to analyze performance in relation to backups and recovery.

Q: How do you cancel a running backup?
A: To cancel a running backup, please use the following 3 SQL statements:

  1. Get the backup_id of your running backup:
    select BACKUP_ID from "SYS"."M_BACKUP_CATALOG" where entry_type_name = 'complete data backup' and state_name = 'running'  order by sys_start_time desc
  2. Cancel the backup
    backup cancel <backup_id>
  3. Confirm the backup has cancelled
    select state_name from "SYS"."M_BACKUP_CATALOG" where backup_id = <backup_id>
  4. Check to  make sure there are no running backups still
    select * from  "SYS"."M_BACKUP_CATALOG" where STATE_NAME = 'running';
  5. If the backup still exists, you can try to cancel the thread through the commands:
    ALTER SYSTEM CANCEL SESSION ;
    ALTER SYSTEM DISCONNECT SESSION ;

Q: How do I determine what redo log files are needed for my restore?
A: Follow the steps in this note: 1705945  - Determining required restoration files

Q: Can I use a backup taken with 3rd party tools (backint) to perform a system copy?

A: Yes, please follow the steps of the admin guide at

http://help.sap.com/saphelp_hanaplatform/helpdata/en/ea/5004bdab024061afd1caae7d309263/content.htm

Q: How do you enable further tracing if a backup is failing?
A: Run the following command in sql editor:

Enable the trace ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('backup', 'trace') = 'debug' with reconfigure;
Disable the trace ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') UNSET ('backup', 'trace') with reconfigure;

Issues and Reported Problems

Error: This error occurs when I try to recover "Could not recover system <SID> - Could not start master name server"?

Solution: When a recovery is initiated in SAP HANA Studio, the database, if still running, will be shutdown. The database is then restarted automatically during recovery. If for some reason, the database cannot be shutdown completely before the recovery, i.e. some server processes cannot be stopped, the restart and ultimately the recovery will fail. Consult SAP Note 1944052 - Recovery failed due to hdbdaemon process not able to stop

Related Documents

SCN Document SAP HANA Backup/Recovery Overview

SCN Blog: Back it on up…..then recover it

SCN: Backup and Recovery - HANA

SCN: SAP HANA Academy: Backup and Recovery - Backup Catalog

Related Videos:

SAP HANA Academy - Backup and Recovery: Storage Snapshot [SPS 08]

SAP HANA Academy - Backup and Recovery: Backup Catalog

Related SAP Notes/KBAs

SAP Note: 1642148  - FAQ: SAP HANA Database Backup & Recovery

SAP Note: 2093572  - SAP HANA Migration from Multi-Node to Single-Node

SAP Note: 1651055 - Scheduling SAP HANA Database Backups in Linux

SAP Note: 2044438 - HANA: Backup fails for Out Of Memory error

SAP Note: 2122316  - mvcc garbage collection is blocked while data backup when auditing is enabled

SAP Note 2123153  - HANA Recovery Failing with "recovery strategy could not be determined"

SAP Note 1730932 - Using backup tools with Backint for HANA

SAP Note 1730998 - Unrecommended versions of backup tools

SAP Note 2063454 - Long running log backups

SAP KBA 2101244 - FAQ: SAP HANA Multitenant Database Containers (MDC)

SAP Note 2096000 - SAP HANA multitenant database containers - Additional Information

SAP KBA 2486224 - Tenant DB recovery to another system Tenant DB

转载于:https://my.oschina.net/rootliu/blog/2056397

SAP HANA Backup and Recovery相关推荐

  1. SAP HANA中文技术文档(跟matinal学HANA)

    SAP HANA中文技术文档(跟matinal学HANA) 1.  点击进入:SAP XS HANA专栏 2.  点击进入:SAP UI5上传图片 用XSJS存储在HANA中的方法 3.  点击进入: ...

  2. In-memory Computing with SAP HANA读书笔记 - 第七章:Business continuity and resiliency for SAP HANA

    本文为In-memory Computing with SAP HANA on Lenovo X6 Systems第七章Business continuity and resiliency for S ...

  3. SAP HANA命令行方式备份恢复

    hana数据库命令行备份和恢复 hana大致原理图 而不像传统数据库,数据放在硬盘里,走过复杂的读操作,走过系统总线,在内存里被短暂的处理,然后再走过同样的路回去,躺在硬盘里 1. hana数据库分为 ...

  4. SAP HANA原生备份与恢复

    官方安装文档解读SAP S4 HANA架构 SAP HANA原生备份与恢复 自己攒一台SAP S4 HANA服务器硬件配置参考 BASIS模块管理 为什么SAP ECC的系统,数据库总是和SAP的应用 ...

  5. 戴尔公司向SAP HANA明确示爱 发布全新系统设计方案

    Micahel Dell在最近的发言中给出了戴尔公司的主要精力将放在系统设计层面的说法,但语言毕竟无力.今天戴尔公司正式推出一款设备,专门面向运行有SAP HANA方案的企业客户. 这套戴尔-EMC ...

  6. SAP HANA:持续创新十周年

    SAP HANA:持续创新十周年 今年是 SAP HANA 发布十周年.随着 SAP HANA 的诞生,SAP 成为了世界领先的内存计算数据库厂商.SAP HANA 也是 SAP 历史上成长最快的产品 ...

  7. SAP HANA解决方案设计10问详解

    https://www.toutiao.com/a6674578205040443907/ SAP是全球最大的企业软件供应商,提供包括ERP.SRM.BI等在内的企业级应用软件.而HANA(High ...

  8. [Step By Step]使用SLT工具从SAP导入数据到SAP HANA

    在配置完备的情况下,SLT工具的Replicate 工作是在SAP HANA Data Provisioning中完成的 1. Log on to the SAP HANA Studio 2. Cal ...

  9. [Step By Step]如何在SAP Business Object Data Services中连接到SAP HANA 数据库

    1. 打开SAP Business Objects Data Services Designer, 并登陆进入相应的Repository 2. 选中右下方的Data Store 标签页,并在其空白区域 ...

最新文章

  1. Matlab篇(二)MATLAB中addpath的用法 (转)
  2. python3 获取cookie解决方案
  3. 最早的电子计算机艾尔妮,这些看似没用的NPC 却是我们最早的回忆
  4. 消息发送到消息接收的整体流程
  5. mpvue微信小程序http请求-fly.js
  6. Python实现——二元线性回归(最小二乘法)
  7. Delphi多媒体设计之TMediaPlayer组件(二)
  8. 作者:熊赟,博士,复旦大学计算机科学技术学院副教授。
  9. 笔记本电脑网络连接显示红叉_物联网设备的网络连接---上篇
  10. 程序流程图生成器 程序源代码生成/转换成流程图 函数调用关系图
  11. Unicode 入门详解(V14.0版本)
  12. 周记0053:0054
  13. 竹子买车商学院,知名汽车人钟志,销售实战培训
  14. Selenium WebDriver 常用API
  15. MIP启发式算法:local branching
  16. 微信红包封面热潮的背后思考
  17. React Native入门——布局实践:开发京东客户端首页(一
  18. 弘辽科技:拼多多改销量是什么意思?
  19. 进制的运算(笔记借鉴编程达人)
  20. WebRTC 源码分析

热门文章

  1. 浙江大学远程教育计算机应用基础,浙江大学远程教育计算机应用基础.pdf
  2. 苹果html阅读器,设置Safari 10.0.2阅读器Reader字体
  3. java 集合操作_Java 集合的操作 个人方法总结
  4. 手机端html5 面试,今日头条 张祖俭 - H5动画在移动平台上的性能优化实践
  5. mac系统和鸿蒙,鸿蒙发力,或将超越苹果系统
  6. google浏览器调试
  7. vue中el-row使用
  8. 2020年Java讲课笔记目录
  9. 初步使用jeesite代码生成器
  10. 使用jedis访问redis