当前位置:文档之家› HP系统备份及恢复方案

HP系统备份及恢复方案

HP系统备份及恢复方案1 检查系统是否安装ignite软件# swlist -l bundle |grep -i igniteIGNITE C.7.4.157 HP-UX Installation Utilities (Ignite-UX)# whereis make_tape_recoverymake_tape_recovery: /opt/ignite/bin/make_tape_recovery/opt/ignite/share/man/man1m.Z/make_tape_recovery.1m2 备份2.1 查看make_tape_recovery参数# /opt/ignite/bin/make_tape_recovery -helpUsage: 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][-Dtape_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 volumegroup 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 withoutactually 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 thearchive-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 screen2.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.log3 恢复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目录下的所有文件)lvreduce -k -m 0 /dev/vg00/lvol6 1lvsync /dev/vg00/lvol3lvreduce –m 0 /dev/vg00/lvol3vgscanvgcfgrestore| | | | | | | | | | | | > > > 正文搜索[原创] HP-UX COMMAN D 作者: 发表于:2005-12-09 15:54:18【】【】【】【】# ioscan –fnkC disk# swinstall –s /cdrom/(filename) <安装软件补丁从cdrom下>;# swremove <卸除应用程序>;# shutdown 0 <进入单用户模式>;# init 3 <进入多用户>;# umount /opt <卸除opt>;<umount /opt 时报错,不能umount opt,可以用ps –ef |grep opt 命令查看opt进程然后用kill –9 5988 >; -9 强行关掉命令,5988 进程名# swlist –l fileset –a state|grep PHKL_18543 <查找PHKL_18543这个补丁是否安装>;# lvextend –L 30 /dev/vg00/lvol5 <扩大逻辑卷为30兆>;# extendfs /dev/vg00/rlvol5 <r 一定要加这个字母>;# mount /opt# mount –a <全部设备mount>;# bdf <查看容量是否扩大>;# lvextend –L 200 /dev/vg00/lvol6 <在线将tmp文件系统扩展到800Mb>;# fsadm –b 819200 /tmp# bdf# tsm <启动多进程,用ctrl_t切换窗口或按F1、F2来切换>;# make_tape_recovery –Av <备份系统到磁带上、备份到磁带上的系统文件看不到。

用这个命令之前必须安装Ignite-ux这个软件>;# chmod 777 或444 <该文件执行属性,777 改为可执行文件同时放开权限,444 收回权限同时改为不可执行文件>;# mstm <查看机器信息>;# armdsp –i <查看V A信息>;# cvui <设置V A命令>;< /opt/sanmgr/hostagent/sbin (先进入这个目录)/HA_trigger 先stop 后start/dial_trigger stop start磁盘柜进程全部先stop 后starl,否则找不到V A>;# armmgr –s shut / start 别名<V A关机和重起>;V A控制器第一步:# cd /opt/sanmgr/commandview/server/data# mv DeviceDBfile DeviceDBfile.old第二步:# cd /opt/sanmgr/hostagent/sbin# ./HA_trigger stop# ./dial_trigger stop# ./HA_trigger start# ./dial_trigger start# armdiscover# armdiscover <查找阵列柜>;# amdsp -a fc <查看FC60状态,disk状态要显示Optimal,显示Replaced要注意>; # amdsp -d fc|grep "Disk State" <查看FC60硬盘状态>;# pa pri 1/0/0/2/0.6.0 <改动启动路径(主)>;# pa alt 1/0/0/2/0.6.0 <改动启动路径(副)>;# lvlnboot –v <查看启动路径>;# setboot –s on/off <设置机器是否自动启动>;# setboot –b on/off# mediainit /dev/rdsk/cxtydz <对一个磁盘进行格式化和校验其完整性>;# swapinfo <查看机器的一些信息>;# dmesg <查看MEMORY>;# top <查看CPU>;# swlist <查看安装了那些软件>;# vgdisplay –v <查看FreePE(硬盘剩余大小)>;# grep –i error syslog.log <快速查看syslong.log内的错误>;# egrep –i “war|err|fail|scsi|lan” /dev/adm/syslog/syslog.log# ioscan –kfnCtape <查看磁带机>;# lanscan <查看网卡>;# ioscan –kfnCfc <查看光纤卡>;# ioscan –fnH0/0/1/0 <查看0/0/1/0地址信息>;# netstat –in# ifconfig lan*# info_col.11 <收集机器信息,做安装报告用>;# info_col.1026 <收集10.26版本信息>;# dd if=/dev/rdsk/cxtydo of=/dev/rdsk/cxtydo bs=1024k <整盘copy,if后面是旧盘,of后面是新盘>; # dd if=/dev/dsk/cxtydo of=/dev/dsk/cxtydo bs=1024k# sar –d <查看硬盘使用频率>;添加磁带机:第一种方法:# tsm# sam# peripheral devices &#61664; Tape drives <在Actions项选择Add>;第二种方法:在kernel内修改stape 改成In <在Actions &#61664; Add drives to kernel>;加机械臂驱动(可以在kernel改):schgr -&#61664; inspt --&#61664; inspt0 -&#61664; inSetup 网卡IP:# cd /etc/rc.config.d# vi netconfshift:1,$ s/old/new/g <把所有Old replace New>;# tar rv 文件名<copy文件到磁带上>;# tar xv 文件名<从磁带copy到本机上>;# tar cv <删除磁带上的所有内容>;# tar tv <查看磁带上的内容>;# tar tvf /dev/rmt/1m <指定1m磁带机文件名>;# tar rvf /dev/rmt/1m tmp <copy tmp目录到1m磁带机上>;# mt offl <磁带退出>;# bdf –v <查看逻辑卷的使用情况、空间大小>;# fuser –ck /cdrom <清除cdrom中所有进程,否则光驱不会开门>;# ioscan# insf –e <生成设备文件名、加载设备驱动文件名>;# insf –evCdisk <查看设备是否有变化,恢复设备驱动号>;# vgscan –a <如果/etc/lvmtab的文件不正常、或丢失,可用这个命令来重新生成lvmtab,但是做之前一定要备份lvmtab>;配置MODEM# ctrl_b <进入GSP状态、配置MODEM >;# ca <配置MODEM>;# er <激活MODEM>;# GSP >;XD>;R <Reset GSP>;# ctrl_b# GSP>;lc <修改LAN console IP>;安装Ignite (B5725AA):Make_recovery 不能备份,可以修改设置:# vi /opt/ignite/bin/make_medialif 到502行(shift_Enter)修改:lifinit $ipl_options –v72000000 –d24 为lifinit $ipl_options –v102000000 –d24设置或调整V A:先用Console连接V A进行调整&Setup,或用15针窜口线连接电脑。

相关主题