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 …]          Sub net 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
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值