드루팔 버전 업그레이드 (Major Version, 5.x ⇒ 6.x)

아래 영문 설명글들이 너무 중구난방이라,
간단한 요약판을 한글로 준비해 보았습니다.

부족한 세부적인 내용은 아래 글을 참고하시기를 권하며...

[드루팔 메이저 version, 안전한 업그레이드 요령 간단판]

1. 기존의 낮은 버전의 드루팔 디비를 백업한다.
   새로 옮겨 갈 드루팔 신버전 디비에 덤프해 넣는다.
  
   * 낮은 버전의 디비 구조라도 상관마라. 나중에 업데이트 가능.

2. 옮겨갈 새 버전의 드루팔 주소를 따로 준비한다.
   예) 기존이 palpal.org , 새 버전은 new.palpal.org

   또한 도메인 IP 정보를 분화시켜 설정한다. 그리고 vhosts도 각각 설정.
   예) 기존 palpal.org 212.12.34.251      <== 구 버전의 설치 호스트 아이피.
       신규 new.palpal.org 212.13.44.222  <== 새 버전의 설치 호스트 아이피.
  
   * 이로써 이전 버전의 화면을 비교해 가면서 새 버전의 업그레이드가 가능.

3. 신규 버전의 드루팔/sites 폴더 아래에 다음과 같은 폴더를 만든다.
   드루팔/sites/new.palpal.org
   그리고 그 안에 settings.php를 넣되, 디비 설정 정보를 확인할 것.

4. 새 버전의 드루팔 주소에 업데이트 실시.
   예) http://new.palpal.org/update.php

   * 관리자 권한을 상실한 경우, sites/new.palpal.org/settings.php 에서
     일시적으로 강제 업데이트 가능토록 하는 옵션이 있으니 이를 변경.
     나중에 반드시 업데이트 옵션을 원래대로 돌려 놓을 것!

   * 업데이트가 잘 되고 나면,
     http://new.palpal.org/user/login 을 통해
     예전 관리자 아이디로 로그인이 잘 되는지 확인해 보자.

5. 보통 메이저 업그레이드에서는 "CCK" 필드들은 별로 애를 먹지 않고
   업그레이드가 잘 되는 편이다. 하지만 "View"관련 기존 정보들은
   업그레이드가 편하지 않거나 잘 되지 않는다.

   * 이런 경우, 할 수 없이 기존 사이트를 참고삼아 뷰를 일일이 재설정한다.
   * 혹은 old 뷰 Export / new 뷰 Import 로 편하게 할 수도 있다. (5->6 가능)

6. 업그레이드가 잘 끝났다면,
   sites/new.palpal.org 폴더명을
   sites/palpal.org 로 바꾸고,
   도메인 IP 정보를 새 서버 쪽으로 설정하면 끝난다. (vhosts도 잘 확인 요망)

   예) 기존 palpal.org 212.13.44.222      <== 새 버전의 설치 호스트 아이피.
       신규 new.palpal.org 212.13.44.222  <== 새 버전 테스트 끝났으니 지워도 무방.

_________________________________

0a. [VERY IMPORTANT!] To login with user 1 (administrator) in Drupal 5.
(If your site is very popular, so you must concern about that a new article will be written during the upgrade work. You need to do #STEP 3 (Place the site in "Off-line" mode).

[Preparation] Please capture or save the original homepage layout.

[Preparation] Important!!! Please save and test the blocks on the new theme.

[Preparation] If using a custom or contributed theme, switch to a core theme, such as Garland.

[Preparation] Disable all custom and contributed modules. *** Please capture or save the checked list in advance.

* To check previous modules and themes by sql query.

(You have to check the compatibility of new version drupal.)

select * from system WHERE status=1 ORDER BY name;
or ( maybe you don't need the core module... )
select * from system WHERE status=1 AND substring(filename,1,7)!='modules' ORDER BY name;

(Please memo the above results - modules/themes)

[Preparation] Backup View List

0b. [VERY IMPORTANT!] To turn off the feature of "Clean URL" at old site of drupal5.

(Some Apache environment does not support this feature.
So you cannot login again...)

0c. To prepare the new DB for drupal6.

MySQL Database > make the blank DB with utf-8
We create this DB under the name of "drupal6db".

0d. copy the old drupal5 db into "drupal6db".

NOTICE! - You have to copy drupal5 DB into drupal6 DB.
(We recommend the tool "SQLYog" which is enable to copy the database between MySQL servers)

0e. (In case of your machine and environment)
To update the "hosts" and "vhosts" file, and restart Apache gracefully.
We set HOSTNAME of new drupal6 machine under the name of "www.example.com".

1. Backup your database and Drupal directory at drupal5.

Specially your "sites" directory which contains your configuration file and added modules and themes, any contributed or custom modules in your "modules" directory, and your "files" directory which contains uploaded files. If other files have modifications, such as .htaccess or robots.txt, those should be backed up as well.

Note: for a single site setup, the configuration file is the "settings.php" file located at sites/default/settings.php. The default.settings.php file contains a clean copy for restoration purposes, if required.

For multisite configurations, the configuration file is located in a structure like the following:

sites/default/settings.php
sites/example.com/settings.php
sites/sub.example.com/settings.php
sites/sub.example.com.path/settings.php

More information on multisite configuration is located in INSTALL.txt.

1b. Install the new source of drupal 6 at new machine.

2. [Skip in some case] To log on as the user with user ID 1.

3. [Skip in some case] Place the site in "Off-line" mode.

4. [Skip in some case] If using a custom or contributed theme, switch to a core theme, such as Garland or Bluemarine.

5. [Skip in some case] Disable all custom and contributed modules.

6. [Skip in some case] Remove all old files and directories from the Drupal installation directory.

7. Unpack the new files and directories into the Drupal 6 installation directory.

8. Copy your backed up "files" and "sites" directories to the Drupal 6 installation directory. If other system files such as .htaccess or robots.txt were customized, re-create the modifications in the new
versions of the files using the backups taken in step #1.

9. Verify the new configuration file to make sure it has correct information. ex) DB Connection String...

10. [VERY IMPORTANT!] Run update.php by visiting http://www.example.com/update.php (replace www.example.com with your Drupal installation's domain name and path). This step will update the core database tables (maybe drupal5 DB) to the new Drupal 6 installation.

Note: if you are unable to access update.php do the following:

- Open your settings.php with a text editor.

- There is a line that says $update_free_access = FALSE;
Change it to $update_free_access = TRUE;

- Once update.php is done, you must change the settings.php file
back to its original form with $update_free_access = FALSE;

11. Ensure that the versions of all custom and contributed modules match the new Drupal version to which you have updated.

For a major update, such as from 5.x to 6.x, modules from previous versions will not be compatible and updated versions will be required.

- For contributed modules, check http://drupal.org/project/modules
for the version of a module matching your version of Drupal.

- For custom modules, review http://drupal.org/update/modules to
ensure that a custom module is compatible with the current version.

12. Re-enable custom and contributed modules and re-run update.php to update custom and contributed database tables.

13. Return the site to its original theme (if you switched to a core
theme like Garland or Bluemarine in step #4). If your site uses a
custom or contributed theme, make sure it is compatible with your
version of Drupal.

- For contributed themes, check http://drupal.org/project/themes
for the version of a theme matching your version of Drupal.

- For custom themes, review http://drupal.org/update/theme to ensure that a custom theme is compatible with the current version.

14. [Ignored by this method] Finally, return your site to "Online" mode so your visitors may resume browsing. As in step #3, this option is available in your administration screens at http://www.example.com/?q=admin/settings/site-maintenance
(replace www.example.com with your installation's domain name and path).

15. To turn ON the feature of "Clean URL"

16. You need that check the file-system/path of drupal.
ex) virtual hosts - sites/@domain_name@/files

17. To restore the "hosts" file.

18. If the new drupal 6 site ("www.example.com") is no problem,
Please copy the source and DB into the original drupal5 server.

19. Test in the original server which is upgraded.

Comments

슬슬 드루팔 7이 대세가 될 듯 한데, 왜 드루팔

슬슬 드루팔 7이 대세가 될 듯 한데, 왜 드루팔 6으로의 업그레이드 글만 나와 있을까요?

이유가 몇몇 있습니다.

- 근본적으로 업그레이드 방식이 비슷할 거라 봅니다.
드루팔의 최고 강점 중 하나인 배포의 편의성, 버전 관리의 용이성으로 볼 때, 드루팔 7로의 버전 업그레이드도 비슷할 겁니다.
(솔직히 말씀드리자만, 2011년 여름 기준으로, 게으른 드루지기는 아직 드루팔 6에서 7로 업그레이드 안해 봤습니다. 필요성을 못느끼거든요. 버전 7로 새로 시작하는 경우는 있지요.)

- 얼리어답터는 피곤하답니다.
드루팔 7을 본격적인 실제 서비스로 운영하기에는 2011년 여름 기준으로, 글쎄요... 입니다.
관련 모듈이나 테마도 부족하고... 7.5 정도 되면 본방 사이트를 하나 열지도 모르겠습니다.
드루팔 6이 메인인 현재, 굳이 7로 급하게 가야할 이유를 못느낍니다.
다만 버전 7에 대한 공부는 게을리 하면 안되겠죠. 새로운 개념 등등.
공부는 하되, 실제 서비스는 안정된 예전 버전으로...

이상입니다.

Good URL for Major Upgrade -

Good URL for Major Upgrade - http://drupal.org/node/340073