CPU 24 核心 內存:128G 硬盤 600G linux
操做系統:100G 安裝suse 企業版 sp2 web
數據盤:500G 掛載到 /hana 目錄下 數據庫
esxi添加磁盤 服務器
#fdisk /dev/sdb app
N P ENTER ENTER W ide
saptest:~ # fdisk /dev/sdb 測試
歡迎使用 fdisk (util-linux 2.28)。 spa
更改將停留在內存中,直到您決定將更改寫入磁盤。 操作系統
使用寫入命令前請三思。 rest
設備不包含可識別的分區表。
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'.
安裝完成。
SYSTEM
Rzwd2009
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
截取文件名
數據庫開始恢復
還要耐心等待10-20幾分鐘,具體看服務器配置。
建立目錄:
#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
從備份服務器恢復選擇
查看任務進度,選擇節點查看任務進度
恢復完成