Professional Documents
Culture Documents
ZTE CORPORATION
1 / 30
Revision History
Document No. Version No. R1.0 Drafted /Modified by Liu Lei Review ed by Liu Lei Drafted/Modi fied on 2010-05-10 Reasons for Revision Major Revisions The first draft
2 / 30
Table of Contents
Chapter 1 Overview .................................................................................................................... 4 1.1 Introduction ................................................................................................................................. 4 1.2 Security Information ................................................................................................................... 4 1.3 Introduction to Backup and Recovery ........................................................................................ 4 Chapter 2 OS Backup and Recovery ........................................................................................ 6 2.1 Overview ..................................................................................................................................... 6 2.2 Prerequisites............................................................................................................................... 6 2.3 Operating System Backup.......................................................................................................... 7 2.3.1 OS Operation Flowchart Backup............................................................................................. 7 2.3.2 AIX OS Backup ........................................................................................................................ 8 2.3.3 HP-UNIX OS Backup .............................................................................................................11 2.4 Operating System Recovery .................................................................................................... 13 2.4.1 OS Operation Flowchart Recovery ....................................................................................... 13 2.4.2 AIX Operating System Recovery........................................................................................... 13 2.4.3 HP-UNIX OS Recovery ......................................................................................................... 16 Chapter 3 Platform Application Program Backup and Recovery........................................ 19 3.1 Overview ................................................................................................................................... 19 3.2 Platform Application Program Backup...................................................................................... 19 Chapter 4 Configuration Data Backup and Recovery .......................................................... 24 4.1 Overview ................................................................................................................................... 24 4.2 Database Backup and Recovery.............................................................................................. 24 4.2.1 Database Backup .................................................................................................................. 24 4.2.2 Database Recovery ............................................................................................................... 25 4.3 Service Management Data Backup and Recovery .................................................................. 26 4.3.1 Service Management Data Backup....................................................................................... 26 4.3.2 Service Management Data Recovery ................................................................................... 28
3 / 30
Chapter 1 Overview
1.1 Introduction
This document presents the backup and recovery of operating systems related to intelligent network, backup and recovery of configuration and service files on IN platform and the backup and recovery of database and common service management data. There are four chapters in total. Chapter 1 gives a general introduction to the document. Chapter 2 presents the backup and recovery of IBM AIX and HP-UNIX operating systems. Chapter 3 introduces the backup and recovery of application programs on IN platform. Chapter 4 focuses on the backup and recovery of IN database and common service management data.
1.2
Security Information
Data backup and recovery are not allowed in busy hours, in order to avoid the operation of services in current network. The backup of operating systems should be performed in idle hours at night. For the precautions of backup, please refer to the specific backup procedure.
1.3
4 / 30
1.
It is suggested to back up the operating system every 3 months; backup of operating system should also be performed after key upgrade.
2.
Before service version upgrade in ZXIN10 system, back up ZXIN10 database data, service database and service management data and save them on the secure disk array.
3.
Back up the file data involved before troubleshooting in the current network.
4.
Backup in routine maintenance: generally the database, service management data, IMP configuration data and web configuration data should be backed up.
Note: As the web and IMP data backup is performed in Windows system, just copy the files to other backup media. This part will not be introduced in this document; it is not suggested to save the backup files on the current disk.
5 / 30
2.2
Prerequisites
1. 2. 3. Operating system is normal. The function of tape drive is normal. There is sufficient space on the tape for operating system backup and the tape drive can be used properly.
6 / 30
2.3
2.3.1
Check OS operation
Normal or not
Yes
No
Normal or not
Yes
No
No
Execute OS backup
OS backup succeeds
End
Figure 2.3-1 Operating System Backup Flow
7 / 30
Execute the following command to view the detailed log information. #errpt aj E85C5C4C |more
Note: Execute the command errpt aj E85C5C4C |more to view logs; E85C5C4C is the No. of error logs.
2.
Check CPU and memory utilization. Execute the command to view the operation of system resources as user root; under normal conditions, CPU utilization should be no more than 85% and memory occupancy should be no more than 95%.
8 / 30
# topas
As is shown in Figure 2.3-3Figure 2.3-3 CPU and Memory Occupancy
3.
Check whether the tape drive is normal or not. Insert the tape into tape drive and enter relevant directory of the tape device; execute command vi to create a test.txt file. The operation commands are shown below. # cd /dev/rmt0 # vi test.txt Save it and enter the tape directory to check whether file test.txt exists or not. If yes, the read/write function of tape drive is normal; if not, please replace the tape and try again.
9 / 30
4.
Format the tape. Execute the tape formatting command as user root to format the tape. The operation command is shown below. # tctl f /dev/rmt0 erase
5.
View rootvg size. Execute the command to view rootvg size as user root. The operation command is shown below. # lsvg rootvg
6.
Check the tape size. Take out the tape from tape drive and the tape size is marked on both sides. Compare it with that in step 5.
7. 1)
Back up AIX operating system. Rewind the tape devices. Execute the command to rewind tape as user root. # tctl f /dev/rmt0 rewind
2)
10 / 30
Execute the following command as user root and perform the OS backup via smitty tool. # smitty mksysb Open smitty backup interface, as is shown in Figure 2.3-5.
Enter Backup DEVICE or FILE [/dev/rmt0] and press Enter, backup begins in the system. 3) It takes a long time; wait until OK is displayed on the screen, press the button Eject to take out the tape; the system backup completes.
11 / 30
Execute the following command as user root to view system memory information. # dmesg 2) Check system startup logs. Check whether there are exceptional logs in operation system startup logs as user root. # more /etc/rc.log 3) View the system monitoring logs. Check whether there are exceptional error logs in system monitoring logs as user root. # more /var/adm/syslog/syslog.log 2. 1) Check whether the tape drive runs properly or not. Check whether the read/write function of tape drive is normal or not. Execute the following command as user root to enter relevant directory of tape device; view the content of tape and create a file manually. # cd /dev/rmt/0m # vi test.txt Save the file test.txt and then check whether there are new files under directory /dev/rmt/0m. 2) Check the size of root directory. Execute the following command as user root to check the size of root directory. If the utilization of root directory exceeds 85%, please delete some junk files. # bdf 3) Check the tape size. Take out the tape from tape drive and the tape size is marked on both sides. Compare it with that in step 2. 3. 1) Back up the operating system. Log in the single-user mode.
12 / 30
Execute the following command as user root to restart the operating system and log in the single-user mode. # shutdown 2) -y 0
Full backup of system. Execute the following command as user root; press Enter key and the backup of operating system begins. # fbackup -f /dev/rmt/0m -0iv / -I /tmp/sysbk.index
3)
It will take a long time; system backup completes until Success is displayed on the screen.
2.4
2.4.1
Succeed or not?
No
Yes
OS verification
End
Figure 2.4-1 Operating System Backup Flowchart
2.4.2
13 / 30
To perform rapid OS recovery with the backup file Procedure 1. 1) 2) Preparations before OS recovery Prepare the backup file of operating system. Prepare a set of system installation CD with the same version as the current OS in order for re-installation in case of recovery failure. 2. 1) Perform OS recovery with the backup file. Log in the maintenance mode of operating system. Execute the following command as user root. # shutdown Fr During restart of IBM minicomputer, select Start Maintenance Mode for System Recovery on the interface, as is shown in Figure 2.4-2.
Select 3 according to the interface display. 2) Recover the operating system. Log in the maintenance mode as is shown in Figure 2.4-3. Select 5 and press Enter.
14 / 30
Log in Choose mksysb Device interface and select /dev/rmt0, then insert the tape and press Enter, operating system will be recovered from the tape. 3. 1) Verify the recovered operating system. Check operating system version. Execute the following command as user root to view the operating system version. # oslevel s 2) Check the kernel of operating system. Execute the following command as user root to view the kernel bits of operating system version. # bootinfo K 3) Check file system size. Execute the following command as user root to check the file system size and utilization. Delete the useless file in the file system with the utilization over 85%. As is shown in Figure 2.4-4. # df -g
15 / 30
4)
Check the SWAP size. Execute the following command as user root to check the size of SWAP. Generally, it should be twice as the physical memory. # lsps a
5)
Restart the operating system. Execute the following command as user root to restart the operating system and check whether the restart is normal or not. # shutdown Fr
16 / 30
2)
Recover the operating system. Insert the tape and execute the following command as user root to recover the system. # frecover -rf /dev/rmt/0m Press Enter to begin operating system recovery.
3. 1)
Verify the recovered operating system. Check the operating system version. Execute the following command as user root to view the operating system version. # uname -a
2)
Check the kernel of operating system. Execute the following command as user root to view the kernel of operating system. # swlist|grep -i hpux
3)
Check the file system size. Execute the following command as user root to check the file system utilization in the operating system. Delete the useless files in the system if the utilization exceeds 85%. # bdf
4)
Check the memory occupancy. Execute the following command as user root to check the memory occupancy. # dmesg
5)
Check the CPU utilization. Execute the following command as user root to check the CPU utilization. # top
6)
17 / 30
Execute the following command as user root to restart the operating system and check whether the restart is normal or not. # shutdown
18 / 30
3.1 Platform Application Program Backup 3.2 Platform Application Program Recovery
3.2
19 / 30
2)
View the program operation status. Execute the following command as user zxin10 to view process operation status of service application program. $ zxstat As is shown in Figure 3.2-2.
3)
Full backup. Log in as user zxin10 and create a backup directory. Mmdd is the date of operation. $mkdir mmdd $chmod 777 mmdd $cd mmdd $mkdir service task bin lib etc $cd ../service
20 / 30
$cp * /home/zxin10/mmdd/service $cd ../task $cp * /home/zxin10/mmdd/task $cd ../bin $cp *.ksh /home/zxin10/mmdd/bin $cd ../lib $cp * /home/zxin10/mmdd/lib files $cd ../etc $cp * /home/zxin10/mmdd/etc $crontab list 2. Recover service application program.
Purpose To use full backup file for rapid recovery of services if service program upgrade fails or service program is deleted Procedure 1. Check whether the service process is stopped. Execute command zxstat as user zxin10 to check whether the service process exists or not. If yes, execute command superstop to stop all the service application processes. The operation command is shown below. $zxstat $superstop
As is shown in Figure 3.2-3.
21 / 30
2.
Recover service application program. Replace it with the backup file as user zxin10.
3. 1)
Verify the recovered service program. Check the configuration file. Check whether the configuration files under directory etc are consistent with those in current network as user zxin10.
Note: The encrypted configuration files (*.scr) can be decrypted into *.ini file via zstool2 d Encryption Configuration File to view the content; it can also be viewed directory via zstool2 d Encryption Configuration File.
2)
Start the service process to view the status. Execute the following commands as the user of service application program to start the service application process and view the process status. $ zxmoni $ zxstat
22 / 30
3)
Check the log files. Log in directory /home/zxin10/log/ as user zxin10 to check whether there are records of exceptional logs. $ cd log
4)
Perform relevant service test after the service process is started properly.
23 / 30
4.2
4.2.1
$isql -Usa -P 1>dump database zxdbc_174 to '/sybak/zxdbc_174bakmmdd' 2>go If full database backup cannot be adopted, back it up in BCP mode; the specific methods are shown below. [BCP Backup of Recovery Data] Back up the full database via BCP to recover zxdbc_174. The tool is in the attachment.
24 / 30
2.
System library backup: log in SMP as user sybase via telnet and execute the following commands. $df k ; Check whether there is enough space in the file system
$isql -Usa -P 1>dump database zxinsys to '/sybak/zxinsys_bakmmdd' 2>go 3>dump database zxin to '/sybak/zxin_bakmmdd' 4>go If full database backup cannot be adopted, back it up in BCP mode; for specific methods, please refer to process 1.
25 / 30
2.
System library recovery operations: log in SMP as user sybase and execute the commands: $isql -Usa -P 1>load database zxinsys from /sybak/backup of new SCP data file 2>go 3>online database zxinsys 4>go 1>load database zxin from /sybak/backup of new SCP data file 2>go 3>online database zxin 4>go For the database backed up in BCP mode, please refer to the description of [BCP Backup of Recovery Data] in 4.2.1 1.
4.3
4.3.1
26 / 30
Click OK and the service data configuration will be displayed, as is shown in Figure 4.3-3.
27 / 30
2.
Back up the service data. Click Save and select the path, a dat file will be generated.
3.
Repeat the above operations until the backup of all service data is completed.
3.
Recover the backup data. Click Load in Figure 4.3-4, the interface as is shown in Figure 4.3-5 will pop up.
Click Yes and service management data recovery begins in the system. 4. After the service management data is recovered successfully, the following prompt interface will pop up. As is shown in Figure 4.3-6.
29 / 30
5.
Repeat the above operations to complete the recovery of other service management data.
6.
30 / 30