crucible,fisheye backup & restore 방법
- 백업 방법
서버 접속
http://localhost:8060/admin
System setting - backup 항목 선택
모두 체크해서 백업을 하거나 repository 만 빼고 백업
repository 는 데이터량이 많으니 제외 하고 하는게 좋다
- 복원
새로운 서버에 java 및 mysql 설치 설치방법 참조 http://algo79.tistory.com/entry/Crucible-%EC%84%A4%EC%B9%98
계정생성
# useradd crucible
# passwd password
혹시 db가 mysql 방식이라면 db 생성
mysql> SET GLOBAL storage_engine = 'InnoDB';
mysql> CREATE DATABASE crucible CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT ALL PRIVILEGES ON crucible.* TO 'crucible'@'localhost' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> quit
아니라면 별도로 할건 없다.
crucible 새버전 다운
https://www.atlassian.com/software/fisheye/download?os=linux
다운 받은 파일을 압축을 풀자
# unzip fisheye-3.6.1.zip
# chown -R crucible:crucible fecru-3.6.1
# cd fecru-3.6.1/bin/
# su crucible
# ./fisheyectl.sh restore -f /path/backup_data.zip
~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~~~
~~~~~~~~~~~~~~
Starting ActiveObjects restore...
* Restoring Database Information
* Restoring Table Definitions
** Table count: 4
** Creating table 'AO_2913F5_COMMENT_ISSUE'
** Creating table 'AO_8219D4_COMMIT_HOOK_CONFIG'
** Creating table 'AO_A0B856_WEB_HOOK_LISTENER_AO'
** Creating table 'AO_B434B9_WEB_HOOK'
* Restoring Tables
** Restoring data to 'AO_2913F5_COMMENT_ISSUE'
** Restoring data to 'AO_8219D4_COMMIT_HOOK_CONFIG'
** Restoring data to 'AO_A0B856_WEB_HOOK_LISTENER_AO'
** Restoring data to 'AO_B434B9_WEB_HOOK'
ActiveObjects restore completed!
Backup restored successfully.
하면 정상적으로 복구가 완료가 된다.
- error1
INFO -
INFO -
INFO - ************************************************************************************************************************
INFO - Due to license restrictions the MySQL JDBC driver can not be bundled with FishEye/Crucible.
INFO - Please download the driver from http://dev.mysql.com/downloads/connector/j/
INFO - and install it to the FISHEYE_INST/lib directory: /data/fecru-3.6.1/lib.
INFO - See this page for more information: https://confluence.atlassian.com/display/FISHEYE/Migrating+to+MySQL+Enterprise+Server
INFO -
INFO - ************************************************************************************************************************
INFO -
INFO -
위와 같이 에러가 뜬다면 기존에 사용하던 mysql jar 파일이 없는것이다 다운받아서 lib 폴더에 복사하자
- error2
ERROR - Unable to connect to MySQL database jdbc:mysql://localhost:3306/crucible: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'crucible'
Cannot open target database at: jdbc:mysql://localhost:3306/crucible (Unable to connect to MySQL database jdbc:mysql://localhost:3306/crucible: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'crucible')
INFO - Closing com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext@1321202e: startup date [Thu Nov 06 01:45:36 KST 2014]; root of context hierarchy
INFO - *** application context closed ***
위와 같이 에러가 뜬다면 db가 없는것이다 db를 생성해 주자
- error3
WARNING: This operation will permanently overwrite the database at:
jdbc:mysql://localhost:3306/crucible
Please verify that this is the correct database to restore to and then re-run this command with the flag:
--force
INFO - Closing com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext@1321202e: startup date [Thu Nov 06 01:30:32 KST 2014]; root of context hierarchy
INFO - *** application context closed ***
위와 같이 에러가 뜬다면 db가 문제가 있는것이다. db를 삭제하고 다시 생성하자
mysql> drop database crucible;
mysql> SET GLOBAL storage_engine = 'InnoDB';
mysql> CREATE DATABASE crucible CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT ALL PRIVILEGES ON crucible.* TO 'crucible'@'localhost' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> quit