19
2024
01
12:22:40

VeeamBackup&Replication11备份恢复系统综合实验



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

Veeam卫盟是什么?Veeam在 Gartner 2021年“企业备份与恢复软件解决方案”魔力象限,同时也是Veeam 第五次入选领导者象限,实力和地位毋庸置疑。

Veeam的官网为 https://www.veeam.com/cn/

Veeam与其他备份软件的对比 https://www.veeam.com/cn/backup-software-comparison-for-small-business.html



https://www.bilibili.com/read/cv17300583/


勒索软件猖獗,备份非常重要


实验目标:

1、windows平台+linux存储库架构部署

2、虚拟机备份还原

3、物理机完全崩溃还原

4、应用感知、数据库备份还原

5、SAP数据库插件安装


实验环境:

windows2022+Alma8搭建备份系统

vSphere7下进行windows2016虚拟机备份还原

Centos7系统进行rm -rf /*,模拟系统完全崩溃,物理机恢复

windows2016系统安装sqlserver2014进行数据库感知、备份、还原

centos7安装SAP备份插件


一、windows2022+Alma8搭建备份系统

从官网下载Veeam Backup & Replication 11 其中免费社区版提供10个工作负载,而企业版购买后授权50个起步,本次实验使用社区免费版搭建

https://www.veeam.com/cn/downloads.html

windows2022配置为 8cpu 16Gram 200G硬盘

Alma8配置为 8cpu 16Gram 200G系统盘+1T存储盘


1、安装windows平台软件,Veeam安全包包含所需的全部组件,按提示下一步直至安装完成



2、部署Alma8存储库

查看当前磁盘信息,1T的硬盘是我们的目标


[root@alma8 ~]# fdisk -lDisk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: A2B91132-AE20-4646-8C52-9DACFD8A31AF Device       Start       End   Sectors   Size Type /dev/sda1     2048   1230847   1228800   600M EFI System /dev/sda2  1230848   3327999   2097152     1G Linux filesystem /dev/sda3  3328000 419428351 416100352 198.4G Linux LVM Disk /dev/sdb: 1 TiB, 1099511627776 bytes, 2147483648 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes


创建分区


[root@alma8 ~]# fdisk /dev/sdbWelcome to fdisk (util-linux 2.32.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0xf70aaad4. Command (m for help): n Partition type   p   primary (0 primary, 0 extended, 4 free)   e   extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): First sector (2048-2147483647, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-2147483647, default 2147483647): Created a new partition 1 of type 'Linux' and of size 1024 GiB. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.


查看创建后的分区


[root@alma8 ~]# fdisk -l /dev/sdbDisk /dev/sdb: 1 TiB, 1099511627776 bytes, 2147483648 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xf70aaad4 Device     Boot Start        End    Sectors  Size Id Type /dev/sdb1        2048 2147483647 2147481600 1024G 83 Linux


创建文件系统


[root@alma8 ~]# mkfs.xfs -b size=4096 -m reflink=1,crc=1 /dev/sdb1meta-data=/dev/sdb1              isize=512    agcount=4, agsize=67108800 blks         =                       sectsz=512   attr=2, projid32bit=1         =                       crc=1        finobt=1, sparse=1, rmapbt=0         =                       reflink=1 data     =                       bsize=4096   blocks=268435200, imaxpct=25         =                       sunit=0      swidth=0 blks naming   =version 2              bsize=4096   ascii-ci=0, ftype=1 log      =internal log           bsize=4096   blocks=131071, version=2         =                       sectsz=512   sunit=0 blks, lazy-count=1 realtime =none                   extsz=4096   blocks=0, rtextents=0 Discarding blocks...Done.


创建挂载目录,挂载,设置开机启动挂载,重启确认挂载是否正常


[root@alma8 ~]# mkdir /mnt/veeamRepo[root@alma8 ~]# mount /dev/sdb1 /mnt/veeamRepo/[root@alma8 ~]# df -hT /dev/sdb1Filesystem     Type  Size  Used Avail Use% Mounted on /dev/sdb1      xfs   1.0T  7.2G 1017G   1% /mnt/veeamRepo[root@alma8 ~]# blkid  /dev/sdb1/dev/sdb1: UUID="b805dd02-9105-4ddc-ad64-1004e01d10cb" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="f70aaad4-01"[root@alma8 ~]# vi /etc/fstabUUID=b805dd02-9105-4ddc-ad64-1004e01d10cb  /mnt/veeamRepo xfs defaults 0 0


添加Veeam专属用户,为目标目录配置权限


[root@alma8 ~]# useradd -d /home/VeeamRepo -m VeeamRepo[root@alma8 ~]# passwd VeeamRepoChanging password for user VeeamRepo. New password: Retype new password: passwd: all authentication tokens updated successfully.[root@alma8 ~]# chown VeeamRepo:VeeamRepo /mnt/veeamRepo/[root@alma8 ~]# chmod 700 /mnt/veeamRepo/[root@alma8 ~]# ls -l /mnt/total 0 drwx------. 2 VeeamRepo VeeamRepo 6 Jun 24 19:44 veeamRepo


为VeeamRepo用户配置sudo权限,此权限是为了安装veeam存储库软件,后面安装完会取消


[root@alma8 ~]# visudo## Allow root to run any commands anywhereroot    ALL=(ALL)       ALL VeeamRepo       ALL=(ALL)       ALL


3、在veeam平台添加Backup Repository存储库


存储库系统类型linux


存储库命名



添加服务器


目标IP



目标用户名密码




保存ssh指纹




点击Populate可查看分区情况



选择保存位置、开启XFS fast cloning、开启7天内防删除


添加完成



4、关闭linux sudo用户


[root@alma8 ~]# visudo## Allow root to run any commands anywhereroot    ALL=(ALL)       ALL#VeeamRepo      ALL=(ALL)       ALL


查看linux上veeam进程信息


[root@alma8 ~]# ps aux | grep veeamVeeamRe+    8874  0.0  0.1 1348496 19640 ?       Ssl  20:01   0:00 /opt/veeam/transport/veeamtransport --run-service root        8878  0.0  0.0 100212  7168 ?        Sl   20:01   0:00 /opt/veeam/transport/veeamtransport --run-environmentsvc 7:6 root        8880  0.1  0.0 167304  4600 ?        Sl   20:01   0:00 /opt/veeam/transport/veeamimmureposvc --subprocess --log /var/log/VeeamBackup --stdio 9:7 root        9657  0.0  0.0 221928  1152 pts/0    S+   20:10   0:00 grep --color=auto veeam


备份系统配置完成

添加linux存储库后,可将windows上默认的存储库删除


二、vSphere7下进行windows2016虚拟机备份还原

1、接入vCenter,按提示下一步即可


添加完成


2、创建备份计划



配置定时执行策略


我这里仅执行一次


备份中


备份完成可查看备份报告


3、快速恢复

veeam快速恢复功能,可以在通过挂载备份库的方式直接拉起虚拟机,快速恢复业务


可以选择要恢复的时间点,默认为最后一次备份


覆盖原虚拟机还是新建虚拟机


如果原虚拟机还在线,那么快速恢复的虚拟机不要同时连接网络,防止IP冲突


虚拟机已经快速上线


此时我们可以在veeam选择将所有文件迁移到虚拟化,或者关闭这个虚拟机


三、物理机Centos7系统进行rm -rf /*模拟系统完全崩溃备份还原


对物理机centos7系统进行完全备份,此时需要添加物理机备份组和策略




对系统执行破坏操作,重启后无法进入系统

rm -rf /*



恢复方案一:将备份挂载到虚拟化快速恢复业务


挂载到虚拟机后需要重新配置网络



恢复方案二:通过恢复镜像对物理机进行完全恢复

物理机制作 veeam-recovery-media-5.0.2.4567_x86_64.iso 启动盘并启动



同意协议


设置网络



选择卷还原,链接到veeam平台



选择还原点




还原中





还原完成,移除启动盘,此时业务已经完全恢复



四、windows2016系统安装sqlserver2014进行数据库感知备份还原


添加2016系统,并开启应用感知,接入虚拟化和物理机都可以

如果系统管理员也是数据库管理员,那么只需要配置系统管理员账号密码;如果系统管理员不是数据库管理员,那么还需要单独配置sa用户


立即进行备份


模拟黑客攻击,删除3个数据库


通过veeam进行sql数据库单独恢复,需要开放数据库1433端口


快速挂载成功


五、centos7安装SAP备份agent(仅安装插件)

进行SAP备份时需要将存储库的访问设置为管理员访问


上传、安装、配置SAP插件


[root@hfish ~]# yum localinstall VeeamPluginforSAPHANA-11.0.1.1261-1.x86_64.rpm已加载插件:fastestmirror 正在检查 VeeamPluginforSAPHANA-11.0.1.1261-1.x86_64.rpm: VeeamPluginforSAPHANA-11.0.1.1261-1.x86_64 VeeamPluginforSAPHANA-11.0.1.1261-1.x86_64.rpm:不更新已安装的软件包。 无须任何处理[root@hfish ~]# SapBackintConfigTool --wizardEnter backup server name or IP address: 172.16.21.130 Enter backup server port number [10006]: Enter username: administrator Enter password for administrator: Available backup repositories: 1. Backup Repository linux Enter repository number: 1 Configuration result:


完毕 作者:王忘杰 https://www.bilibili.com/read/cv17300583/ 出处:bilibili


本文链接:https://hqyman.cn/post/4857.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: