扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
备份的类型
10年积累的成都网站制作、成都网站设计经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先做网站设计后付款的网站建设流程,更有罗平免费网站建设让你可以放心的选择与我们合作。
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). |
备份的工具
SAP HANA studio
HANA studio - 右键SID - Backup and Recovery - Back Up system 备份完整数据库或者打开Open Backup Console选择备份类型
这里的备份文件命名自动生成,如果是同样的备份路径,上一次备份将会被覆盖
SAP HANA cockpit
从studio进入或者打开链接
https://eccqas:4300/sap/hana/admin/cockpit/
http://eccqas:8000/sap/hana/admin/cockpit/
SAP HANA Backup - Create Backup创建一个backup马上备份
或者创建一个schedule周期调度,注意Backup Prefix,调度名字,周期
如果看不到SAP HANA Backup磁贴,那么需要给登录的HANA数据库用户授权
sap.hana.backup.roles::Administrator
如果看不到Create Schedule,那么需要给登录的HANA数据库用户授权
sap.hana.backup.roles::Scheduler
与之相关的操作角色是sap.hana.backup.roles::Operator
注意:调度器默认是不激活的状态,创建调度计划后会提示
Backups cannot be scheduled, because the XS Job Scheduler is not active. For more information, see SAP HANA Administration Guide
则需要到URL激活 enable:http://eccqas:8000/sap/hana/xs/admin/jobs/#
并且需要角色sap.hana.xs.admin.roles::JobSchedulerAdministrator,否则是灰的无法激活
作业管理角色:sap.hana.xs.admin.roles::JobAdministrator
3.Native SQLDBA Cockpit for SAP HANA
过程参考:http://tecadmin.net/backup-sap-hana-database-using-command-line/#
#su - sidadm hdbsql \c -i 00 -n eccqas:30015 -u system -p Bm2015##
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
alter user
grant backup operator to
hdbuserstore set USER4BACKUP localhost:3
note已经有标准shell脚本
#!/bin/sh #/* Backup script */ source $HOME/.bashrc date="$(date +"%Y-%m-%d")" time="$(date +"%Y-%m-%d %H:%M:%S")" backup="backup data using file ('$date')" echo "daily backup :" $time "Start" >> $DIR_INSTANCE/backup.log $DIR_EXECUTABLE/hdbsql -U USER4BACKUP -x $backup time="$(date +"%Y-%m-%d %H:%M:%S")" echo "daily backup :" $time "End" >> $DIR_INSTANCE/backup.log
周日全备,周一至周六增备
#!/bin/sh #/* Complete Backup script_completebackup.sh*/ source $HOME/.bashrc date="$(date +"%Y-%m-%d")" time="$(date +"%Y-%m-%d %H:%M:%S")" backup="backup data using file ('$date.complete')" echo "daily backup :" $time "Start" >> $DIR_INSTANCE/backup.log $DIR_EXECUTABLE/hdbsql -U USER4BACKUP -x $backup time="$(date +"%Y-%m-%d %H:%M:%S")" echo "daily backup :" $time "End" >> $DIR_INSTANCE/backup.log
#!/bin/sh #/* Incremental Backup script_incrementbackup.sh */ source $HOME/.bashrc date="$(date +"%Y-%m-%d")" time="$(date +"%Y-%m-%d %H:%M:%S")" backup="backup data INCREMENTAL using file ('$date')" echo "daily backup :" $time "Start" >> $DIR_INSTANCE/backup.log $DIR_EXECUTABLE/hdbsql -U USER4BACKUP -x $backup time="$(date +"%Y-%m-%d %H:%M:%S")" echo "daily backup :" $time "End" >> $DIR_INSTANCE/backup.log
第三方备份工具将file改成backint
4.通过SAP HANA Cockpit备份HANA数据库
事务码:DBACOCKPIT 或者DB13,
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流