Confluence迁移
本次操作系统版本Centos7.3,Confluence版本5.9.9。
一、数据迁移
1、在旧Confluence上打包 “confluence和confluence-data”整个目录,默认安装的话confluence-data在/var/下,confluence在/opt/下。
#自定义安装在/usr/目录下
[root@wiki ~]# ls /usr/atlassian confluence confluence-data [root@wiki ~]# tar zcvf confluence.tar.gz /usr/atlassian #打包数据库数据,我是yum安装的mariadb。默认路径 /var/lib/mysql [root@wiki ~]# ls /var/lib/mysql aria_log.00000001 aria_log_control confluence ibdata1 ib_logfile0 ib_logfile1 mysql mysql.sock pay_center performance_schema test [root@wiki ~]# tar zcvf mysql.tar.gz /var/lib/mysql
2、准备新服务器环境,firewalld.service 和 Selinux关闭。
[root@localhost ~]# useradd confluence1 [root@localhost ~]# useradd confluence [root@localhost ~]# yum install mariadb-server [root@localhost ~]# mv /var/lib/mysql/ /var/lib/mysql.bak
3、上传数据到新服务器,数据量大的话有点慢,可以搭建samba或者rsync推送
[root@localhost ~]# wget "http://10.0.3.82:28080/mysql2018-08-13.tar.gz" [root@localhost ~]# wget "http://10.0.3.82:28080/atlassian2018-08-13.tar.gz"
4、解压数据,启动数据库和Confluence
[root@localhost ~]# tar xf atlassian2018-08-13.tar.gz -C /usr/ [root@localhost ~]# ls /usr/atlassian/ confluence confluence-data [root@localhost ~]# tar xf mysql2018-08-13.tar.gz -C /var/lib/ [root@localhost ~]# ls /var/lib/mysql aria_log.00000001 aria_log_control confluence ibdata1 ib_logfile0 ib_logfile1 mysql pay_center performance_schema test ##启动数据库和Confluence [root@localhost ~]# systemctl start mariadb.service
[root@localhost ~]# /usr/atlassian/confluence/bin/startup.sh If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide Server startup logs are located in /usr/atlassian/confluence/logs/catalina.out Using CATALINA_BASE: /usr/atlassian/confluence Using CATALINA_HOME: /usr/atlassian/confluence Using CATALINA_TMPDIR: /usr/atlassian/confluence/temp Using JRE_HOME: /usr/atlassian/confluence/jre/ Using CLASSPATH: /usr/atlassian/confluence/bin/bootstrap.jar:/usr/atlassian/confluence/bin/tomcat-juli.jar Using CATALINA_PID: /usr/atlassian/confluence/work/catalina.pid Existing PID file found during start. Removing/clearing stale PID file. Tomcat started. [root@localhost ~]#
##关闭Confluence命令
/usr/atlassian/confluence/bin/shutdown.sh
5、启动成功后,浏览器访问测试
[root@localhost ~]# netstat -lntup|grep mysql tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1592/mysqld [root@localhost ~]# netstat -lntup|grep 8090 tcp6 0 0 :::8090 :::* LISTEN 1645/java
使用之前的账号登录即可
二、备份恢复
设置每日备份
上传备份数据到/usr/atlassian/confluence-data/restore
目录中
遇到的问题:
解压报错, 系统时间不对
selinux没有关闭,启动数据库报错。