公司的生产环境某些应用的数据库是部署在VMWare平台上的,为了节约成本,领导现考虑将所有数据迁移至居于KVM的CAS平台。以前作的是V2V迁移,可是效率不高,综合了一下时间成本及其余因素,最终选择采用备份与还原的方式进行迁移。源库中有GeekDevOps_gsms、GeekDevOps_list、GeekDevOps_ams等三个属于用户gsms的库。数据库
2.1备份主机环境centos
[root@GeekDevOps-DB1 ~]# hostnamectl Static hostname: GeekDevOps-DB1 Icon name: computer-vm Chassis: vm Machine ID: 18bc5992f24f495b84d8c231d63207ee Boot ID: f8f49625ca5748b8a1cdb9d64d6a547e Virtualization: vmware Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-327.el7.x86_64 Architecture: x86-64
2.2还原主机环境spa
[root@GeekDevOps-DB2 ~]# hostnamectl Static hostname: GeekDevOps-DB2 Icon name: computer-vm Chassis: vm Machine ID: a4dbec2c1e1a496290d8f982bb758597 Boot ID: 79abbf46968c475fabb1757b08c214aa Virtualization: kvm Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-327.el7.x86_64 Architecture: x86-64
3.1中止数据库服务,杀死相关进程。code