HP系統備份及恢復方案

linyy37發表於2010-05-19

今天應客戶要求寫了一下HP系統備份及恢復方案

HP系統備份及恢復方案

1 檢查系統是否安裝ignite軟體

# swlist -l bundle |grep -i ignite

IGNITE C.7.4.157 HP-UX Installation Utilities (Ignite-UX)

# whereis make_tape_recovery

make_tape_recovery: /opt/ignite/bin/make_tape_recovery /opt/ignite/share/man/man1m.Z/make_tape_recovery.1m

2 備份

2.1 檢視make_tape_recovery引數

# /opt/ignite/bin/make_tape_recovery -help

Usage: make_tape_recovery [-s iux_server|[-l lanic_id]] [-A]

[-B boot_destination_file] [-I][-a tape_device_file][-p] [-r]

[-t tape_title] [-v] [-i|-ib] [-d description] [-f content_file][-D tape_vol_name]

[-x content-options] [-P s|w|e] [-m tar|cpio|pax] [XToolkit-Options] [-?]

-s iux_server Specifies the server on which configuration files and

archives reside

-A Specifies all files on each selected disk or volume

group that are included

-B boot_dest_file Specifies the temporary location of the LIF volume

-I Cause the system recovery process to be interactive when

booting from the tape

-a tape_device_file Specifies the tape device file

-r Resumes creation of the archive

-p Previews the processing that would take place without

actually creating the archive

-t tape_title Specifies a custom message of the archive tape

-v Specifies verbose output

-i Causes make_tape_recovery to run interactively

-d description Specifies the one line description of the archive

-D tape_vol_name Specifies 6-character ANSI tape volume name. IPF tape only

-f content_file Specifies the location of the file which identifies

keywords to specify inclusions and exclusions for the

archive

-l lanic_id Specifies the lanic id of the system being archived,

used with -s option

-m tar|cpio|pax Specify in which format the files/directories image in

the archive will be stored

-x content_option Specifies the included/excluded disk or volume groups

-n num_cfg_dir Specifies the number of configuration and log file

directories to be saved on the system

-? Display this help screen

2.2 執行系統備份

# /opt/ignite/bin/make_tape_recovery -Av

# /opt/ignite/bin/make_tape_recovery -Av -a /dev/rmt/1mn (提定磁帶裝置)

2.3 檢查備份是否成功

# /opt/ignite/bin/check_tape_recovery

#cat /var/opt/ignite/recovery/latest/recovery.log

3 恢復

3.1 恢復磁帶上的所有資料

3.1.1 非互動式恢復系統

[1] 在磁帶機中,插入系統恢復帶
[2] Boot
系統
[3]
中斷Boot 流程,進入 Boot_admin> 提示下
[4] Boot_admin> bo 8/16.0.0
8/16.0.0: 磁帶機的 hardware path
[5]
選取 " non-interactive "
[6]
等待系統恢復完畢

3.1.2 互動式恢復系統

[1] 在磁帶機中,插入系統恢復帶
[2] Boot
系統
[3]
中斷Boot 流程,進入 Boot_admin> 提示下
[4] Boot_admin> bo 8/16.0.0
8/16.0.0: 磁帶機的 hardware path
[5]
不選取 " non-interactive "
[6]
選取
a. [ Install HP-UX ]
b. [ Advanced Installation ]
c.
配置或改變如下選項:
disks, file systems,
hostname, IP ddress,
timezone, root password,
DNS server, and gateway
[7]
選取 [install continue… ],直到系統恢復完畢

3.2 恢復磁帶上部分檔案

[1] 在磁帶機中,插入系統恢復帶

#mt -t /dev/rmt/0mn fsf 1

#tar -xvf /dev/rmt/0m filename filename為需要恢復的檔名

# tar -xvf /dev/rmt/0m etc/hosts (恢復檔案時,如果需要放在原來的位置,則需要在根目錄執行恢復)

# tar -xvf /dev/rmt/0m u01/app/oracle/oradata (恢復oradata目錄下的所有檔案)

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21282/viewspace-1033737/,如需轉載,請註明出處,否則將追究法律責任。

相關文章