赛门铁克公司的系统备份软件BESR可以很有效的保护操作系统,但是官方对于Linux版本的Support就相对比较少,对于Linux备份还是推荐使用NBU(Net backup)来进行备份。
首先我们要对于测试环境进行介绍
1、Linux服务器一台,操作系统为Redhat Enterprise 5.2,IP地址为192.168.1.101
2、一台Windows的文件共享服务器,操作系统为Server2003,IP地址为192.168.1.100
3、自定义RecoveryDisk一张,更具linux版本不同,后文会详细介绍
网络拓扑图如下
首先我们先配置Linux的IP地址以及挂载Windows文件共享服务器
代码:
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=statec
HWADDR=08:00:27:1B:D8:35
ONBOOT=yes
IPADDR=192.168.1.101
NETWORK=192.168.1.0
NETMASK=255.255.255.0
[root@localhost ~]# service network restart
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:1B:D8:35
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe1b:d835/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3182 (3.1 KiB) TX bytes:14791 (14.4 KiB)
Base address:0xd010 Memory:f0000000-f0020000
确认好地址后需要挂载Windows共享文件夹
代码:
[root@localhost ~]# mkdir /media/share
[root@localhost ~]# mount -t cifs -o username=administrator,password=helloword //192.168.1.100/share /media/
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
//192.168.1.100/share on /media type cifs (rw,mand)
我们已经成功加载了windows共享存储,但是如果我们需要经常备份系统,Windows共享必须在开机时就挂载,所以我们需要修改/etc/init.d/after.local
代码:
[root@localhost ~]# vi /etc/init.d/after.local
mount -t cifs -o username=administrator,password=helloword //192.168.1.100/share /media/
:wq
OK这样我们准备工作就基本完成了
第一步:安装BESR2010 Linux版本
代码:
[root@localhost media]# cp BESR_2010_1.0.1.36352_Linux_Edition.tar.gz ~/Desktop/
[root@localhost media]# cd ~/Desktop/
[root@localhost Desktop]# tar -zxvf BESR_2010_1.0.1.36352_Linux_Edition.tar.gz
Symantec_Backup_Exec_System_Recovery.bin
readme.txt
besrl.pdf
LICENSE
[root@localhost Desktop]# ./Symantec_Backup_Exec_System_Recovery.bin
安装过程就不赘述了
安装失败:
Would you like to install the SRD creation utility? [Y/n]: y
Would you like to install the image mount utility? [Y/n]: y
You must have the squashfs-tools package installed to create an SRD for this platform.
Installing Backup Exec System Recovery 2010 Linux Edition Packages.
Install Failed. Missing Required Dependencies:
mkisofs
这里创建RecoveryDisk光盘需要安装mkisofs工具,可以到Redhat安装光盘内获取
代码:
[root@localhost media]# cd RHEL-5.3\ i386\ DVD/
[root@localhost RHEL-5.3 i386 DVD]# cd /Server
bash: cd: /Server: No such file or directory
[root@localhost RHEL-5.3 i386 DVD]# cd Server/
[root@localhost Server]# find mkiso*
mkisofs-2.01-10.7.el5.i386.rpm
[root@localhost Server]# rpm -i mkisofs-2.01-10.7.el5.i386.rpm
warning: mkisofs-2.01-10.7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
第二步:备份操作系统
在备份系统前我们必须了解Linux目前分区情况
代码:
[root@localhost Desktop]# fdisk -lu
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 63 208844 104391 83 Linux
/dev/sda2 208845 83875364 41833260 8e Linux LVM
OK 一共是两个分区,需要备份两个分区的内容
代码
[root@localhost Desktop]# besr -b /dev/sda1 -d /media/share/boot.v2i
Warning: Application license will expire on Wed Nov 24 22:25:08 2010.
Analyzing the storage management stack
Snapping volumes
Copying volume data
100% [==============================================================] Finished
besr –b 代表备份 –d 代表目的地,也就是我们挂载的Windows共享
第三步:制作BESR 2010 LINUX版恢复光盘(Recovery Disk)
插入Redhat Enterprise 5安装光盘,创建对应本机的恢复光盘
代码:
createSRD --iso=/media/rhel-5.2-server-i386-dvd.iso -t RHEL5 -d /media/share/customSRD.iso
如果系统为Suse则输入
代码:
createSRD --iso=/media/SLES10SP_001/ -a i386 -t SLES10 -d /media/share/customSRD.iso
第四步:还原系统
加载恢复光盘进入恢复系统,首先要修改网卡IP地址、Windows共享(见第一步)
代码
besr –r /dev/sda1 –d /media/share/boot.v2i