회사에서 사용하는 Redmine 서버 장비가 노후화가 많이 되어서 바꿔야 되는 시기가 왔다. 회사가 창립하고(회사창립이 18년넘음) 처음 Redmine을 사용하면서부터 여태 변경 안했었던 것 같은데, 왜 내가 이걸 하게 되었는지 신기할 따름이다.. ㅋㅋ 2일동안 삽질하고 시간 날리면서 수고한 것들이 아까워서 흔적을 남기기 위해서 이렇게 포스팅을 해본다.
Redmine은 협업툴로써 우리회사에서는 엔지니어와 개발자간의 소통을 위한 도구로 사용되고있다. 모듈 주고 받기도 하고, 이슈 올려서 요청도 하기도하고..
#현재 상황
레드마인 서버 장비 -> 새로운 서버장비로 이전
- 핵심사항 : 레드마인 버전이 다름, 해본적 없음 😅 😅
- 환경은 이전서버는 Windows7 구축할 서버는 Windows10
Bitnami 3.2.1 버전을 4.2.2 버전으로 옮기기
이전 할 서버 백업
### 자신의 database ID와 PW를 확인
redmine-3.2.1-0\apps\redmine\htdocs\config 경로 안에 database.yml 파일 열기
계정 아이디는 'bitnami' 패스워드는 저기 빨간색으로 되어있는 곳입니다.
### 데이터베이스 벡업 시작
>mysql -u계정-p비밀번호 백업할디비명 > 백업할파일명.sql
>mysql -ubitnami -pP8833838G bitnami_redmine > redmine_backup.sql
*이렇게 하면 redmine_backup.sql 파일에 데이터가 백업이 된 것입니다.
### 폴더 및 파일 백업
보통 찾아보니깐 백업해두라고 하는 폴더가 'redmine-3.2.1-0\app\redmine\htdocs' 경로에있는 files, plugins, public 이거 세개더라구요.
저는 혹시나 몰라서 'redmine-3.2.1-0' 폴더 자체를 복사 해두었습니다 😁😁
구축할 서버에 데이터 복구하기
###Bitnami Redmine 버전 설치
Install Redmine, Download Redmine (bitnami.com)
설치하는거는 어려운 부분이 없으니 넘겨넘겨~
설치할때 해당 화면에서 계정 설정하는데, 이거 잊어먹으면 안되요. mysql 로그인할때 root 비밀번호이기도 하니 참고해주세요
### 폴더 옮기기 ( files 폴더만 )
이거때문에 많이 헤메었었습니다.
여기서 중요한거는 plugins 같은 다른 파일들은 변경하지 않아야합니다. 찾아보니깐 버전이 3.대에서 4.대로 넘어가기때문에 플러그인들이 지원 하지 않거나 버전이 맞지않아서 복구하다가 오류나는 경우가 있다고합니다.
즉 결론은 files 폴더만 옮겨줍니다. 기존에 있던 폴더는 files_org로 리네임 해두었습니다.
### Bundle 설치 ( 경로를 htdocs로 변경해주어야한다 )
C:\Bitnami\redmine-4.2.2-0>cd C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs
C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>bundle install
Using rake 13.0.6
Using concurrent-ruby 1.1.9
Using i18n 1.8.10
Using minitest 5.14.4
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 5.2.6
Using builder 3.2.4
Using erubi 1.10.0
Using racc 1.5.2 (x64-mingw32)
Using nokogiri 1.11.7 (x64-mingw32)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.11.0
Using rails-html-sanitizer 1.3.0
Using actionview 5.2.6
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 5.2.6
Using nio4r 2.5.7 (x64-mingw32)
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.5 (x64-mingw32)
Using actioncable 5.2.6
Using globalid 0.5.2
Using activejob 5.2.6
Using mini_mime 1.0.3
Using mail 2.7.1
Using actionmailer 5.2.6
Using method_source 1.0.0
Using thor 1.1.0
Using railties 5.2.6
Using actionpack-xml_parser 2.0.1
Using activemodel 5.2.6
Using arel 9.0.0
Using activerecord 5.2.6
Using marcel 1.0.1
Using activestorage 5.2.6
Using public_suffix 4.0.6
Using addressable 2.8.0
Using bundler 2.1.2
Using chunky_png 1.4.0
Using css_parser 1.10.0
Using csv 3.1.9
Using daemons 1.4.0
Using eventmachine 1.2.7 (x64-mingw32)
Using htmlentities 4.3.4
Using mini_magick 4.11.0
Using mysql2 0.5.3 (x64-mingw32)
Using net-ldap 0.17.0
Using ruby-openid 2.9.2
Using rack-openid 1.4.2
Using sprockets 4.0.2
Using sprockets-rails 3.2.2
Using rails 5.2.6
Using rbpdf-font 1.19.1
Using rbpdf 1.20.1
Using redcarpet 3.5.1 (x64-mingw32)
Using request_store 1.5.0
Using roadie 4.0.0
Using roadie-rails 2.2.0
Using rotp 6.2.0
Using rouge 3.26.0
Using rqrcode_core 1.1.0
Using rqrcode 2.0.0
Using rubyzip 2.3.2
Using thin 1.8.0 (x64-mingw32)
Using tzinfo-data 1.2021.1
Updating files in vendor/cache
Bundle complete! 36 Gemfile dependencies, 67 gems now installed.
Gems in the groups development, test and sqlite were not installed.
Bundled gems are installed into `./vendor/bundle`
### mysql db 제거 및 다시 생성
C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>mysql -u root -p
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 8.0.26 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
### bitnami_redmine db 삭제
mysql> drop database bitnami_redmine;
Query OK, 56 rows affected (10.15 sec)
### bitnami_redmine db 생성
mysql> create database bitnami_redmine;
Query OK, 1 row affected (0.27 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| bitnami_redmine |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
### mysql 나가기
mysql> exit
Bye
### db 복구 ( 화살표 주의 '<' 복구할때는 이겁니다 )
C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>mysql -u root -p bitnami_redmine < c:\bitnami_redmine.sql
Enter password: *********
### db migration
C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>bundle exec rake db:migrate RAILS_ENV=production
== 20160404080304 ForcePasswordResetDuringSetup: migrating ====================
== 20160404080304 ForcePasswordResetDuringSetup: migrated (0.2032s) ===========
생략...생략...생략...생략...생략...생략...생략...
생략...생략...생략...생략...생략...생략...생략
-- add_column(:users, :twofa_totp_last_used_at, :integer)
-> 0.5306s
== 20200826153402 AddTotpToUser: migrated (0.8862s) ===========================
### 서버 접속도 완료
이전 서버에 있던 데이터들이 전부다 정상적으로 마이그레이션 되어서 적용된 것을 확인 할 수 있습니다
하루정도 헤메었는데 그래도 잘 마무리 할 수 있어서 다행입니다..
아참 플러그인은 어떻게하냐구요?
그건 이제 설치해야지요.. 버전에 맞춰서 하나씩 찾아서 설치해주면 됩니다.
이것도 시간나면 정리해서 올려보겠습니다.
😱
그럼 이만..
+2021-08-11 추가
버전 번경은 잘되었으나 플러그인들을 전부 적용하려고 하니 지원하지 않는 것들이 있어서 결국 원래 버전 '3.2.1-0' 찾아내어서 이걸로 설치하였습니다.. ㅠㅠ 며칠동안 업무도 잘 못하고 삽질만 엄청 해대서 스트레스작렬중... 👿👿👿
### 에러발생되는 유형정리
1) 경로 위치 잘못 되었을때
C:\Bitnami\redmine-4.2.2-0>bundle install
Could not locate Gemfile
- 해당 경우에는 cd C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs 경로를 해당 위치로 변경해서 다시 명령어를 실행해주자.
2) 계정이 없을경우
C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>mysql -u bitnami -p비밀번호 bitnami_redmine < c:\bitnami_redmine.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1044 (42000): Access denied for user 'bitnami'@'localhost' to database 'bitnami_remine'
- 해당 DB에 해당 계정이 없는데, 다른 곳에 보면 이렇게 명령어를 쳐야한다고 해서.. 해봤는데 안되서 헤멤
- 결론은 root 계정으로 명령어 쳐서 해서 완료하였음
전체 명령어 라인
C:\Bitnami\redmine-4.2.2-0>cd C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>bundle install Using rake 13.0.6 Using concurrent-ruby 1.1.9 Using i18n 1.8.10 Using minitest 5.14.4 Using thread_safe 0.3.6 Using tzinfo 1.2.9 Using activesupport 5.2.6 Using builder 3.2.4 Using erubi 1.10.0 Using racc 1.5.2 (x64-mingw32) Using nokogiri 1.11.7 (x64-mingw32) Using rails-dom-testing 2.0.3 Using crass 1.0.6 Using loofah 2.11.0 Using rails-html-sanitizer 1.3.0 Using actionview 5.2.6 Using rack 2.2.3 Using rack-test 1.1.0 Using actionpack 5.2.6 Using nio4r 2.5.7 (x64-mingw32) Using websocket-extensions 0.1.5 Using websocket-driver 0.7.5 (x64-mingw32) Using actioncable 5.2.6 Using globalid 0.5.2 Using activejob 5.2.6 Using mini_mime 1.0.3 Using mail 2.7.1 Using actionmailer 5.2.6 Using method_source 1.0.0 Using thor 1.1.0 Using railties 5.2.6 Using actionpack-xml_parser 2.0.1 Using activemodel 5.2.6 Using arel 9.0.0 Using activerecord 5.2.6 Using marcel 1.0.1 Using activestorage 5.2.6 Using public_suffix 4.0.6 Using addressable 2.8.0 Using bundler 2.1.2 Using chunky_png 1.4.0 Using css_parser 1.10.0 Using csv 3.1.9 Using daemons 1.4.0 Using eventmachine 1.2.7 (x64-mingw32) Using htmlentities 4.3.4 Using mini_magick 4.11.0 Using mysql2 0.5.3 (x64-mingw32) Using net-ldap 0.17.0 Using ruby-openid 2.9.2 Using rack-openid 1.4.2 Using sprockets 4.0.2 Using sprockets-rails 3.2.2 Using rails 5.2.6 Using rbpdf-font 1.19.1 Using rbpdf 1.20.1 Using redcarpet 3.5.1 (x64-mingw32) Using request_store 1.5.0 Using roadie 4.0.0 Using roadie-rails 2.2.0 Using rotp 6.2.0 Using rouge 3.26.0 Using rqrcode_core 1.1.0 Using rqrcode 2.0.0 Using rubyzip 2.3.2 Using thin 1.8.0 (x64-mingw32) Using tzinfo-data 1.2021.1 Updating files in vendor/cache Bundle complete! 36 Gemfile dependencies, 67 gems now installed. Gems in the groups development, test and sqlite were not installed. Bundled gems are installed into `./vendor/bundle` C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>mysql ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs> C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>mysql -u root -p Enter password: ********* Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> drop database bitnami_redmine; Query OK, 56 rows affected (10.15 sec) mysql> create database bitnami_redmine; Query OK, 1 row affected (0.27 sec) mysql> exit Bye C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>mysql -u root -p bitnami_redmine < c:\bitnami_redmine.sql Enter password: ********* C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs>bundle exec rake db:migrate RAILS_ENV=production == 20160404080304 ForcePasswordResetDuringSetup: migrating ==================== == 20160404080304 ForcePasswordResetDuringSetup: migrated (0.2032s) =========== == 20160416072926 RemovePositionDefaults: migrating =========================== -- change_column("boards", :position, :integer, {:default=>nil}) -> 0.3021s -- change_column("custom_fields", :position, :integer, {:default=>nil}) -> 0.3109s -- change_column("enumerations", :position, :integer, {:default=>nil}) -> 0.1783s -- change_column("issue_statuses", :position, :integer, {:default=>nil}) -> 0.2844s -- change_column("roles", :position, :integer, {:default=>nil}) -> 0.1561s -- change_column("trackers", :position, :integer, {:default=>nil}) -> 0.1138s == 20160416072926 RemovePositionDefaults: migrated (1.5469s) ================== == 20160529063352 AddRolesSettings: migrating ================================= -- add_column(:roles, :settings, :text, {}) -> 0.4870s == 20160529063352 AddRolesSettings: migrated (0.4899s) ======================== == 20161001122012 AddTrackerIdIndexToWorkflows: migrating ===================== -- add_index(:workflows, :tracker_id) -> 1.3258s == 20161001122012 AddTrackerIdIndexToWorkflows: migrated (1.3283s) ============ == 20161002133421 AddIndexOnMemberRolesInheritedFrom: migrating =============== -- add_index(:member_roles, :inherited_from) -> 1.5195s == 20161002133421 AddIndexOnMemberRolesInheritedFrom: migrated (1.5220s) ====== == 20161010081301 ChangeIssuesDescriptionLimit: migrating ===================== -- change_column(:issues, :description, :text, {:limit=>16777216}) -> 8.5264s == 20161010081301 ChangeIssuesDescriptionLimit: migrated (8.5288s) ============ == 20161010081528 ChangeJournalDetailsValueLimit: migrating =================== -- change_column(:journal_details, :value, :text, {:limit=>16777216}) -> 6.7274s -- change_column(:journal_details, :old_value, :text, {:limit=>16777216}) -> 11.7871s == 20161010081528 ChangeJournalDetailsValueLimit: migrated (18.5200s) ========= == 20161010081600 ChangeJournalsNotesLimit: migrating ========================= -- change_column(:journals, :notes, :text, {:limit=>16777216}) -> 11.8752s == 20161010081600 ChangeJournalsNotesLimit: migrated (11.8772s) =============== == 20161126094932 AddIndexOnChangesetsIssuesIssueId: migrating ================ -- add_index(:changesets_issues, :issue_id) -> 0.4510s == 20161126094932 AddIndexOnChangesetsIssuesIssueId: migrated (0.4535s) ======= == 20161220091118 AddIndexOnIssuesParentId: migrating ========================= -- add_index(:issues, :parent_id) -> 2.8810s == 20161220091118 AddIndexOnIssuesParentId: migrated (2.8835s) ================ == 20170207050700 AddIndexOnDiskFilenameToAttachments: migrating ============== -- add_index(:attachments, :disk_filename) -> 4.4902s == 20170207050700 AddIndexOnDiskFilenameToAttachments: migrated (4.4927s) ===== == 20170302015225 ChangeAttachmentsDigestLimitTo64: migrating ================= -- change_column(:attachments, :digest, :string, {:limit=>64}) -> 0.2333s == 20170302015225 ChangeAttachmentsDigestLimitTo64: migrated (0.2358s) ======== == 20170309214320 AddProjectDefaultAssignedToId: migrating ==================== -- add_column(:projects, :default_assigned_to_id, :integer, {:default=>nil}) -> 0.2728s -- column_exists?(:projects, :default_assignee_id, :integer) -> 0.0055s == 20170309214320 AddProjectDefaultAssignedToId: migrated (0.2831s) =========== == 20170320051650 ChangeRepositoriesExtraInfoLimit: migrating ================= -- change_column(:repositories, :extra_info, :text, {:limit=>16777216}) -> 2.6703s == 20170320051650 ChangeRepositoriesExtraInfoLimit: migrated (2.6728s) ======== == 20170418090031 AddViewNewsToAllExistingRoles: migrating ==================== == 20170418090031 AddViewNewsToAllExistingRoles: migrated (3.7519s) =========== == 20170419144536 AddViewMessagesToAllExistingRoles: migrating ================ == 20170419144536 AddViewMessagesToAllExistingRoles: migrated (1.8734s) ======= == 20170723112801 RenameCommentsToContent: migrating ========================== -- rename_column(:comments, :comments, :content) -> 0.8831s == 20170723112801 RenameCommentsToContent: migrated (0.8855s) ================= == 20180501132547 AddAuthorIdToTimeEntries: migrating ========================= -- add_column(:time_entries, :author_id, :integer, {:default=>nil, :after=>:project_id}) -> 2.8622s == 20180501132547 AddAuthorIdToTimeEntries: migrated (3.0160s) ================ == 20180913072918 AddVerifyPeerToAuthSources: migrating ======================= -- change_table(:auth_sources) -> 1.1250s == 20180913072918 AddVerifyPeerToAuthSources: migrated (1.1274s) ============== == 20180923082945 ChangeSqliteBooleansTo0And1: migrating ====================== == 20180923082945 ChangeSqliteBooleansTo0And1: migrated (0.0000s) ============= == 20180923091603 ChangeSqliteBooleansDefault: migrating ====================== == 20180923091603 ChangeSqliteBooleansDefault: migrated (0.0000s) ============= == 20190315094151 ChangeCustomValuesValueLimit: migrating ===================== -- change_column(:custom_values, :value, :text, {:limit=>16777216}) -> 12.6185s == 20190315094151 ChangeCustomValuesValueLimit: migrated (12.6210s) =========== == 20190315102101 AddTrackersDescription: migrating =========================== -- add_column(:trackers, :description, :string, {:after=>:name}) -> 0.9310s == 20190315102101 AddTrackersDescription: migrated (0.9335s) ================== == 20190510070108 AddUniqueIdToImportItems: migrating ========================= -- change_table(:import_items) -> 1.6509s == 20190510070108 AddUniqueIdToImportItems: migrated (1.6534s) ================ == 20190620135549 ChangeRolesNameLimit: migrating ============================= -- change_column(:roles, :name, :string, {:limit=>255, :default=>""}) -> 2.2691s == 20190620135549 ChangeRolesNameLimit: migrated (2.2716s) ==================== == 20200826153401 AddTwofaSchemeToUser: migrating ============================= -- add_column(:users, :twofa_scheme, :string) -> 1.3803s == 20200826153401 AddTwofaSchemeToUser: migrated (1.3828s) ==================== == 20200826153402 AddTotpToUser: migrating ==================================== -- add_column(:users, :twofa_totp_key, :string) -> 0.3506s -- add_column(:users, :twofa_totp_last_used_at, :integer) -> 0.5306s == 20200826153402 AddTotpToUser: migrated (0.8862s) =========================== C:\Bitnami\redmine-4.2.2-0\apps\redmine\htdocs> |
'훈, IT 공부' 카테고리의 다른 글
C#에서 크롤링 웹자동화 크롬드라이버( Chrome Driver ), 셀레니움 (Selenium ) 설치하기 (0) | 2022.06.03 |
---|---|
Visual Studio 2008 SP1 설치 실패시 해결 방법 (0) | 2022.05.05 |
[ios] swift 개발을 위한 연습 HelloWorld, storyboarder 코드로 Label 구성하기 (6) | 2021.06.03 |
C++ 프로세스의 권한을 관리자 혹은 일반 사용자 권한으로 실행하기 (7) | 2021.01.26 |
원하는 데이터를 얻고싶어, 정규표현식이란? 정규식 이라고도 하지요. (6) | 2020.03.23 |
댓글