备份本地磁盘所有数据到磁带
默认状态下,无须指明文件系统设备号,此时则为 "/dev/rmt/0m" 。但该设备中没有磁带介质或需要应用其他设备时需加参数 "-d" 并指明设备号。
# make_tape_recovery -Av
输出结果:
* Creating local directories for configuration files and archive.
======= 11/28/06 14:40:15 EAT Started make_tape_recovery. (Tue Nov 28
14:40:15 EAT 2006)
@(#) Ignite-UX Revision B.5.4.50
@(#) net_recovery (opt) $Revision: 10.637 $
* Testing pax for needed patch
* Passed pax tests.
* Recovery Archive Description = Recovery Archive
* Recovery Archive Location = /dev/rmt/0mn
* Number of Archives to Save = 2
* Pax type = tar
In? dsk/vg name minor# Associated disks/mountpoints
2 v /dev/vg00 0x00 /dev/dsk/c2t1d0 /dev/dsk/c2t0d0
/dev/vg00/lvol1 /stand 2
/dev/vg00/lvol2
/dev/vg00/lvol3 / 2
/dev/vg00/lvol4 /tmp 2
/dev/vg00/lvol5 /home 2
/dev/vg00/lvol6 /opt 2
/dev/vg00/lvol7 /usr 2
/dev/vg00/lvol8 /var 2
/dev/vg00/lv_oracle /oracle 2
/dev/vg00/lv_orainstall /orainstall 2
0 v /dev/vgdata1 0x02 /dev/dsk/c16t0d1
/dev/vgdata1/lv_data1 /oradata1 0
0 v /dev/vgdata2 0x03 /dev/dsk/c16t0d2
/dev/vgdata2/lv_data2 /oradata2 0
0 v /dev/vgdata3 0x04 /dev/dsk/c16t0d3
/dev/vgdata3/lv_data3 /oradata3 0
-1 v /dev/vglock 0x01 /dev/dsk/c16t0d0
* Checking Versions of Ignite-UX filesets
* Creating System Configuration.
* /opt/ignite/bin/save_config -f
/var/opt/ignite/recovery/2006-11-28,14:40/system_cfg vg00
* Backing Up Volume Group /dev/vg00
* /usr/sbin/vgcfgbackup /dev/vg00
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
* Creating Map Files for Volume Group /dev/vg00
* /usr/sbin/vgexport -p -m /etc/lvmconf/vg00.mapfile /dev/vg00
vgexport: Volume group "/dev/vg00" is still active.
* Backing Up Volume Group /dev/vgdata1
* /usr/sbin/vgcfgbackup /dev/vgdata1
Volume Group configuration for /dev/vgdata1 has been saved in /etc/lvmconf/vgdata1.conf
* Creating Map Files for Volume Group /dev/vgdata1
* /usr/sbin/vgexport -p -m /etc/lvmconf/vgdata1.mapfile /dev/vgdata1
vgexport: Volume group "/dev/vgdata1" is still active.
* Backing Up Volume Group /dev/vgdata2
* /usr/sbin/vgcfgbackup /dev/vgdata2
Volume Group configuration for /dev/vgdata2 has been saved in /etc/lvmconf/vgdata2.conf
* Creating Map Files for Volume Group /dev/vgdata2
* /usr/sbin/vgexport -p -m /etc/lvmconf/vgdata2.mapfile /dev/vgdata2
vgexport: Volume group "/dev/vgdata2" is still active.
* Backing Up Volume Group /dev/vgdata3
* /usr/sbin/vgcfgbackup /dev/vgdata3
Volume Group configuration for /dev/vgdata3 has been saved in /etc/lvmconf/vgdata3.conf
* Creating Map Files for Volume Group /dev/vgdata3
* /usr/sbin/vgexport -p -m /etc/lvmconf/vgdata3.mapfile /dev/vgdata3
vgexport: Volume group "/dev/vgdata3" is still active.
* Creating Control Configuration.
* Creating Archive File List
* Creating Archive Configuration
* /opt/ignite/bin/make_arch_config -c
/var/opt/ignite/recovery/2006-11-28,14:40/archive_cfg -g
/var/opt/ignite/recovery/2006-11-28,14:40/flist -n 2006-11-28,14:40 -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
* Checking configuration file for Syntax
Adding /opt/ignite/Version file to LIF.
* Writing boot LIF to tape
85619+0 records in
85619+0 records out
* Complete writing boot LIF onto tape.
* /opt/ignite/data/scripts/make_sys_image -c n -d /dev/rmt/0mn -t n -s
local -n 2006-11-28,14:40 -m t -w
/var/opt/ignite/recovery/2006-11-28,14:40/recovery.log -u -R -g
/var/opt/ignite/recovery/2006-11-28,14:40/flist -a 13975320
* Preparing to create a system archive
* Archiving contents of xine2 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 back-up:
/var/tmp/ign_configure/make_sys_image.log
NOTE: Could not read the /etc/resolv.conf file.
======= 11/28/06 15:41:27 EAT make_tape_recovery completed successfully!
指定磁带机并将其中磁带倒回初始状态
当执行备份操作遇到出现错误,或断网而导致执行过程中断时,常规方法为重新执行备份。此前需要将磁带倒回初始状态,当执行备份操作没有特别指明文件系统设备号时,则均为 "/dev/rmt/0m" 。
# mt -f /dev/rmt/0m rew
输出结果:
此时无输出,当操作执行完毕后,将出现提示符 "#" 。
查询磁带机设备号
当对设备信息了解不充分时,可以通过ioscan查询并获取磁带机文件系统设备号。与此同时,需要对设备物理连接具有印象级了解,因为有些情况下单凭ioscan也是无法彻底分析的。
默认状态中,在HP9000主机磁带设备均为 "/dev/rmt/0m" 。
# ioscan -fnC tape
输出结果:
Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
tape 2 0/2/1/0/4/0.97.25.255.1.3.1 stape CLAIMED DEVICE HP
Ultrium 2-SCSI
/dev/rmt/2m /dev/rmt/c10t3d1BEST
/dev/rmt/2mb /dev/rmt/c10t3d1BESTb
/dev/rmt/2mn /dev/rmt/c10t3d1BESTn
/dev/rmt/2mnb /dev/rmt/c10t3d1BESTnb
tape 4 0/2/1/0/4/0.97.25.255.1.3.2 stape CLAIMED DEVICE HP
Ultrium 2-SCSI
/dev/rmt/4m /dev/rmt/c10t3d2BEST
/dev/rmt/4mb /dev/rmt/c10t3d2BESTb
/dev/rmt/4mn /dev/rmt/c10t3d2BESTn
/dev/rmt/4mnb /dev/rmt/c10t3d2BESTnb
tape 1 0/3/1/0/4/0.97.26.255.1.3.0 stape CLAIMED DEVICE HP
Ultrium 2-SCSI
/dev/rmt/1m /dev/rmt/c11t3d0BEST
/dev/rmt/1mb /dev/rmt/c11t3d0BESTb
/dev/rmt/1mn /dev/rmt/c11t3d0BESTn
/dev/rmt/1mnb /dev/rmt/c11t3d0BESTnb
tape 3 0/3/1/0/4/0.97.26.255.1.3.1 stape CLAIMED DEVICE HP
Ultrium 2-SCSI
/dev/rmt/3m /dev/rmt/c11t3d1BEST
/dev/rmt/3mb /dev/rmt/c11t3d1BESTb
/dev/rmt/3mn /dev/rmt/c11t3d1BESTn
/dev/rmt/3mnb /dev/rmt/c11t3d1BESTnb
tape 0 0/4/1/0.4.0 stape CLAIMED DEVICE HP C5683A
/dev/rmt/0m /dev/rmt/c4t4d0BESTn
/dev/rmt/0mb /dev/rmt/c4t4d0BESTnb
/dev/rmt/0mn /dev/rmt/c4t4d0DDS
/dev/rmt/0mnb /dev/rmt/c4t4d0DDSb
/dev/rmt/c4t4d0BEST /dev/rmt/c4t4d0DDSn
/dev/rmt/c4t4d0BESTb /dev/rmt/c4t4d0DDSnb