一、Jira版本升级方案
JIRA的数据迁移升级方案最好的应该就是使用自带的备份还原功能。但JIRA6.3.6版本和JIRA7版本应该是在数据结构方面有较大的改动,不能直接使用JIRA6.3.6的备份导出zip文件还原恢复到JIRA7的版本。
所以版本升级的思路为:jira6.3.6 ==> jira6.4.14 ==> jira7.0.11 ==> jira7.13.0
备份回滚方案:
1. JIRA Software备份导出的XML压缩文件;
2. 附件目录下的所有文件;
3. 数据库数据备份文件;
具体操作:
1.在管理员页面 备份数据
2.将该文件下备份:/usr/local/jira/atlassian-jira/WEB-INF/classes/avatars,/data/jira/data/attachments
3.备份数据库:
mysqldump -uroot -p jira > /tmp/backupjira.sql
升级方案
1.备份JIRA数据,导出zip文件,将/usr/local/jira/atlassian-jira/WEB-INF/classes/avatars,/data/jira/data/attachments打包备份
2.将版本升级至6.4.14
[root@centos6 tmp]# wget http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.4.14-x64.bin //下载安装包
[root@jira tools]# sh atlassian-jira-6.4.14-x64.bin
o
3
/usr/local/jira
y
enter
enter
Finishing installation ...
升级成功
重启服务
查看控制面板的项目
此时无破解
3.将JIRA6.4.14升级到JIRA7.0.11
[root@jira tools]# wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-7.0.11-x64.bin //下载安装包
4.升级至JIRA7.13.0,并破解
[root@jira tools]# wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-7.13.0-x64.bin
[root@jira tools]# sh atlassian-jira-software-7.13.0-x64.bin重启服务
在网页界面报错:
问题一:
更改数据库排序规则
对于5.6的mysql版本
ALTER DATABASE jira CHARACTER SET utf8 COLLATE utf8_bin;
更改表格整理
SELECT CONCAT('ALTER TABLE ', table_name, ' CHARACTER SET utf8 COLLATE utf8_bin;') FROM information_schema.TABLES AS T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` AS C WHERE C.collation_name = T.table_collation AND T.table_schema = 'jira' AND ( C.CHARACTER_SET_NAME != 'utf8' OR C.COLLATION_NAME != 'utf8_bin' );
更改列整理
SELECT CONCAT('ALTER TABLE `', table_name, '` MODIFY `', column_name, '` ', DATA_TYPE, '(', CHARACTER_MAXIMUM_LENGTH, ') CHARACTER SET UTF8 COLLATE utf8_bin', (CASE WHEN IS_NULLABLE = 'NO' THEN ' NOT NULL' ELSE '' END), ';') FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'jira' AND DATA_TYPE = 'varchar' AND ( CHARACTER_SET_NAME != 'utf8' OR COLLATION_NAME != 'utf8_bin' );
SELECT CONCAT('ALTER TABLE `', table_name, '` MODIFY `', column_name, '` ', DATA_TYPE, ' CHARACTER SET UTF8 COLLATE utf8_bin', (CASE WHEN IS_NULLABLE = 'NO' THEN ' NOT NULL' ELSE '' END), ';') FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'jira' AND DATA_TYPE != 'varchar' AND ( CHARACTER_SET_NAME != 'utf8' OR COLLATION_NAME != 'utf8_bin' );
将以上查询的输出到文件内使用 mysql命令修改表。
实验环境下:mysql -uroot -p123456 < a.txt
处理外键约束
SET FOREIGN_KEY_CHECKS=0;
问题二:
刷新网页后显示:
您的许可证” 的用户超出限制时。用户可能无法创建的问题, 直到您有升级您的许可证或数量减少的用户。
是由于还未破解.......
破解方法:拷贝破解文件atlassian-extras-3.2.jar
[root@jira tools]# cp atlassian-extras-3.2.jar /usr/local/jira/atlassian-jira/WEB-INF/lib/cp: overwrite `/usr/local/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar'? y
重启刷新网页,发现还是报这个错的话,进到应用程序==> 版本与许可证 ,查看是否有证书,如果没有申请免费证书,刷新后就破解成功,如下图所示:
问题三:
数据库连接设置
修改dbconfig.xml
增加一条:
<pool-test-on-borrow>false</pool-test-on-borrow>
问题四: