SAP HANA Backup Guide (for A2040d RHEL) 23 rd of January 2017 NEC SAP Global Competence Center
1. Introduction 1.1. Purpose This manual describes how to create an initial backup after finishing the installation of SAP HANA. 1.2. Scope SAP HANA single node appliance OS is RHEL 7 1.3. Reference documents SAP HANA Technical Operations Manual (TOM) SAP HANA Database Administration Guide The above documents are available from the following site, be sure to check http://help.sap.com/hana_appliance 2. Planning 2.1. SAP HANA data allocation This chapter describes the disk and filesystem layout. Use the commands lsblk and blkid to get details about existing block devices and their usage. All data except swap, /var/crash and /backup in the following tables will be included with the backup. 2.2. Appliances with 3 internal HDDs (up to 1TB) Internal JBOD HDDs RAID Size LD LD Size FS mount point FS size Device ext3 /boot 1 GB sda2 2 x 300GB vfat /boot/efi 1 GB sda1 1 279 GB LD#1 279 GB (+ 1 spare) ext3 / 267 GB lv_root swap swap 10 GB lv_swap LD#1~12 3.120 GB xfs /hana/data 3.120 GB lv_data LD#13~24 1.044 GB xfs /hana/log 1.044 GB lv_log xfs /hana/shared 1.024 GB lv_shared 24 x 600GB 1 12 x 558GB LD#25~3 xfs /backup 50 GB lv_backup 2.532 GB 6 xfs /var/crash 1.024 GB lv_dump (free) 434 GB 2.3. Appliances with 8 internal HDDs (up to 2TB) Internal HDDs RAID Size LD LD Size FS mount point FS size Device ext3 /boot 1 GB sda2 vfat /boot/efi 1 GB sda1 2 x 900GB 1 838GB LD#1 838 GB ext3 / 776 GB lv_root swap swap 10 GB lv_swap xfs /backup 50 GB lv_backup JBOD 6 x 900GB 24 x 600GB 5(5+P ) 1 4190GB 12 x 558GB LD#2 1.024 GB xfs /hana/log 1.024 GB lv_log LD#3 2.048 GB xfs /hana/shared 2.048 GB lv_shared LD#4 1,118 GB xfs /var/crash 1.118 GB lv_dump xfs /hana/data 6.144 GB lv_data LD#1~1212 x 558GB (free) 552 GB 2 NEC Corporation 2017
2.4. Appliances with 8 internal HDDs (up to 4TB) Internal HDDs RAID Size LD LD Size FS mount point FS size Device ext3 /boot 1 GB sda2 vfat /boot/efi 1 GB sda1 2 x 1.2TB 1 1,117 GB LD#1 ext3 / 955 GB lv_root 1.117 GB swap swap 10 GB lv_swap xfs /backup 150 GB lv_backup 6 x 1.2TB JBOD 24 x 1.2TB LD#2 1.024 GB xfs /hana/log 1.024 GB lv_log 5(5+P) 5,585 GB LD#3 4.096 GB xfs /hana/shared 4.096 GB lv_shared (free) 465 GB LD#1~12 12x1,024 GB xfs /hana/data 12.288 GB lv_data 1 12x1,117GB LD#13~24 12x93 GB xfs /var/crash 1,116 GB lv_dump 2.5. Backup procedure overview The backup procedure exists of the following 3 phases: Boot up to the rescue mode. Backup each volume with the tar command. Reboot server and start SAP HANA. 3. Backup procedure In this chapter a procedure to obtain an initial backup of the environment is shown. This procedure should be run after the initial installation of SAP HANA has completed. 3.1. Boot to rescue mode Insert the RHEL 7 Installation Media and boot from DVD. As soon as the system starts from the DVD the boot menu is displayed. Select the Troubleshooting option here: 3 NEC Corporation 2017
On the next screen select rescue system: Select option 2) to proceed to the rescue system: After a short while the system will display the following message: 4 NEC Corporation 2017
Press <return> to enter the system, then check mounts underneath /mnt/sysimage by executing the following command df Verify all mount points to be included in the backup as shown in the filesystem layout in chapter 2 are available underneath /mnt/sysimage. 3.2. Backup In this chapter you will create a backup of every partition. All commands are valid for all appliance sizes. 1 Mount backup partition in writeable mode mount o remount,rw /mnt/sysimage/backup 2 Run the following command in the directory /mnt/sysimage/boot/efi to get a backup of the uefi boot partition: cd /mnt/sysimage/boot/efi tar cz sp. > /mnt/sysimage/backup/hana-bootefi.tgz 3 Run the following command in the directory /mnt/sysimage/boot to get a backup of the boot partition: cd /mnt/sysimage/boot tar cz sp --one-file-system. > /mnt/sysimage/backup/hana-boot.tgz 4 Run the following command in the directory /mnt/sysimage to get a backup of the OS partition: cd /mnt/sysimage tar cz sp --one-file-system. > /mnt/sysimage/backup/hana-root.tgz 5 Run the following command in the directory /mnt/sysimage/hana/data to get a backup of the HANA data partition: cd /mnt/sysimage/hana/data tar cz sp. > /mnt/sysimage/backup/hana-data.tgz 6 Run the following command in the directory /mnt/sysimage/hana/shared to get a backup of the HANA shared partition: cd /mnt/sysimage/hana/shared tar cz sp. > /mnt/sysimage/backup/hana-shared.tgz 5 NEC Corporation 2017
7 Run the following command in the directory /mnt/sysimage/hana/log to get a backup of the HANA log partition: cd /mnt/sysimage/hana/log tar cz sp. > /mnt/sysimage/backup/hana-log.tgz 8 Verify that 6 backup files exist in the backup partition and have a reasonable size: cd /mnt/sysimage/backup ls lh 3.3. Reboot and HANA startup After the backup finished restart your NEC HANA appliance and start HANA 1 Reboot your server by typing shutdown r now 2 Remove the DVD media before the system boot starts. 3 Login to the OS, open a terminal and and enter the following commands to start HANA: su - <sid>adm HDB start 4 Run this command and check its output says OK and all listed processes have the status Green. If some are still Initializing, wait a while and issue the same command again: sapcontrol nr <instance no> -function GetProcessList 6 NEC Corporation 2017