SAP HANA数据库备份方式与工具

  • A+
所属分类:数据分析

原文:http://blog.51cto.com/jenvid/1875760

备份的类型

Option Description
Complete Data Backup A data backup includes all the data structures that are required to recover the database.
Differential Data Backup Differential backups store all the data changed since the last full data backup.
Incremental Data Backup An incremental backup stores the data changed since the last full data backup or the last

delta backup (incremental or differential).

备份的工具

  1. SAP HANA studio

    HANA studio - 右键SID - Backup and Recovery - Back Up system 备份完整数据库或者打开Open Backup Console选择备份类型

    这里的备份文件命名自动生成,如果是同样的备份路径,上一次备份将会被覆盖

  2. SAP HANA cockpit

    从studio进入或者打开链接

    https://eccqas:4300/sap/hana/admin/cockpit/

    http://eccqas:8000/sap/hana/admin/cockpit/

    SAP HANA Backup - Create Backup创建一个backup马上备份

    SAP HANA数据库备份方式与工具

    或者创建一个schedule周期调度,注意Backup Prefix,调度名字,周期

    SAP HANA数据库备份方式与工具

如果看不到SAP HANA Backup磁贴,那么需要给登录的HANA数据库用户授权

sap.hana.backup.roles::Administrator

如果看不到Create Schedule,那么需要给登录的HANA数据库用户授权

sap.hana.backup.roles::Scheduler

与之相关的操作角色是sap.hana.backup.roles::Operator

         SAP HANA数据库备份方式与工具

注意:调度器默认是不激活的状态,创建调度计划后会提示

Backups cannot be scheduled, because the XS Job Scheduler is not active. For more information, see SAP HANA Administration Guide

SAP HANA数据库备份方式与工具

则需要到URL激活 enable:http://eccqas:8000/sap/hana/xs/admin/jobs/#

并且需要角色sap.hana.xs.admin.roles::JobSchedulerAdministrator,否则是灰的无法激活

作业管理角色:sap.hana.xs.admin.roles::JobAdministrator

SAP HANA数据库备份方式与工具

3.Native SQLDBA Cockpit for SAP HANA

过程参考:http://tecadmin.net/backup-sap-hana-database-using-command-line/#

help:
hdbsql=> \h

\? or \h[elp] show help on internal slash commands
\q[uit] quit HDBSQL
\c[onnect] -i
-n [:]
-d
-u
-p
-U
connecting to the database
\di[sconnect] disconnecting from the database

help.sap.com:https://help.sap.com/saphelp_hanaplatform/helpdata/en/75/a06c444e9a4b3287a46a6a40b4ee69/content.htm

可以在系统下用crontab
complete 全备:hdbsql -U USER4BACKUP "backup data using file (\'complete_backup_prefix\')"
incremental增备:hdbsql -U USER4BACKUP "backup data INCREMENTAL using file (\'incremental_backup_prefix\')"
differential差备:hdbsql -U USER4BACKUP "backup data DIFFERENTIAL using file (\'differential_backup_prefix\')"
异步最后加上ASYNCHRONOUS

1950261 - SAP HANA Database Backup Policy Recommendations and Regular Backup Script
create user password "";
alter user DISABLE PASSWORD LIFETIME;
grant backup operator to ;
hdbuserstore set USER4BACKUP localhost:315

 

note已经有标准shell脚本

周日全备,周一至周六增备

第三方备份工具将file改成backint

4.通过SAP HANA Cockpit备份HANA数据库
事务码:DBACOCKPIT 或者DB13。

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: