HANA S4 1709 数据库安装和备份恢复测试

虚拟机准备

CPU 24 核心 内存:128G 硬盘 600G

操作系统:100G 安装suse 企业版 sp2

数据盘:500G 挂载到 /hana 目录下

 

esxi添加磁盘

HANA S4 1709 数据库安装和备份恢复测试

磁盘分区

 

#fdisk /dev/sdb

N P ENTER ENTER W

 

saptest:~ # fdisk /dev/sdb

 

欢迎使用 fdisk (util-linux 2.28)。

更改将停留在内存中,直到您决定将更改写入磁盘。

使用写入命令前请三思。

 

设备不包含可识别的分区表。

Created a new DOS disklabel with disk identifier 0x74563068.

 

命令(输入 m 获取帮助):

 

 

命令(输入 m 获取帮助):n

分区类型

p 主分区 (0个主分区,0个扩展分区,4空闲)

e 扩展分区 (逻辑分区容器)

选择 (默认 p):p

分区号 (1-4, default 1):

第一个扇区 (2048-1048575999, default 2048):

上个扇区,+sectors 或 +size{K,M,G,T,P} (2048-1048575999, default 1048575999):

 

创建了一个新分区 1,类型为"Linux",大小为 500 GiB。

 

命令(输入 m 获取帮助):w

分区表已调整。

将调用 ioctl() 来重新读分区表。

正在同步磁盘。

 

 

格式化分区并挂载

创建挂载点 /hana

#mkdir /hana

 

saptest:~ # mkfs.xfs /dev/sdb1

saptest:~ # blkid /dev/sdb1

/dev/sdb1: UUID="95d8fe6e-d5c4-4c20-8ac7-0e153a905219" TYPE="xfs" PARTUUID="74563068-01"

编辑 /etc/fstab

UUID=95d8fe6e-d5c4-4c20-8ac7-0e153a905219 /hana xfs defaults 0 0

测试挂载:

#mount –a

#df –h

 

saptest:~ # df -h |grep /hana

/dev/sdb1 500G 33M 500G 1% /hana

 

安装数据:

拷贝数据库安装文件:

源主机执行

# scp -r HDB_SERVER_LINUX_X86_64 192.168.2.229:/hana/

 

数据库主机:

saptest:/hana/HDB_SERVER_LINUX_X86_64 # ./hdbinst

 

saptest:/hana/HDB_SERVER_LINUX_X86_64 # ./hdbinst

SAP HANA Database installation kit detected.

 

######################################################################

Warning: Direct usage of hdbinst is not supported. Use hdblcm instead.

######################################################################

 

 

 

SAP HANA Lifecycle Management - Database Installation 2.00.020.00.1500920972

****************************************************************************

 

 

 

Enter Local Host Name [saptest]:

Enter Installation Path [/hana/shared]:

Enter SAP HANA System ID: H4T

Enter Instance Number [00]:

Enter Worker Group [default]:

 

Index | System Usage | Description

-------------------------------------------------------------------------------

1 | production | System is used in a production environment

2 | test | System is used for testing, not production

3 | development | System is used for development, not production

4 | custom | System usage is neither production, test nor development

 

Select System Usage / Enter Index [4]: 2

Enter System Administrator (h4tadm) Password:

Confirm System Administrator (h4tadm) Password:

Enter System Administrator Home Directory [/usr/sap/H4T/home]:

Enter System Administrator User ID [1001]:

Enter System Administrator Login Shell [/bin/sh]:

Enter ID of User Group (sapsys) [79]:

Enter Location of Data Volumes [/hana/shared/H4T/global/hdb/data]:

Enter Location of Log Volumes [/hana/shared/H4T/global/hdb/log]:

Restrict maximum memory allocation? [n]:

Enter System Database User (SYSTEM) Password:

Confirm System Database User (SYSTEM) Password:

Restart system after machine reboot? [n]:

 

Summary before execution:

Installation Path: /hana/shared

SAP HANA System ID: H4T

Instance Number: 00

Database Isolation: low

System Usage: test

System Administrator Home Directory: /usr/sap/H4T/home

System Administrator Login Shell: /bin/sh

System Administrator User ID: 1001

ID of User Group (sapsys): 79

Location of Data Volumes: /hana/shared/H4T/global/hdb/data

Location of Log Volumes: /hana/shared/H4T/global/hdb/log

Local Host Name: saptest

Worker Group: default

 

Do you want to continue? (y/n): y

 

安装过程输出信息:

Do you want to continue? (y/n): y

Checking installation...

Preparing package 'Saphostagent Setup'...

Preparing package 'Python Support'...

Preparing package 'Python Runtime'...

Preparing package 'Product Manifest'...

Preparing package 'Binaries'...

Preparing package 'Data Quality'...

Preparing package 'Krb5 Runtime'...

Preparing package 'Installer'...

Preparing package 'Ini Files'...

Preparing package 'HWCCT'...

Preparing package 'Documentation'...

Preparing package 'Delivery Units'...

Preparing package 'Offline Cockpit'...

Preparing package 'DAT Languages (EN, DE)'...

Preparing package 'DAT Languages (other)'...

Preparing package 'DAT Configfiles (EN, DE)'...

Preparing package 'DAT Configfiles (other)'...

Creating System...

Extracting software...

Installing package 'Saphostagent Setup'...

Installing package 'Python Support'...

Installing package 'Python Runtime'...

Installing package 'Product Manifest'...

Installing package 'Binaries'...

Installing package 'Data Quality'...

Installing package 'Krb5 Runtime'...

Installing package 'Installer'...

Installing package 'Ini Files'...

Installing package 'HWCCT'...

Installing package 'Documentation'...

Installing package 'Delivery Units'...

Installing package 'Offline Cockpit'...

Installing package 'DAT Languages (EN, DE)'...

Installing package 'DAT Languages (other)'...

Installing package 'DAT Configfiles (EN, DE)'...

Installing package 'DAT Configfiles (other)'...

Creating instance...

hdbnsutil: creating persistence ...

hdbnsutil: writing initial topology...

hdbnsutil: writing initial license: status check = 2

Starting SAP HANA Database system...

Starting 4 processes on host 'saptest' (worker):

Starting on 'saptest': hdbcompileserver, hdbdaemon, hdbnameserver, hdbpreprocessor

Starting 7 processes on host 'saptest' (worker):

Starting on 'saptest': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine

Starting on 'saptest': hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine

Starting on 'saptest': hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine

Starting on 'saptest': hdbdaemon, hdbwebdispatcher, hdbxsengine

Starting on 'saptest': hdbdaemon, hdbwebdispatcher

All server processes started on host 'saptest' (worker).

Importing delivery units...

Importing delivery unit HCO_INA_SERVICE

Importing delivery unit HANA_DT_BASE

Importing delivery unit HANA_IDE_CORE

Importing delivery unit HANA_TA_CONFIG

Importing delivery unit HANA_UI_INTEGRATION_SVC

Importing delivery unit HANA_UI_INTEGRATION_CONTENT

Importing delivery unit HANA_XS_BASE

Importing delivery unit HANA_XS_DBUTILS

Importing delivery unit HANA_XS_EDITOR

Importing delivery unit HANA_XS_IDE

Importing delivery unit HANA_XS_LM

Importing delivery unit HDC_ADMIN

Importing delivery unit HDC_BACKUP

Importing delivery unit HDC_IDE_CORE

Importing delivery unit HDC_SEC_CP

Importing delivery unit HDC_SYS_ADMIN

Importing delivery unit HDC_XS_BASE

Importing delivery unit HDC_XS_LM

Importing delivery unit SAPUI5_1

Importing delivery unit SAP_WATT

Importing delivery unit HANA_SEC_CP

Importing delivery unit HANA_BACKUP

Importing delivery unit HANA_HDBLCM

Importing delivery unit HANA_SEC_BASE

Importing delivery unit HANA_SYS_ADMIN

Importing delivery unit HANA_ADMIN

Importing delivery unit HANA_WKLD_ANLZ

Installation done

Log file written to '/var/tmp/hdb_H4T_install_2019-08-28_09.47.00/hdbinst.log' on host 'saptest'.

安装完成。

HANA Studio

SYSTEM

Rzwd2009

HANA S4 1709 数据库安装和备份恢复测试

HANA S4 1709 数据库安装和备份恢复测试

HANA S4 1709 数据库安装和备份恢复测试

 

DB 数据恢复

拷贝备份文件:

 

sapdev:/usr/sap/H4D/HDB02/backup/data/DB_H4D # ll

total 96092332

-rw-r----- 1 h4dadm sapsys 155648 Aug 21 20:00 2019-08-21_20-00_databackup_0_1

-rw-r----- 1 h4dadm sapsys 83894272 Aug 21 20:01 2019-08-21_20-00_databackup_2_1

-rw-r----- 1 h4dadm sapsys 98314493952 Aug 21 20:08 2019-08-21_20-00_databackup_3_1

sapdev:/usr/sap/H4D/HDB02/backup/data/DB_H4D # scp * 192.168.2.229:/hana/dbbak

 

拷贝完成后修改文件的属主属组

saptest:/hana/dbbak # cat /etc/passwd

h4tadm:x:1001:79:SAP HANA Database System Administrator:/usr/sap/H4T/home:/bin/sh

 

saptest:/hana/dbbak # chown h4tadm:sapsys *

saptest:/hana/dbbak # ll

总用量 96092332

-rw-r----- 1 h4tadm sapsys 155648 8月 28 10:08 2019-08-21_20-00_databackup_0_1

-rw-r----- 1 h4tadm sapsys 83894272 8月 28 10:08 2019-08-21_20-00_databackup_2_1

-rw-r----- 1 h4tadm sapsys 98314493952 8月 28 10:26 2019-08-21_20-00_databackup_3_1

 

创建恢复任务

HANA S4 1709 数据库安装和备份恢复测试HANA S4 1709 数据库安装和备份恢复测试

 

HANA S4 1709 数据库安装和备份恢复测试

 

截取文件名

HANA S4 1709 数据库安装和备份恢复测试

 

HANA S4 1709 数据库安装和备份恢复测试

HANA S4 1709 数据库安装和备份恢复测试

HANA S4 1709 数据库安装和备份恢复测试

数据库开始恢复

HANA S4 1709 数据库安装和备份恢复测试

 

 

HANA S4 1709 数据库安装和备份恢复测试

还要耐心等待10-20几分钟,具体看服务器配置。

 

HANA S4 1709 数据库安装和备份恢复测试

 

华为云测试:

安装爱数客户端

创建目录:

#mkdir /ABClient

sapdev:/ABClient # scp -r AnyBackupClient 192.168.2.229:/ABClient

# cd /ABClient/AnyBackupClient/app/bin

执行安装脚本

# ./install.sh

 

1012 2019-08-02 14:18:04 mkdir ABClient

1013 2019-08-02 14:18:08 cd /ABClient/

1014 2019-08-02 14:18:09 ls

1015 2019-08-02 14:22:00 wget https://49.4.54.13:9801/download/AnyBackupClient_Redhat_5_x64.tar.gz

1016 2019-08-02 14:33:24 ls

1017 2019-08-02 14:33:30 tar -zxvf AnyBackupClient_Redhat_5_x64.tar.gz

1018 2019-08-02 14:33:39 ls

1019 2019-08-02 14:33:43 cd AnyBackupClient/

1020 2019-08-02 14:33:43 ls

1021 2019-08-02 14:33:46 cd app

1022 2019-08-02 14:33:46 ls

1023 2019-08-02 14:33:49 cd bin

1024 2019-08-02 14:33:49 ls

1025 2019-08-02 14:34:14 ./install.sh

管理命令:

systemctl status AnyBackupClient

systemctl restart AnyBackupClient

systemctl start AnyBackupClient

 

从备份服务器恢复选择

HANA S4 1709 数据库安装和备份恢复测试

HANA S4 1709 数据库安装和备份恢复测试

 

查看任务进度,选择节点查看任务进度

HANA S4 1709 数据库安装和备份恢复测试

HANA S4 1709 数据库安装和备份恢复测试

恢复完成

HANA S4 1709 数据库安装和备份恢复测试

上一篇:一段在C4C里触发S4HANA outbound Delivery的ABSL代码


下一篇:【MM】计划交货成本(Delivery Costs)