# Migrate a phpBB3 forum to Discourse

**URL:** https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810
**Category:** Migrating to Discourse
**Tags:** how-to
**Created:** [7월 5, 2015, 10:02오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810 "2015-07-05T22:02:57Z")
**Posts on this page:** 20
**Page:** 14

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [1월 21, 2021, 1:12오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/585 "2021-01-21T13:12:41Z")

</div>

현재 스크립트 버전에 몇 가지 버그가 있는 것 같습니다. `settings.yml` 파일을 업데이트하고 `new_categories`와 `category_mappings`가 아래에 표시된 것과 같은지 확인해 주시겠습니까?

```plaintext
new_categories: []
category_mappings: {}

```

---

<div class="post-metadata">

### Author: ![harmakhis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/harmakhis/32/198452_2.png) [@harmakhis](https://meta.discourse.org/u/harmakhis)
#### Post date: [1월 21, 2021, 2:53오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/586 "2021-01-21T14:53:42Z")

</div>

@gerhard 팁 주셔서 감사합니다 .. 바로 시도해볼게요

---

<div class="post-metadata">

### Author: ![harmakhis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/harmakhis/32/198452_2.png) [@harmakhis](https://meta.discourse.org/u/harmakhis)
#### Post date: [1월 26, 2021, 9:59오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/587 "2021-01-26T09:59:45Z")

</div>

정말 감사합니다, 잘 작동했어요

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [1월 26, 2021, 6:13오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/588 "2021-01-26T18:13:13Z")

</div>

게시물이 기존 주제에 병합되었습니다: [Windows 10에서 개발용 Discourse 설치 입문 가이드](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-windows-10-for-development/75149/75)

---

<div class="post-metadata">

### Author: ![TheAlmightyZach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thealmightyzach/32/207550_2.png) [@TheAlmightyZach](https://meta.discourse.org/u/TheAlmightyZach)
#### Post date: [1월 28, 2021, 6:55오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/589 "2021-01-28T06:55:28Z")

</div>

정말 좋은 소식입니다! 감사합니다. 3.2 sqldump 테스트용 파일을 가지고 있으니 이것으로 조금 놀아볼 예정이고, 3.3 버전도 복사해서 시도해 볼 겁니다. 솔직히 여러분이 직접 처리해 주셨으면 좋았을 텐데, 지갑이 너무 텅 비어 있어서요.. 헤헤.

어쨌든 다시 한번 감사드리며, 이것을 시도해 볼 수 있기를 기대합니다!

---

<div class="post-metadata">

### Author: ![TheAlmightyZach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thealmightyzach/32/207550_2.png) [@TheAlmightyZach](https://meta.discourse.org/u/TheAlmightyZach)
#### Post date: [2월 3, 2021, 6:18오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/590 "2021-02-03T06:18:22Z")

</div>

가져오기(import) 과정에서 문제가 발생하고 있습니다. 가져오기 스크립트를 실행하면 sqldump가 입력되고 "phpBB3 가져오기를 시작합니다…"라는 메시지가 표시되지만, 즉시 다음과 같은 일반 오류와 함께 트레이스백이 발생합니다.

> /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.0/lib/bootsnap/compile\_cache.rb:29:in `permission\_error’: bootsnap doesn’t have permission to write cache entries in ‘tmp/cache/bootsnap/compile-cache’ (or, less likely, doesn’t have permission to read ‘/usr/local/lib/ruby/2.7.0/set.rb’) (Bootsnap::CompileCache::PermissionError)

명백히某种의 권한 오류인 것 같은데, 이를 수정하기 위해 무엇을 해야 하는지 파악하려고 합니다. 도움을 주시면 감사하겠습니다!

---

<div class="post-metadata">

### Author: ![TheAlmightyZach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thealmightyzach/32/207550_2.png) [@TheAlmightyZach](https://meta.discourse.org/u/TheAlmightyZach)
#### Post date: [2월 11, 2021, 7:11오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/592 "2021-02-11T07:11:10Z")

</div>

업데이트! 해결했습니다! 컨테이너에서 chmod를 빠르게 실행한 결과 해당 문제가 수정되었습니다.

제안해 주신 수정 사항을 적용하여 phpBB 3.3 데이터베이스로 테스트해 봤는데, 완벽하게 작동합니다! 좀 더 철저한 테스트를 진행 중이지만, 예상대로 몇 가지 bbcode 관련 문제를 제외하면 거의 모든 것이 정상적으로 준비되었습니다. 사용자, 메시지, 게시물 등 모든 것이 제대로 복사되었습니다. 유일하게 제대로 작동하지 않은 것으로 보이는 것은 비밀번호 마이그레이션입니다. 이는 사소한 문제입니다. 모듈이 설치되어 있고 로드되는 것을 확인했기 때문에 왜 이전되지 않았는지 확실하지 않습니다. 하지만 상관없습니다. 드디어 phpBB를 버릴 수 있게 되어 매우 기대됩니다.

@gerhard 님, 귀한 작업을 해주셔서 다시 한번 감사드립니다!

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [2월 11, 2021, 12:00오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/593 "2021-02-11T12:00:39Z")

</div>

좋은 정보네요. BBCode 관련 문제의 예시를 DM으로 보내 주세요. `phpbb_posts.post_text` 컬럼의 값에 관심이 있습니다.

---

<div class="post-metadata">

### Author: ![tumbano](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@tumbano](https://meta.discourse.org/u/tumbano)
#### Post date: [2월 18, 2021, 4:28오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/594 "2021-02-18T16:28:18Z")

</div>

phpbb3(.2.7)를 2번 가져오기를 시도했습니다.  
첫 번째 시도에서는 아무 주제도 가져오지 못했고 사용자들도 엉망이 되었습니다.  
ubuntu를 처음부터 다시 설치하고 모든 것을 다시 진행했지만, 이번에는 `import_phpbb3.sh` 단계에서 막혔습니다. 데이터베이스를 로드한 후 다음과 같은 오류가 발생하여 중단됩니다:

```plaintext
The phpBB3 import is starting...

Traceback (most recent call last):
        20: from script/import_scripts/phpbb3.rb:13:in `<main>'
        19: from script/import_scripts/phpbb3.rb:14:in `<module:ImportScripts>'
        18: from script/import_scripts/phpbb3.rb:15:in `<module:PhpBB3>'
        17: from script/import_scripts/phpbb3.rb:15:in `require_relative'
        16: from /var/www/discourse/script/import_scripts/phpbb3/support/settings.rb:5:in `<top (required)>'
        15: from /var/www/discourse/script/import_scripts/phpbb3/support/settings.rb:5:in `require_relative'
        14: from /var/www/discourse/script/import_scripts/base.rb:16:in `<top (required)>'
        13: from /var/www/discourse/script/import_scripts/base.rb:16:in `require_relative'
        12: from /var/www/discourse/config/environment.rb:4:in `<top (required)>'
        11: from /var/www/discourse/config/environment.rb:4:in `require'
        10: from /var/www/discourse/config/application.rb:70:in `<top (required)>'
         9: from /var/www/discourse/config/application.rb:71:in `<module:Discourse>'
         8: from /var/www/discourse/config/application.rb:96:in `<class:Application>'
         7: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `require'
         6: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:291:in `load_dependency'
         5: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `block in require'
         4: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
         3: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
         2: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
         1: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- mocha/version (LoadError)

```

도움 주시면 감사하겠습니다.

---

<div class="post-metadata">

### Author: ![TheAlmightyZach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thealmightyzach/32/207550_2.png) [@TheAlmightyZach](https://meta.discourse.org/u/TheAlmightyZach)
#### Post date: [2월 19, 2021, 2:43오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/595 "2021-02-19T14:43:30Z")

</div>

phpBB 3.3 업데이트 관련 소식입니다. 포럼을 이전하기 전에 이것을 알았으면 좋았을 텐데, 3.3 버전에서 첨부 파일 처리 방식이 변경되었습니다. 이제 물리적 파일 이름 대신 각 파일에 고유 식별자가 부여되며, 이는 phpbb\_attachments 테이블에서 교차 참조됩니다. 고유 파일 식별자는 USERID\_possiblyrandomstring 형식입니다.

phpBB 3.3이 테이블에서 확장자를 자동으로 파악하기 때문에 파일 확장자나 기타 정보는 없습니다. 이 과정을 자동화하는 방법을 확신할 수 없어서, 현재는 배치 단위로 나누어 기존 이미지들을 복원하고 있습니다. 3.3 업데이트 이전의 이미지 백업이 있으므로 처리 속도를 높일 수 있을지도 모르지만, 3.3에서 가져오기를 수행하면 첨부 파일이 손상될 수 있다는 점에 유의하세요. 저처럼 수천 개의 첨부 파일이 있다면 꽤 고생스러운 일이 될 것입니다. 글쎄요! 자발적으로 실험 대상이 된 운명이었네요.

---

<div class="post-metadata">

### Author: ![TheAlmightyZach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thealmightyzach/32/207550_2.png) [@TheAlmightyZach](https://meta.discourse.org/u/TheAlmightyZach)
#### Post date: [2월 19, 2021, 2:45오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/596 "2021-02-19T14:45:56Z")

</div>

그게 제공된 모든 정보였나요? 제 경우에는 권한 문제로 인해 tmp/ 디렉터리를 로드할 수 없다고 나와서, import 컨테이너 안에 있을 때 해당 디렉터리에 chmod -R 777을 실행했습니다. 다시 말하지만, 이건 import 작업에만 적용되는 것이므로 여러분의 “app” 컨테이너에는 영향을 주지 않습니다.

---

<div class="post-metadata">

### Author: ![trippo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trippo/32/121195_2.png) [@trippo](https://meta.discourse.org/u/trippo)
#### Post date: [2월 20, 2021, 8:30오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/597 "2021-02-20T08:30:13Z")

</div>

phpbb 3.2에서 가져오는 데는 성공했지만, 다음과 같은 작업을 수행해야 했습니다:

- 내부 MariaDB에 수동으로 DB를 가져왔습니다: `mysql -u root -p phpbb < /shared/import/mysql/data/phpbb_mysql.sql`

- `settings.yml` 파일을 `new_categories: [] category_mappings: {}`로 설정했습니다.

- 게시글과 주제가 첫 시도 시 오류를 일으켜 가져오기 스크립트를 여러 번 반복 실행해야 했습니다.

그 이후로는 모두 정상적으로 작동했습니다…

---

<div class="post-metadata">

### Author: ![Mikhail\_Tyuftyaev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikhail_tyuftyaev/32/237998_2.png) [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)
#### Post date: [3월 3, 2021, 2:12오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/598 "2021-03-03T14:12:54Z")

</div>

모두 안녕하세요.  
문제가 있습니다.  
[https://discourse.example.com/](https://discourse.example.com/) 이 있습니다.  
[https://forum.old.example.com/](https://forum.old.example.com/) 에서 데이터베이스를 가져오려고 합니다.  
해당 가이드의 모든 단계를 따랐습니다.  
데이터베이스 덤프를 만들어 `phpbb_mysql.sql`이라는 이름으로 저장하고 아래 위치에 넣었습니다.

> /var/discourse/shared/standalone/import/data/

그 다음

> /var/discourse/launcher enter import  
> import\_phpbb3.sh

을 실행하면 다음 오류가 발생합니다:

> Table ‘phpbb.phpbb\_config’ doesn’t exist

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/f/1f38876263533b56e3bd527023a9bceb224e53b2.png)

settings.yml 설정 문제일까요?

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/2/a210f59a533be4646a995105a89077e30fb4b974.png)

이 문제를 해결하는 데 도움을 주십시오.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [3월 3, 2021, 2:17오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/599 "2021-03-03T14:17:05Z")

</div>

`table_prefix`가 올바른지 확인하세요. 컨트롤 패널에 `phpbb_`로 표시되어 있나요?

 ![backup](https://global.discourse-cdn.com/meta/original/3X/9/9/9908c2030af9b3bf9559261ef9e946c295f5bab4.png)

---

<div class="post-metadata">

### Author: ![Mikhail\_Tyuftyaev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikhail_tyuftyaev/32/237998_2.png) [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)
#### Post date: [3월 3, 2021, 3:12오후 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/600 "2021-03-03T15:12:45Z")

</div>

네, 제 접두사는 정확합니다

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/2/b2241566d4fce8aab066e2c59e1cb3d36ea145d0.png)

---

<div class="post-metadata">

### Author: ![cvx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cvx/32/152146_2.png) [@cvx](https://meta.discourse.org/u/cvx)
#### Post date: [3월 4, 2021, 7:58오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/601 "2021-03-04T07:58:36Z")

</div>

제가 제대로 보고 있다면, settings.yml의 `schema`는 `teamlab_forum_saas`로 설정되어야 합니다.

---

<div class="post-metadata">

### Author: ![Mikhail\_Tyuftyaev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikhail_tyuftyaev/32/237998_2.png) [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)
#### Post date: [3월 4, 2021, 8:29오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/602 "2021-03-04T08:29:33Z")

</div>

이것은 데이터베이스의 이름입니다. 이것이 스키마인가요?

---

<div class="post-metadata">

### Author: ![cvx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cvx/32/152146_2.png) [@cvx](https://meta.discourse.org/u/cvx)
#### Post date: [3월 4, 2021, 8:32오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/603 "2021-03-04T08:32:39Z")

</div>

맞습니다. MySQL에서 [`schema`는 `database`와 동의어입니다](https://dev.mysql.com/doc/refman/8.0/en/glossary.html#glos_schema). 🙂

---

<div class="post-metadata">

### Author: ![Mikhail\_Tyuftyaev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikhail_tyuftyaev/32/237998_2.png) [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)
#### Post date: [3월 4, 2021, 8:41오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/604 "2021-03-04T08:41:36Z")

</div>

잠시만요, 시도해 보겠습니다.

---

<div class="post-metadata">

### Author: ![Mikhail\_Tyuftyaev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikhail_tyuftyaev/32/237998_2.png) [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)
#### Post date: [3월 4, 2021, 8:48오전 UTC](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/605 "2021-03-04T08:48:50Z")

</div>

해결되었습니다. 정말 감사합니다. 👍 👏

[Previous page](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810.md?page=13)

[Next page](https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810.md?page=15)
