AIX5.3下利用光盘制作系统备份
- 格式:doc
- 大小:27.00 KB
- 文档页数:3
AIX的系统备份和恢复备份和恢复是系统管理员经常要做的事情,主要包括rootvg备份和用户数据备份。
1. 操作系统和系统程序的备份将一盘新磁带或无用磁带插入磁带机#tctl -f /dev/rmt0 rewind#smit mksysb在"备份设备或文件"中添入"/dev/rmt0"后回车.系统会运行很长时间, 等到屏幕显示OK后拿出磁带. 这时候, 系统备份完成. 注意: mksysb仅备份rootvg中已安装的文件系统.2. 用户数据备份·常用磁带机选项/dev/rmt0: 若选择/dev/rmt0, 在插入磁带和写完一次磁带时, 磁带机都将磁带反绕到头. 因此, 下一次备份文件将覆盖本次备份./dev/rmt0.1: 若选择/dev/rmt0.1, 则插入磁带和写完一次磁带时, 磁带机均不反绕磁带. 因此, 一盘磁带可以连续备份几个文件或文件系统.·#smit fs选择"备份文件系统"添入要备份的"文件系统名称"添入"/dev/rmt0.1"重复上述操作即可在同一盘磁带上备份多个文件系统.3. rootvg的恢复·启动机器进入维护模式参见安装手册, 当出现"Welcome to Base Operating System Installation and Maint anence"时, 选3 "Start Maintenance Mode for System Recovery"·恢复系统继续选4 "Install from a System Backup"出现"Choose mksysb Device"画面, 选"/dev/rmt0"并插入磁带后回车.这时候, 系统自动恢复操作系统.停在0c54上4. 用户数据恢复#tctl -f /dev/rmt0 rewind#smit fs选择"恢复文件系统"添入"设备名称"和"目标目录"。
AIX备份AIX备份使用 #smit mksysb 备份AIX系统1. 一次完整的备份日志#tail /smit.log[Jul 07 2009, 18:27:59]Command_to_Execute follows below:>> /usr/bin/mksysb '-i' /dev/rmt0Output from Command_to_Execute follows below:---- start ----Creating information file (/image.data) for rootvg. Creating tape boot image......bosboot: Boot image is 37774 512 byte blocks..Creating list of files to back up..Backing up 253800 files..............................24 of 253800 files (0%)..............................34 of 253800 files (0%)..............................954 of 253800 files (0%)..............................1783 of 253800 files (0%)..............................4164 of 253800 files (1%).............................. ...................17451 of 253800 files (6%)..............................19630 of 253800 files (7%)..............................20501 of 253800 files (8%)..............................21455 of 253800 files (8%)..............................41969 of 253800 files (16%)......................cannotaccess ./usr/IBM/WebSphere/PortalServer/log/SystemOut_09.07 .07_16.52.51.log: A file or directory in the path name does not exist.179375 of 253800 files (70%)..............................197964 of 253800 files (78%)..............................239358 of 253800 files (94%)....cannot access ./usr/IBM/WebSphere/AppServer/profiles/AppSrv01/logs /exoa1/SystemOut_09.07.07_17.52.50.log: A file or directory in the path name does not exist...........................243252 of 253800 files (95%)..............................245365 of 253800 files (96%)..............................245365 of 253800 files (96%)..............................252065 of 253800 files (99%).....................0512-003 mksysb may not have been able to archive some files.The messages displayed on the Standard Error contained additionalinformation.bosboot: Boot image is 37774 512 byte blocks.---- end ----[Jul 07 2009, 21:50:29]2. 备份的命令# smit mksysb# /usr/bin/mksysb -i /dev/rmt0不想备份的目录写在 /etc/exclude.rootvgbash-3.2# more /etc/exclude.rootvg (内容如下)/IMIS_SOFT/3. 显示备份内容A. 要列出位于缺省设备 /dev/rmt0 下的系统备份内容,请输入:# lsmksysbB. 显示备份的内容# lsmksysb -f /dev/rmt0.1C. 显示指定目录的内容# lsmksysb -l -f /tmp/mybackupD. 要验证 /dev/rmt0 中的卷组备份磁带的每个头的可读性,请输入:# lsmksysb -V -f /dev/rmt01. 磁带能否重复利用?答:不能,重新备份会覆盖以前的内容。
AIX操作系统备份和在异机上恢复----安徽网通综合结算系统何任重一:操作背景在安徽网通综合结算系统中有使用两台IBM P630做HACMP,由于使用HACMP,两台服务器在结算程序的安装和其它相关软件的安装上要相同,如果不相同那在切换时要太多的人工干预做恢复,所以在其中一台服务器voss1中把所有的程序包括数据库都安装好,测试整个结算系统运行正常后,在另一台服务器voss2中使用voss1的操作系统备份磁带以恢复的方式安装或克隆,这样就可以保证两台服务器在结算系统方面是相同的了。
本文以在这项目中的上述操作为例,介绍AIX使用操作系统备份磁带做恢复或在异机上面做克隆的方法。
二:知识点介绍1:做克隆的两台服务器的型号最好相同,硬件和CPU的64位或32位要相同,内置的磁盘数量要相同,voss2上内置磁盘的容量不能少于voss1上操作系统已经使用的容量。
至于其它硬件的配置,关系不大。
2:克隆前把voss2上面的网线和连存储的连接都断开,以免万一对正在使用的网络和存储造成冲突。
3:克隆后,IP,计算名和AIO都是没有设置的,要手工修改。
其它的操作系统设置也要检查,不要以为克隆就是100%的一摸一样。
4:克隆开始时是会按找磁带中关于rootvg的内容也就是voss1中rootvg的配置重建voss2上的rootvg,是不会保留原来voss2上任何文件的。
三:注意事项1:。
克隆前备份voss2上面要备份的文件。
2:在选择选项和开始做恢复前有时要等很长时间,要耐心等待。
3:在修改文件前必须备份,以备回退或备查。
四:操作步骤1:环境介绍操作系统:AIX 5.3数据库:Oracle 9i中间件:JBOSS3:备份voss1操作系统运行smit>>System Storage Management (Physical & Logical Storage)>> System Backup Manager>>Back Up the System>>Back Up This System to Tape/File,或运行smit mksysb:按F4:选择对应的磁带机:确定后按回车,开始做voss1的操作系统备份。
AIX 操作系统的备份
(适用于没有4mm和8mm磁带机的主机)
前言
操作系统的备份对于客户是很重要的,但客户往往回忽略这部分需求的重要性,有时候主机没有配置4mm或8mm内置(外置)磁带机,客户无法对系统进行备份;亦或客户购买了专用的备份软件,可以备份操作系统,但客户需要熟练的掌握备份软件的使用和主机的相应配置方法。
我们编写这个文档,为用户提供DVD的系统备份方法和详细的步骤,方便客户的使用。
它的有点是在系统崩溃的时候可以快速的使用备份DVD恢复系统,成本低廉。
AIX操作系统备份的具体步骤:
1.检查rootvg
# lsvg –l rootvg 列示系统rootvg中的所有逻辑卷
2.检查文件系统的mount状态
# mount
检查rootvg中需要备份的文件系统是否已经mount上了,如果没有mount上,备份的时候是不会对它备份的,这点需要特别注意。
# lsfs
列示系统中的所有文件系统。
3.关闭应用程序
4.开始做系统备份
图1、vi /etc/security/limis fsize的值改成-1,保存退出;执行Shutdown –Fr。
图2、执行smitty mkdvd,选择No。
图3、DVD备份文件格式使用ISO。
的文件系统。
录机刻录成盘即可。
如果再次做mkdvd的备份,最好把/mkcd/cd_images文件系统删除。
然
后再次执行smitty mkdvd,系统会自动根据备份的大小重新生成新的文件系统,如果容量大,系统会生成有序号的images文件。
用光盘备份来恢复系统目录系统资源需求 (1)光盘备份 (1)2.1 smitty 工具备份 (1)2.2 创建cd_image成功日志 (3)2.3 mkcd 命令备份 (4)更改文件名 (4)FTP文件到刻录服务器 (5)刻录光盘 (5)六、恢复系统 (5)一、系统资源需求根据备份系统大小的不同,需要一定量的(在4G以上)文件系统空间,可以不在rootvg上。
如果未指定存放备份的文件路径,则会自动创建mkcd目录,下含三个目录,挂载不同的三个rootvg 下的LV。
所以总体仍需要足量的文件系统空间。
最好带有刻录的的DVD光驱,没有任何光驱设备也是可以完成的。
但实际上有DVD光驱是最好的。
本文档是针对DVD光驱。
此文档是在AIX 5.3上实验所得。
二、光盘备份2.1 用smitty工具#smitty mkdvdUse an existing mksysb image? xx Move cursor to desired item and press Enter. x 1yes -- 如果首先通过smitty mksysb已经创建了image,则选它2 no --通过mkdvd来创建image,此次选NODVD由于有两种格式,一种是ISO9660 一种是UDF格式。
此次选ISO9660DVD-R or DVD-RAM Device [由于不带刻录,所以此处为空,否则会失败,使用命令方式则必须指定,但需要技巧处理]mksysb creation options:Create map files? YES +Exclude files? no + Disable software packing of backup? no + Backup extended attributes? yes +File system to store mksysb image [/sysimag](If blank, the file system 建议指定,否则会自动建立存放目录will be created for you.)File system to store DVD file structure [/sysimag](If blank, the file system 建议指定,否则会自动建立存放目录will be created for you.)File system to store final DVD images [/sysimag] / (If blank, the file system 建议指定,否则会自动建立存放目录will be created for you.)If file systems are being created:Volume Group for created file systems [rootvg] +Advanced Customization Options:Do you want the DVD to be bootable? yes 表示可以引导系统,选NO,则需要操作系统光碟引导,再进行恢复。
网络备份网络Sysback是基于TSM API 来备份AIX 操作系统的,在备份之前要对TSM Server 和TSM Client 之间进行配置。
网络备份需要额外增加TSM软件,同时配置也较复杂,因此本次搬迁不推荐使用此方法进行备份。
磁带备份AIX mksysb命令将操作系统在线备份到磁带中(即root 卷组)。
如果系统破坏,可以使用磁带来重新安装系统到它的原始状态。
备份步骤:1.将磁带放入外置或内置的磁带机中。
2.mksysb -i /dev/rmt0恢复步骤:1.将磁带放入磁带机中。
2.开机进入SMS菜单中设置从磁带启动。
3.磁带启动后选择从磁带安装操作系统。
光盘备份使用AIX 提供的mkcd可在线备份操作系统(rootvg)成image映像文件,再将image映像文件刻录成DVD光盘用于恢复操作系统。
备份步骤:1.挂接3个存放备份映像的文件系统。
/mkcd/cd_images ; /mkcd/cd_fs和/mkcd/cd_images2.运行命令mkcd–R -S3.将备份后的image映像文件用bin模式传到windowns PC上。
4.使用刻录软件将image映像文件恢复到DVD盘上。
恢复步骤:1.将光盘放入光驱中。
2.开机进入SMS菜单中设置从光驱启动。
3.启动后选择从光驱安装操作系统。
/usr/sbin/mkcd -M '/test/image' -C '/test/cd/str' -I '/test/cd' –V 'rootvg' '-R' '-S'I l1 ISO9660 (CD format)/usr/sbin/mkcd -L -M '/test/image' -C '/test/str' -I '/test/dvd' -V'rootvg' '-R' '-S'不要用2 UDF (Universal Disk Format)/usr/sbin/mkcd -U -M '/test/image' -V 'rootvg'排除文件–emkcd -M /mkcd/image -C /mkcd/cd/str -I /mkcd/cd -V rootvg -R -S -e &mkcd-L -M /mkcd/image -C /mkcd/cd/str -I /mkcd/cd -V rootvg -R -S -e &tail -f /var/adm/ras/mkcd.logmkcd 命令用途从mksysb或savevg备份映像创建一个(或多个)多卷的 CD。
AIX5.3下利用光盘制作系统备份
用光盘制作系统备份,除了提高恢复速度外,还可以保存任意时刻的备份,可以将映像文件保存到PC 机上,即使刻录好的光盘在紧要关头不可用了,也可以随时找出需要的系统备份,再刻录一张。
制作步骤:
1、建立mksysb image文件
2、用mkcd制作光盘引导映像文件
3、刻录映像文件
1、建立mksysb image文件
# smit mksysb
Back Up the System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
WARNING: Execution of the mksysb command will
result in the loss of all material
previously stored on the selected
output medium. This command backs
up only rootvg volume group.
* Backup DEVICE or FILE [/home/bobo/170-20081114] +
Create MAP files? yes +
EXCLUDE files? no +
List files as they are backed up? no +
Verify readability if tape device? no +
Generate new /image.data file? yes +
EXPAND /tmp if needed? no +
Disable software packing of backup? no +
Number of BLOCKS to write in a single output [] #
(Leave blank to use a system default)
2、用mkcd制作光盘引导映像文件
# smit mkcd
Use an existing mksysb image?
Move cursor to desired item and press Enter.
1 yes ---选择yes
2 no
进入操作菜单:
因为我想做个镜像文件,我的170上没有刻录机,所以CD-R Device不用添写。
直接把mksysb image
文件路径写上就可以了。
Back Up This System to CD
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
CD-R Device [] +
* Location of existing mksysb image [/home/bobo/170-20081114] / File system to store CD file structure [] /
(If blank, the file system
will be created for you.)
File system to store final CD images [] /
(If blank, the file system
will be created for you.)
If file systems are being created:
Volume Group for created file systems [rootvg] +
Advanced Customization Options:
Do you want the CD to be bootable? yes +
Remove final images after creating CD? yes +
Create the CD now? no +
Install bundle file [] /
File with list of packages to copy to CD [] /
Location of packages to copy to CD [] +/
Customization script [] /
User supplied bosinst.data file [] /
Debug output? no +
User supplied image.data file [] /
COMMAND STATUS
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
[TOP]
Initializing mkcd log: /var/adm/ras/mkcd.log...
Verifying command parameters...
Creating temporary file system: /mkcd/cd_fs...
Populating the CD or DVD file system...
0512-323 mkcd: The following files are required for the
creation of the CD or DVD image and are not available on the source system: .....................省略
The files can be installed from the listed filesets.
0512-321 mkcd: Error populating the CD or DVD file system
using the /usr/lpp/bosinst/cdfs.optional.list proto file.
0512-328 mkcd: The CD or DVD may not be able to boot some systems.
Copying backup to the CD or DVD file system...
Building chrp boot image...
Creating temporary file system: /mkcd/cd_images...
Creating Rock Ridge format image: /mkcd/cd_images/cd_image_467044.vol1 Running mkisofs ...
mkrr_fs was successful.
Making the CD or DVD image bootable...
Copying the remainder of the backup to the CD or DVD file system...
Creating Rock Ridge format image: /mkcd/cd_images/cd_image_467044.vol2 Running mkisofs ...
mkrr_fs was successful.
Removing temporary file system: /mkcd/cd_fs...
执行完后,产生/mkcd/cd_images文件系统,其中包括两个映像文件。
# cd /mkcd/cd_images
# ls -l
total 2559000
-rw-r--r-- 1 root sys 677922816 Jan 13 10:28 cd_image_507936.vol1 -rw-r--r-- 1 root sys 632276992 Jan 13 10:28 cd_image_507936.vol2 drwxrwx--- 2 root system 512 Jan 13 10:28 lost+found
3、刻录映像文件
将第二步操作生成的两个映像文件ftp到有刻录机的机器上,可以是任何操作系统的机器,[b][color=#0000ff]以刻录映像文件的方式刻录到光盘上。
[/color][/b]
下面试刻录好的第一张光盘
# mount /cdrom
# cd cdrom 66594847
# ls –l
total 28
-r--r--r-- 1 root system 25 Jan 12 19:59 OSLEVEL
dr-xr-xr-x 3 root system 2048 Jan 12 19:59 RPMS
dr-xr-xr-x 3 root system 2048 Jan 12 19:59 ismp
-r--r--r-- 1 root system 60 Jan 12 19:59 mkcd.data
dr-xr-xr-x 3 root system 2048 Jan 12 19:59 sbin
dr-xr-xr-x 3 root system 2048 Jan 12 19:59 udi
dr-xr-xr-x 5 root system 2048 Jan 12 19:59 usr
[b]本文来自ChinaUnix博客,如果查看原文请点:
[/b][url]/u1/54041/showart_1414536.html[/url]
页: [1]。