1
0

mondorescue备份.md 3.1 KB

1、安装mondorescue

1.1、centos7

cd /etc/yum.repos.d
wget ftp://ftp.mondorescue.org/centos/7/x86_64/mondorescue.repo
vim mondorescue.repo
[mondorescue]
name=centos 7 x86_64 - mondorescue Vanilla Packages
baseurl=ftp://ftp.mondorescue.org//centos/7/x86_64
enabled=1
gpgcheck=0 # 1改为0
gpgkey=ftp://ftp.mondorescue.org//centos/7/x86_64/mondorescue.pubkey

yum install mondo -y

1.2、优麒麟

vim /etc/apt/sources.list
#4.0.2桌面版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2-desktop main restricted universe multiverse

#4.0.2-sp1桌面版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp1-desktop main restricted universe multiverse

#4.0.2-sp2桌面版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp2-desktop main restricted universe multiverse

#4.0.2服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2-server main restricted universe multiverse

#4.0.2-sp1服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp1-server main restricted universe multiverse

#4.0.2-sp2服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp2-server main restricted universe multiverse

#4.0.2-sp2 FT2000+服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp2-server-ft2000 main restricted universe multiverse

#4.0.2-sp3版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp3 main restricted universe multiverse

#4.0.2-sp4版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp4 main restricted universe multiverse

#V10版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.0 main restricted universe multiverse

#V10.1版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse


wget ftp://ftp.mondorescue.org/ubuntu/16.04/mondorescue.sources.list
sh -c "cat mondorescue.sources.list >> /etc/apt/sources.list" 
# sh -c "cat mondorescue-test.sources.list >> /etc/apt/sources.list"
apt-get update 
apt-get install mondo 

2、生成iso文件

mondoarchive
  • 选择hard disk

image-20220604220115961

  • 其他的一律选择OK,等待备份完成

image-20220604220217068

  • 进入/var/cache/mondo目录,导出iso文件

3、恢复

  • 选择刚刚的iso文件。默认选择centos7系统

image-20220604223018915

  • 输入nuke选择自动恢复

image-20220604223141370

  • 恢复完成后,重启电脑,直接关机有可能不成功,虚拟机内存至少1G,硬盘至少20G。直接输入exit

image-20220605192912893

  • 如果没有ip,直接重启即可

3、如果安装了docker需要安装时候忽略这个目录

/var/lib/docker/devicemapper/devicemapper/

注意:!!!!!

恢复这个镜像的磁盘空间必须大于原始镜像的磁盘空间!!!!!!!

例如:初始选择40G构建一个镜像,那么恢复镜像就必须选择大于等于40G的硬盘空间