Jira ultimate application - version upgrade and data migration

Preface:

Jira and Confluence's version is too low, a lot of Agile Kanban-related functions are not available, it plans to upgrade directly to the latest version.

Current Jira6.4 need to upgrade to version 8.5.1

Current Conference5.7.1 need to upgrade to version 7.1.0

Program:

The upgrade process need to ensure that the new version of the mounting base, using the plug-in has been installed; ensure local metadata migration and Accessories Catalog migration. Where the local Accessories Catalog Migration need not consider the issue of cross-version, you can copy directly copied; and metadata migration across versions of the problem needs to be verified.

Proven, Conference5.7.1 export metadata can be restored directly in 7.1.0, and Jira6.4 version of metadata to export version 7.0 need to go through before they can do a transfer.

Database preparation:

Use your own self-built mysql database, and not rely on the recommended installation Jira and Confluence one-button operation

The core command:

# Log database

mysql.local

# Create a database

CREATE DATABASE jiradbname CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

CREATE DATABASE wikidbname CHARACTER SET utf8 COLLATE utf8_bin;

# Empowering Users

GRANT ALL PRIVILEGES ON jiradbname.* TO 'jirauser'@'yourip' IDENTIFIED BY 'yourpasswd';

GRANT ALL PRIVILEGES ON wikidbname.* TO 'wikiuser'@'yourip' IDENTIFIED BY ' yourpasswd ';

 

flush privileges;

 

# If you want to clean up the database, do the following

DROP DATABASE jiradbname;

DROP DATABASE wikidbname;

Jira AnSo

Core instruction:

# Installed base file

# Attention when performing data files need to select a large enough disk space

sudo ./atlassian-jira-software-8.5.1-x64.bin

Note that the data directory Select a point to choose a large enough disk, can not use the default configuration.

# Start jira

sudo /etc/init.d/jira start

Access the installation page http: // IP: 8080 database initialization

Jira need to build two sets, a set of 8.5.1, a 7.0

Confluence installation

Core instruction:

# Installed base file

# Attention when performing data files need to select a large enough disk space

sudo ./atlassian-confluence-7.1.0-x64.bin

Also note that select the data directory to choose a large enough disk, you can not use the default configuration.

# Start confluence

sudo /etc/init.d/confluence start

Access the installation page http: // IP: 8090 database initialization

Here in mind that one should pay attention to, whether you're after the account management is how, here are the use of confluence independent user management, follow-up can be matched.

Jira Transition

Metadata migration

Jira backup tool means comes back up, the backup file directly obtain / data / atlassian / application-data / jira / export of

The recovery after the backup copy to the destination machine / data / atlassian / application-data / jira / import directory

Metadata need to remember to do here twice: from 6.4 to 7.0 and then to 8.5.1

Accessories Catalog 6.4 to 8.5.1 migration done directly, copy / data / atlassian / jira / data

PS: large amounts of data using multi-threaded compression https://www.jianshu.com/p/7d956a21f0ab

Confluence migration

Metadata migration

Do not back up the data, but also to check the archive to the backup directory 

 Temporary directory will generate a time-stamped in the background, when the end will automatically backup compression

Restoring the compressed file thrown at restore directory

 

附件目录迁移同Jira,此处略

注意:一定要小心confluence凌晨的temp目录清理机制,我就遇到过导出完毕没有把文件取走导致需要重新再来一次。

注意事项:

Confluence中文乱码问题

在Confluence机器中

mkdir /usr/share/fonts/msttcore/

#从window的C:\Windows\Fonts\ 下所有字体拖到上面新建的目录

vim /opt/atlassian/confluence/bin/setenv.sh

#搜索`CATALINA_OPTS`, 在最后一个匹配行后,追加如下行:

CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/msttcore/ ${CATALINA_OPTS}"

Jira+Wiki账户同步问题

配置应用程序链接

       先修改jira的配置

       1 Jira BaseUrl配置

       2 系统--应用程序--应用程序链接

匹配用户服务器

       先修改jira的配置

              用户管理--Jira用户服务器--确定ip地址

       再来修改Confluence的配置

              用户目录--输入jira那边的配置信息

PDF导出语言支持的问题

       Confluence的admin账户进入系统配置à PDF导出语言支持,把自己window中的雅黑字体文件丢进去即可。

清理字体命令

fc-cache -f -v

重建Confluence插件索引

rm -Rf /data/atlassian/confluence/plugins-cache

rm -Rf /data/atlassian/confluence/plugins-osgi-cache

然后登陆Confluence的系统管理界面重建索引

 

服务备份 

/usr/local/sh/jira-wiki-bak.sh
#!/bin/bash
backupNum=1
NOW=$(date +%Y%m%d)
/bin/tar -czf /data/atlassian_backup/jira_data_$NOW.tar.gz /data/atlassian/jira/data
/bin/tar -czf /data/atlassian_backup/confluence_attachments_$NOW.tar.gz /data/atlassian/confluence/attachments
/usr/bin/mysqldump -hIP -P3306 -uDBUSER -pPASSWORD DBNAME | gzip > /data/atlassian_backup/jira_mysql_$NOW.tar.gz
/usr/bin/mysqldump -hIP -P3306 -uDBUSER -pPASSWORD DBNAME | gzip > /data/atlassian_backup/wikidb_mysql_$NOW.tar.gz

find /data/atlassian_backup/ -mtime +$backupNum -name "jira_data*.tar.gz" -exec rm -f {} \;
find /data/atlassian_backup/ -mtime +$backupNum -name "confluence_attachments*.tar.gz" -exec rm -f {} \;
find /data/atlassian_backup/ -mtime +$backupNum -name "jira_mysql*.tar.gz" -exec rm -f {} \;
find /data/atlassian_backup/ -mtime +$backupNum -name "wikidb_mysql*.tar.gz" -exec rm -f {} \;
配置crontab,每天凌晨执行
sudo crontab -u root -e
ubuntu中crontab启动:
sudo service cron restart
centos中crontab启动:
sudo service crond restart
配置项:
0 */1 * * * nohup /usr/bin/rsync -avPz --ignore-errors --delete --contimeout=30 --timeout=10800 --password-file=/etc/jira_rsyncd.pass jingtao@IP::{logic_path} /data/atlassian_backup/ &
查看执行情况:
sudo service cron status

配置防火墙

老机器上备份防火墙:iptables-save  >  my.ipt

新机器上导入防火墙:iptables-restore < my.ipt

 

Webhook检查

最后记得检查下新版本的webhook,虽然webhook的配置会帮你导入过来,但是请留意服务请求端有没有IP白名单、防火墙、安全组等配置。

 

 

 

 

发布了168 篇原创文章 · 获赞 184 · 访问量 41万+

Guess you like

Origin blog.csdn.net/yejingtao703/article/details/103379217