Jira数据备份与恢复:全面指南

Jira系统管理中自带备份和导入功能,如下图:

Jira数据备份_mysql


但是你使用时会报错误:

You have not named a safe backup directory and hence you are not allowed to make backups for security reasons. You must edit jira-application.properties and explicitly set 'jira.paths.safe.backup.path=/to/some/safe/path'. Restart JIRA and then you will be able to make arbitrary backups. NOTE : If you are using Windows, you will need to use double \ characters, for example d:\\some\\safe\\path

解决方法:

我之前安装方法是采用下面方法:

一、编辑并修改 \edit-webapp\WEB-INF\classes\jira-application.properties 文件

主要是 jira.paths.safe.backup.path 属性设置上。

注意看对应的注释, Window和Linux的写法有差异。

 

二、编译

执行 sudo ./build.sh war

 

三、部署并修改配置文件

我装的是 Tomcat 6 所以我的 war 文件应该是:

/home/jira/dist-tomcat/tomcat-6/  目录下的

copy jira.xml 文件到 tomcat 目录下:

sudo cp /home/jira/dist-tomcat/tomcat-6/jira.xml /opt/apache-tomcat-6.0.29/conf/Catalina/localhost/

并修改这个文件如下:

<Context path="/jira" docBase="path/to/atlassian-jira-4.0.war">
  <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
    username="jirauser"
    password="mypassword"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/jiradb?useUnicode=true&characterEncoding=UTF8&autoReconnect=true&mysqlEncoding=utf8"
    maxActive="20"
    validationQuery="select 1"/>
  <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
    factory="org.objectweb.jotm.UserTransactionFactory"
    jotm.timeout="60"/>
  <Manager pathname=""/>
</Context>
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.

 

四、重启 jira

启动 Tomcat

通过  bin/startup.sh 启动 tomcat

 

之后这里就可以正常备份了。

 

 

参考资料:


 http://www.fangwai.net/bbs/redirect.php?fid=1&tid=5288&goto=nextoldset


QR Code
微信扫一扫,欢迎咨询~

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 155-2731-8020
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

手机不正确

公司不为空