Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5604566
  • 博文数量: 745
  • 博客积分: 10075
  • 博客等级: 上将
  • 技术积分: 7716
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-29 12:09
文章分类

全部博文(745)

文章存档

2019年(1)

2016年(1)

2010年(31)

2009年(88)

2008年(129)

2007年(155)

2006年(197)

2005年(143)

分类:

2007-06-21 12:09:03

准备知识(摘自《HP-UX 系统和网络管理I》:
frecover对于恢复一些文件和目录已经足够了。然而,如果root盘坏了,系统将无法启动,它不可能再启动内核,更别说恢复文件和目录了。
make_recovery就是为这种情况设计的。make_recovery可以创建一个能自启的磁带镜像,包括在root卷集中有选择的关键的文件和目录。
如果root卷集中的任何磁盘坏了,管理员可以用恢复磁带恢复一个最小的系统,从恢复磁带启动将:
1,在root盘重建启动区
2,在vg00里的磁盘上重建逻辑卷和文件系统
3,恢复已选择的关键文件和目录到root盘
由make_recovery恢复的关键文件使得运行frecover成为可能,frecover从最近的磁带备份来恢复其他文件和目录。
 
充要条件:
1,确保安装了Ignite-UX
make_recovery是Ignite-UX的一个部分,在HP-UX的标准安装中没有捆绑,需要用户自定义安装。安装完毕之后,可以通过命令“swlist”查看是否存在:
Ignite-UX-11-11       C.6.1.44       HP-UX Installation Utilities for Installing 11.11 Systems
2,确保磁带机和主机连接且状态良好
通过命令“# ioscan -fnCtape”查看磁带机状态:
# ioscan -fnCtape
Class     I  H/W Path     Driver S/W State   H/W Type     Description
=====================================================================
tape      0  0/0/1/0.0.0  stape CLAIMED     DEVICE       HP      C5683A
                         /dev/rmt/0m            /dev/rmt/c0t0d0BESTn
                         /dev/rmt/0mb           /dev/rmt/c0t0d0BESTnb
                         /dev/rmt/0mn           /dev/rmt/c0t0d0DDS  
                         /dev/rmt/0mnb          /dev/rmt/c0t0d0DDSb 
                         /dev/rmt/c0t0d0BEST    /dev/rmt/c0t0d0DDSn 
                         /dev/rmt/c0t0d0BESTb   /dev/rmt/c0t0d0DDSnb
3,放入磁带,通过“tar”命令测试磁带机是否可用
# tar -cvf /dev/rmt/0m myfile
 
执行命令make_tape_recovery -A测试是否能对系统进行备份(注:在HPUX11i系统中,make_recovery命令无法实现,取而代之的是make_tape_recovery命令),以下是整个备份过程:
# make_tape_recovery -A
* Creating local directories for configuration files and archive.
=======  06/21/07 12:49:32 MDT  Started make_tape_recovery. (Thu Jun 21
         12:49:32 MDT 2007)
         @(#) Ignite-UX Revision C.6.1.44
         @(#) net_recovery (opt) $Revision: 10.672 $
       * Testing for necessary pax patch.
       * Passed pax tests.
       * Checking Versions of Ignite-UX filesets
       * Creating System Configuration.
       * /opt/ignite/bin/save_config -f
         /var/opt/ignite/recovery/2007-06-21,12:49/system_cfg vg00
       * Backing Up Volume Group /dev/vg00
       * /usr/sbin/vgcfgbackup /dev/vg00
       * Creating Map Files for Volume Group /dev/vg00
       * /usr/sbin/vgexport -p -m /etc/lvmconf/vg00.mapfile /dev/vg00
       * Creating Control Configuration.
       * Creating Archive File List
       * Creating Archive Configuration
       * /opt/ignite/bin/make_arch_config -c
         /var/opt/ignite/recovery/2007-06-21,12:49/archive_cfg -g
         /var/opt/ignite/recovery/2007-06-21,12:49/flist -n 2007-06-21,12:49 -r
         64 -d Recovery\ Archive -t -i 1 -m t
       * Saving the information about archive to
         /var/opt/ignite/recovery/previews
       * Creating The Tape Archive
Adding /opt/ignite/Version file to LIF.
48213+0 records in
48213+0 records out
       * /opt/ignite/data/scripts/make_sys_image -c n -d /dev/rmt/0mn -t n -s
         local -n 2007-06-21,12:49 -m t -w
         /var/opt/ignite/recovery/2007-06-21,12:49/recovery.log -u -R -g
         /var/opt/ignite/recovery/2007-06-21,12:49/flist -a 3730140
        
       * Preparing to create a system archive.
       * Archiving contents of 4000new via tar image to local device/dev/rmt/0mn.
       * Creation of system archive complete.
NOTE:    The following files are in the list of files that were on the
         system, but they are no longer present.  These files are not
         included in the backup:
       /var/opt/dce/rpc/local/01775
       /var/opt/dce/rpc/local/01775/srvr_socks
       /var/tmp/ign_configure/make_sys_image.log
NOTE: Could not read the /etc/resolv.conf file.
=======  06/21/07 13:04:50 MDT  make_tape_recovery completed successfully!
阅读(5744) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~