HP-UX:備份與恢復

1.系統備份

# make_recovery -p -A -d /dev/rmt/1mn
# emacs /var/opt/ignite/recovery/arch.include
# make_recovery -r -A -d /dev/rmt/1mn -C

-p  以預覽模式運行該命令。這不會向磁帶寫任何數據,而是創建文件/var/
opt/ignite/recovery/arch.include,由一系列要包含的條目組成

命令結束後,檢查/var/opt/ignite/logs/makrec.log1日誌文件中是否有錯誤和警告。如
果有,必須執行必要的修正操作,然後重新運行第一個命令。

處理完所有警告後,可編輯arch.include 文件進行添加和刪除條目,然後再按繼續模
式(-r)運行make_recovery(注18)。-C選項讓該命令更新make_recovery 過程
最新保存的數據。
在每次系統顯著改變後,都必須重複此過程。可使用check_recovery命令來判斷是
否要運行make_recovery。

儘管這些磁帶不是爲了代替常規備份,但可以從其中獲取單獨的文件。要這麼做,必
須手工把磁帶定位到第二個文件,然後使用tar 提取預期的項目:
# cd /
# mt -t /dev/rmt/1mn fsf 1
# tar xvf /dev/rmt/1m relative-pathname(s)
文件列表應該以相對路徑名來指定(比如,使用etc/hosts,而不是/etc/hosts)。


恢復磁帶上的所有數據
啓動恢復帶:
1. Power up the server
3. Upon seeing the following prompt in the console screen, press any key on the keyboard to interrupt the auto-boot process

….
To discontinue, press any key within 10 seconds.
….

4. You should see the following prompt when the auto-boot process is interrupted

Main Menu: Enter command >
5. Insert the latest system backup tape.
6. You can use command sea to search to bootable media. Note the device type “Sequential access media”, which indicates it is the bootable tape. Then boot from it.

Main Menu: Enter command > sea

Searching for potential boot device(s)
This may take several minutes.

To discontinue search, press any key (termination may not be immediate)

Path# Device Path (dec) Device Path (mnem) Device Type
-------------------------------------------------------------------
P0 0/0/1/0.3 extscsi.3 Sequential access media
P1 x/x/x/x.x extscsi.2 Random access media
P2 x/x/x/x.x intscsia.6 Random access media
……

9.   Type in the boot command:

Main Menu: Enter command > boot p0  

10. The bootstrap of the tape will be loaded into memory until you see the following question

Interact with IPL (Y, N, or Cancel)? >

11. Answer "N" to follow the automatic recovery of the Production Server 

12. The following message will then be display. Press <Return> key to acknowledge the message and continue the recovery process. 

Press Return to continue:

13.  The following message will then be display. Press <Return> key to acknowledge the message and continue the recovery process.

….
[        Install HP-UX  ]
[     Run a Recovery Shell ]
[      Advanced Options ]
….

14.   Use the <Up>, <Down>, or <Tab> keys to navigate and highlight the "Install HP-UX" option, and press <Return> key to select the option. The system will then display the next screen. Use the <Tab> key to navigate and <Space Bar> key to select the following options. Once the options are selected, use <Tab> key to navigate to [OK] and press <Return> to acknowledge ok to proceed.

….
Source Location Options:
….
[*] Media only installation
….
User Interface Options:
….
[*] Advanced Installation (recommended for disk and file system management)
….

15.  The system will then start loading the user configuration interface program. The "/opt/ignite/bin/tool" menu is displayed. Under the "Basic" tab, Make sure the configuration entries of "[Root Disk …]" display the following:

Configurations: [HP-UX System Recovery ->] [Description …]
Environments: [Recovery Archive ->] (HP-UX B.11.00)
[Root Disk …] SEAGATE_ST34573N 
File System: [HP-UX save_config layout ->]
[Root Swap (MB) …] 512 Physical Memory (RAM) = 256MB
[Languages …] English   [Keyboards …]  [Additional …]

……
[hostname…] 
[IP Address …]          Subnet Mask:            .
[Set Time Zone …]      [Network Services…] 
[Set Root Password …]  [Additional Interfaces…] 
…… 

16.  Use <Tab> key to navigate to "[Go !]", and press <Return> key to proceed. Message prompt that disks  and  (or  and)  will be used as root disk. Warning also prompt that the 2 disks seem to have data on it.

17.  Use <Tab> key again to navigate to "[Go !]" and press <Return> key again to confirm the restoration process.

18. The server will continue the recover process and will be rebooted after successfully completed the restore.
unix
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章