å¥ãµã¼ãã«ããTracããRedmineã¸ãã¼ã¿ã移è¡ããæé
çµç·¯
å
æ¥ãéçºç¨ãµã¼ãã«ç«ã¦ã¦ããBTS(ãã°ç®¡çã·ã¹ãã )ãã¼ã«"Trac"ã®ãã¼ã¿ã
å¥ã®ãµã¼ãã«ç«ã¦ã¦ããåæ§ã®BTSãã¼ã«"Redmine"ã«ç§»è¡ããäºã«ãªã£ãã
Redmineå
¬å¼ã®"ä»ã·ã¹ãã ããã®ç§»è¡"ãã¼ã¸ã«ããã¨ã
tracããredmineã¸ã®ç§»è¡ãå®è¡ããã¹ã¯ãªãããããããããå©ç¨ãã移è¡æé ãè¼ã£ã¦ãããã
ããã¯åä¸ãµã¼ãå
ã«Tracã¨Redmineãåå±
ãã¦ãããã¨ãåæã¨ããæé ãªã®ã§ã
å¥ãµã¼ãã«ç«ã¦ã¦ããå ´åã«ã¤ãã¦ã®æé ã¯è¼ã£ã¦ãªãã£ãã
å
輩ã«è¨ãã¦ã¿ãã¨ããããã°ãã±ããã®ç§»è¡ã®ä¾ã¯ãã£ããã®ã®ã
Wikiãå«ãããã¼ã¿ã丸ãã¨ç§»è¡ããåä¾ã¯ãªãã¨ã®äºã ã£ãã®ã§
ä»å調æ»ãã¦ããã«ç§»è¡æé ãè¼ãããã¨ã«ããã
ãã®æé ã§ã¯ã以ä¸ã®åæã«åã£ã¦æ¸ãã¦ããã®ã§ãããããã
- Unixç³»ã®OS(Linux,Macãªã©)ã§CUIãå©ç¨ããä½æ¥ãã§ãããã¨
- ã³ãã³ãã©ã¤ã³ããã®sshã§ãµã¼ãã«æ¥ç¶ã§ãããã¨
- Tracãå©ç¨ããçµé¨ãRedmineãå©ç¨ããçµé¨ããããã¨
- Trac,Redmineã®ãµã¼ããæ¢ã«ããããç«ã¦ã¦ãããã¨
移è¡æé
ï¼ï¼tracããããµã¼ãã«ã¦
tracãã£ã¬ã¯ããªã"tar.gz"ã§å§ç¸®ãã¦ãã¦ã¼ã¶ãã£ã¬ã¯ããªã«ç§»åããã$ sudo su - #rootã¦ã¼ã¶ã«å¤æ´ $ cd /var/ $ ./stop_trac.sh #å§ç¸®ä¸ã«æ´æ°ãããªãããã«Tracãæ¢ãã¦ãã $ tar -zcvf trac.tar.gz trac $ mv trac.tar.gz /home/[ã¦ã¼ã¶]/
ï¼ï¼ãã¼ã«ã«PCã«ã¦
tar.gzãã¡ã¤ã«ãscpã§æã£ã¦ãã$ scp [ã¦ã¼ã¶]@[tracããããµã¼ã]:~/trac.tar.gz .
tar.gzãã¡ã¤ã«ãredmineããããµã¼ãã«scpã§éã
$ scp trac.tar.gz [ã¦ã¼ã¶]@[redmineããããµã¼ã]:
ï¼ï¼Redmineããããµã¼ãã«ã¦
Redmineããããµã¼ãã§tar.gzãã¡ã¤ã«ãå±éãã$ cd /home/[ã¦ã¼ã¶]/ $ tar -zxvf trac.tar.gz
ãã失æããæã®ããã«Redmineã®DBã®ããã¯ã¢ãããã¨ã£ã¦ãã
#DBãmysqlã®æ $ mysqldump -u[ã¦ã¼ã¶å] redmine > redmine.dump2012XXXX
ãªãã·ã§ã³è¨å®ã以ä¸ã®æ¡ä»¶ãå½ã¦ã¯ã¾ã£ã¦ããããããããã«å¯¾å¿ããâ»(å¾è¿°)ãå®è¡ããã
- (Tracã®ãã¼ã¸ã§ã³ã0.12ã®å ´å â»1)
- (Tracã®ãã¼ã¿ãSqlite3ã§æ ¼ç´ãã¦ããå ´å â»2)
- (Redmineã®ãµã¼ãã®Rubyãã¼ã¸ã§ã³ãRVMã§åãæ¿ãã¦ããå ´å â»3)
ãã¼ã¿ç§»è¡ã¹ã¯ãªãããå®è¡ãã
$ cd /var/www/[redmineã®ãã¹] $ sudo su - www-data #www-dataã¦ã¼ã¶ã«å¤æ´ $ mkdir files #å®è¡ããæã«å¿ è¦ãªãã£ã¬ã¯ããªãä½æ $ rake redmine:migrate_from_trac RAILS_ENV=âdevelopmentâ #å®è¡å¾ä»¥ä¸ã®åãåãããæ¥ãã®ã§ããããå ¥åãã Trac directory []: ã#Tracãç½®ãã¦ãããã¹ãå ¥å Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: #Tracã§ä½¿ç¨ããDBã®ç¨®é¡ãå ¥å Database encoding [UTF-8]: #DBã®æåã³ã¼ããå ¥å(ä½ãå ¥åããEnteræ¼ãã ãã§ãOK) Target project identifier []: #Redmineä¸ã§ä½¿ãããã¸ã§ã¯ãã®å称ãå ¥å â Trac directory []: /trac/home/[ã¦ã¼ã¶]/trac/[ããã¸ã§ã¯ãã®ãã£ã¬ã¯ããª] Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]:sqlite3 Database encoding [UTF-8]: Target project identifier []: [ããã¸ã§ã¯ãå]
å
¥åããã¨å¦çãèµ°ã£ã¦ãæ°åçµã¦ã°å®äºããã
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
â»1 Tracã®ãã¼ã¸ã§ã³ã0.12ã®å ´åï¼
移è¡ã¹ã¯ãªããã¯0.12ããµãã¼ããã¦ããªãã
[åèURL: http://www.redmine.org/issues/6868 http://www.redmine.org/issues/5764 ]
ãªã®ã§ãã¹ã¯ãªãããã¡ã¤ã«ãä¸é¨ä¿®æ£ããªããã°ãããªãã
1). ã¹ã¯ãªãããã¡ã¤ã«ãä¿®æ£: $ sudo su - #rootã¦ã¼ã¶ã«å¤æ´ $ vi /var/www/[Redmineã®ãã¹]/lib/tasks/migrate_from_trac.rake 78 def fake(time) 79 @fake_diff = real_now - time â time = 0 if time.nil? ã追å 78 def fake(time) 79 time = 0 if time.nil? 80 @fake_diff = real_now - time 2). ããããã¡ã¤ã«ãå½ã¦ã $ wget http://www.redmine.org/attachments/download/4049/migrate_from_trac.diff $ patch -p0 < migrate_from_trac.diff ããããå½ã¦ããã¡ã¤ã«åã®åãåããã« migrate_from_trac.rake ãæå®
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
â»2 Tracã®ãã¼ã¿ãSqlite3ã§æ ¼ç´ãã¦ããå ´åï¼
Rubyç¨ã®Sqlite3ãã¤ã³ã¹ãã¼ã«ãã
$ sudo gem install sqlite3-ruby
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
â»3 Redmineã®ãµã¼ãã®Rubyãã¼ã¸ã§ã³ãRVMã§åãæ¿ãã¦ããå ´å:
RVMã§ãã¼ã¸ã§ã³ãæå®ããªãã¨ãã¹ã¯ãªãããèªèãã¦ãããªãã®ã§æå®ããã
$ cd /var/www/[redmineã®ãã¹] $ sudo su - www-data $ rvm use 1.8.7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
FAQ 移è¡ã«é¢ãã¦åºã¦ãããããã¡ãªçå
Q1.Tracã®ã¦ã¼ã¶ãRedmineã«ç»é²ãããªãã£ããã©ããã¦ï¼
ãA.Tracä¸ã§ã¦ã¼ã¶ãä½æããã¦ãã¦ãããã±ããã®æ
å½ãå²ãæ¯ããã¦ããªãã¨Redmineä¸ã«ã¦ã¼ã¶ã¯ä½æãããªãã
ããã¦ã¼ã¶ã移ãããæã¯ã©ããããã®ãã±ããã«å²ãæ¯ãããã«ã
Q2.Tracã¨Redmineã§ã¦ã¼ã¶IDãéè¤ããããã¦ã¼ã¶æ
å ±(ãã°ã¤ã³ãã¹ã¯ã¼ããªã©)ã¯ä¸æ¸ãããã¡ããã®ï¼
ãA.Redmineå´ã®ã¦ã¼ã¶æ
å ±ã¯ä¿æããããTracã§åãæã£ã¦ããã±ãããå¼ãç¶ãã§ãããã®ã§æå¤ã¨ä¾¿å©ã