# 단일 주제 내보내는 가장 쉬운 방법은?

**URL:** https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483
**Category:** Support
**Created:** [1월 13, 2020, 7:20오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483 "2020-01-13T19:20:03Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![orangeandblack5](https://avatars.discourse-cdn.com/v4/letter/o/edb3f5/32.png) [@orangeandblack5](https://meta.discourse.org/u/orangeandblack5)
#### Post date: [1월 13, 2020, 7:20오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/1 "2020-01-13T19:20:03Z")

</div>

안녕하세요,

저희는 하나의 Discourse 인스턴스에서 특정 주제 하나를 로컬 저장소로, 또는 더 좋다면 다른 인스턴스로 내보내려 하고 있습니다. 원래 인스턴스의 관리자들은 이 이동을 지지하지만, 이동 작업을 위해 많은 시간을 할애하길 원하지는 않습니다. 따라서 비교적 빠르고 간편하게 해결할 수 있는 가능한 모든 방법을 찾고 있습니다.

현재까지 두 가지 옵션을 고려하고 있습니다:

> [@Move topics from one Discourse instance to another](https://meta.discourse.org/t/topic-and-category-export-import/38930?u=orangeandblack5):
>
> Need to move some stuff from one instance of Discourse to another? There is a command line tool to export a topic, a set of topics, or an entire category, and another to import them in at the other end. Topic Export/Import one or more topics and their replies the users who posted in the topic Category Export/Import the category and all its subcategories its security settings custom groups mentioned in the security settingswarning if any of the groups have ‘membership requests’ enable…

> **[GitHub - pfaffman/discourse-downloader: Download a Discourse topic for offline analysis](https://github.com/pfaffman/discourse-downloader)**
>
> Download a Discourse topic for offline analysis

첫 번째 링크는 우리의 최종 목표를 달성하는 가장 직접적인 방법임이 분명하지만, 이동 지원을 위해 관리자들이 상당한 양의 작업을 수행해야 하는 것 같아 동의하지 않을 것 같아 @pfaffman 님의 Discourse Downloader도 함께 고려하고 있습니다.

그러나 우리의 필요와 제약 조건을 고려할 때 이 두 옵션 중 하나가 명확히 더 나은 경우, 이 중 하나를 사용해보았거나 이 과정에 대해 저희보다 더 잘 알고 계신 분들의 조언을 정말로 듣고 싶습니다. 또한, 저희가 아직 발견하지 못한 더 나은 다른 옵션이 있다면 알려주시면 감사하겠습니다!

시간 내어 읽어주셔서 감사합니다!

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [1월 13, 2020, 7:44오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/2 "2020-01-13T19:44:28Z")

</div>

> [@orangeandblack5](#):
>
> 그쪽에서 이동을 지원하기 위해 상당한 양의 작업이 필요해 보인다는 점

토픽/카테고리 가져오기/내보내기 명령줄 도구는 결국 몇 가지 명령어와 최대 5분의 작업으로 요약됩니다.

다른 인스턴스로 사용자를 복사할 때의 법적 영향을 고려해 보셨나요?

---

<div class="post-metadata">

### Author: ![orangeandblack5](https://avatars.discourse-cdn.com/v4/letter/o/edb3f5/32.png) [@orangeandblack5](https://meta.discourse.org/u/orangeandblack5)
#### Post date: [1월 13, 2020, 7:46오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/3 "2020-01-13T19:46:03Z")

</div>

_모든_ 사용자가 이 이동을 동의하고 있으므로, 문제가 되지는 않을 것으로 예상됩니다.

다른 의견이 있으시면 알려주세요!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 13, 2020, 7:51오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/4 "2020-01-13T19:51:36Z")

</div>

> [@orangeandblack5](#):
>
> 우리는 하나의 디스코urs 인스턴스에서 단일 주제를 로컬 저장소나, 더 좋다면 다른 인스턴스로 내보내려고 하고 있습니다.

정말 단일 주제인가요? 웹 인터페이스에서 복사해서 붙여넣으면 안 될까요?

수정: 아 맞다. 주제에는 많은 게시물이 있군요. 죄송합니다. ☹

어쨌든, 이제 이해했으니 관리자가 수행할 수 있다면 rake 작업을 사용하겠습니다. 그렇게 어렵지 않을 것 같습니다.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [1월 13, 2020, 7:56오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/5 "2020-01-13T19:56:35Z")

</div>

> [@pfaffman](#):
>
> 웹 인터페이스에서 복사해서 붙여넣기 하면 안 되나요?

가능한 이유:

- 사용자, 업로드, 인용, 좋아요도 함께 가져오고 싶을 때
- 해당 주제에 수천 개의 게시글이 있을 때

---

<div class="post-metadata">

### Author: ![orangeandblack5](https://avatars.discourse-cdn.com/v4/letter/o/edb3f5/32.png) [@orangeandblack5](https://meta.discourse.org/u/orangeandblack5)
#### Post date: [1월 14, 2020, 12:59오전 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/6 "2020-01-14T00:59:34Z")

</div>

자,

관리자들이 두 가지 해결책 모두 거절했는데, 구현하는 데 작업량이 너무 많기 때문이라고 하더군요.

그분들 말씀이고 제 의견은 아니에요. 저도 그 해결책에 동의하지는 않거든요.

관리자 권한 없이, 특정 게시물 하나가 아니라 전체 토픽의 .json 파일을 가져오는 방법을 아시나요?

**수정:** 제목과 더 이상 일치하지 않는 것 같으니, 이건 별도의 토픽으로 올리는 게 가장 좋겠습니다. 그래도 스팸처럼 보여서 그러지는 않을 것 같아요.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [1월 14, 2020, 8:26오전 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/7 "2020-01-14T08:26:17Z")

</div>

> [@orangeandblack5](#):
>
> 관리자님들이 두 가지 솔루션 모두 거절했습니다.

@pfaffman 님의 솔루션을 서버에서 실행할 필요가 없다고 생각합니다. AFAIK(제가 아는 한) 관리자 권한이 필요하지 않습니다.

---

<div class="post-metadata">

### Author: ![orangeandblack5](https://avatars.discourse-cdn.com/v4/letter/o/edb3f5/32.png) [@orangeandblack5](https://meta.discourse.org/u/orangeandblack5)
#### Post date: [1월 14, 2020, 12:07오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/8 "2020-01-14T12:07:03Z")

</div>

API 키가 필요합니다.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [1월 14, 2020, 12:39오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/9 "2020-01-14T12:39:37Z")

</div>

이게 공개 포럼 주제인가요? 그렇다면 API 키 없이도 작동해야 합니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 14, 2020, 5:31오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/10 "2020-01-14T17:31:00Z")

</div>

와! 공개 주제인 경우 API 키가 필요 없도록 작성한 것 같네요.

> [@orangeandblack5](#):
>
> API 키가 필요합니다.

아니면, 아닐 수도 있겠네요?

수정 사항을 적용(pushed)했으니 `git pull`을 실행하면 이제 빈 `apikeys` 파일과 함께 작동해야 합니다. (다만 빈 파일을 직접 생성해야 할 것 같습니다.) 이 도구는 주제를 텍스트 파일로 다운로드합니다.

다만, 저는 이 도구를 오프라인에서의 토론 분석용으로 작성했기 때문에, 일부 작업을 거치지 않으면 얼마나 유용할지 확실하지 않습니다. 로컬로 콘텐츠를 다운로드하는 것은 가능할 것 같지만, 현재 상태로는 다른 Discourse 인스턴스로 이전하는 데는 큰 도움이 되지 못할 것입니다.

다른 Discourse로 이전을 원하고 해당 주제가 공개 주제라면, 이 도구를 다른 용도로 수정해야 합니다. 예산이 있으시다면 저에게 연락하거나 #Marketplace 채널에 게시물을 남겨주세요.

---

<div class="post-metadata">

### Author: ![orangeandblack5](https://avatars.discourse-cdn.com/v4/letter/o/edb3f5/32.png) [@orangeandblack5](https://meta.discourse.org/u/orangeandblack5)
#### Post date: [1월 14, 2020, 5:41오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/11 "2020-01-14T17:41:10Z")

</div>

솔직히 말해서, 그 정도 시간을 들이려면 그냥 해당 토픽을 크롤링해서 개별 .json 파일을 직접 수집하는 코드를 작성했을 것 같아요. ㅋㅋ

불행히도 그 두 가지 옵션에 필요한 리소스를 제공할 수 없어서, 다운로더를 실행하는 것이 제가 할 수 있는 최선의 방법인 것 같습니다.

감사합니다!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 14, 2020, 5:42오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/12 "2020-01-14T17:42:53Z")

</div>

그 코드는 좋은 출발점이 될 수 있습니다. JSON 파일을 다운로드한 후 다른 형식으로 변환하는 작업을 수행합니다.

---

<div class="post-metadata">

### Author: ![orangeandblack5](https://avatars.discourse-cdn.com/v4/letter/o/edb3f5/32.png) [@orangeandblack5](https://meta.discourse.org/u/orangeandblack5)
#### Post date: [1월 14, 2020, 5:43오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/13 "2020-01-14T17:43:21Z")

</div>

도움이 될 것 같아요 - 감사합니다!

---

<div class="post-metadata">

### Author: ![nealmcb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nealmcb/32/107350_2.png) [@nealmcb](https://meta.discourse.org/u/nealmcb)
#### Post date: [7월 20, 2020, 4:11오후 UTC](https://meta.discourse.org/t/easiest-way-to-export-a-single-topic/138483/14 "2020-07-20T16:11:41Z")

</div>

루비 코드를 공유해 주셔서 감사합니다, @pfaffman!

파이썬을 선호하시는 분들을 위해, API와 JSON 파일을 사용하는 방법에 대한 훌륭한 시작점으로 [mcmcclur/ArchiveDiscourse: Code for archiving my Discourse sites](https://github.com/mcmcclur/ArchiveDiscourse)를 참고할 수 있습니다.
