CloudBoot云装机(CloudJ X86)如何从v1.2升级到v1.2.1?

重要提示:
1.在启动服务(service cloudboot start)之前,请一定要先导出V1.2的数据,并停掉老的服务(dhcp/tftp/http/dns/samba/mysql/cloudboot-server)。或者您干脆将V1.2.1安装在另一台设备上(强烈推荐)。
2.请将重要的配置文件或数据先备份一下。
 
 
第一步:进入老Server的命令行,导出V1.2的Mysql数据,拷贝到新Server: 
mysqldump -uroot -p idcos-osinstall > /home/idcos-osinstall.sql



 第二步:下载一键安装包,一分钟完成各种环境部署:
http://idcos.com/store/cloudboot
 
第三步:根据以下手册,完成安装:
http://idcos.github.io/osinstall-doc/environment/%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2.html
 
第四步:进入新Server 的mysql命令行,执行以下SQL,将V1.2的数据迁移到V1.2.1里:
1.指定V1.2.1的Mysql Socket,进入Mysql命令行:
mysql -S /opt/cloudboot/var/lib/mysql/mysql.sock -uroot -p
 
2.执行以下SQL,完成升级:
CREATE DATABASE IF NOT EXISTS `idcos-osinstall` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `idcos-osinstall`;
SET names utf8;
//导入老的数据
source /home/idcos-osinstall.sql;
//迁移到新的数据库中
INSERT INTO `cloudboot`.`devices` SELECT * FROM `idcos-osinstall`.`devices`;
INSERT INTO `cloudboot`.`device_histories` SELECT * FROM `idcos-osinstall`.`device_histories`;
INSERT INTO `cloudboot`.`device_logs` SELECT * FROM `idcos-osinstall`.`device_logs`;
INSERT INTO `cloudboot`.`ips` SELECT * FROM `idcos-osinstall`.`ips`;
INSERT INTO `cloudboot`.`locations` SELECT * FROM `idcos-osinstall`.`locations`;
INSERT INTO `cloudboot`.`macs` SELECT * FROM `idcos-osinstall`.`macs`;
INSERT INTO `cloudboot`.`manage_ips` SELECT * FROM `idcos-osinstall`.`manage_ips`;
INSERT INTO `cloudboot`.`manage_networks` SELECT * FROM `idcos-osinstall`.`manage_networks`;
INSERT INTO `cloudboot`.`manufacturers` SELECT * FROM `idcos-osinstall`.`manufacturers`;
INSERT INTO `cloudboot`.`networks` SELECT * FROM `idcos-osinstall`.`networks`;
INSERT INTO `cloudboot`.`users` SELECT * FROM `idcos-osinstall`.`users`;
INSERT INTO `cloudboot`.`user_access_tokens` SELECT * FROM `idcos-osinstall`.`user_access_tokens`;
INSERT INTO `cloudboot`.`vm_devices` SELECT * FROM `idcos-osinstall`.`vm_devices`;

 

0 个评论

要回复文章请先登录注册