# Migrate topics from one discourse instance to another?

**URL:** https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492
**Category:** Support
**Created:** [November 28, 2016, 6:25pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492 "2016-11-28T18:25:10Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Matthew\_Gaudet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matthew_gaudet/32/116255_2.png) [@Matthew\_Gaudet](https://meta.discourse.org/u/Matthew_Gaudet)
#### Post date: [November 28, 2016, 6:25pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492/1 "2016-11-28T18:25:11Z")

</div>

We want to roll out a new Discourse instance for a larger group of users. We’re considering deprecating our older install, however I’m wondering if it would be possible to migrate selected topics from the old instance to the new instance.

Any advice on this?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [November 28, 2016, 6:54pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492/2 "2016-11-28T18:54:12Z")

</div>

@neil has code that can do that by category not individual topic. Probably best to make sure all the stuff you want to move is in distinct categories.

---

<div class="post-metadata">

### Author: ![Matthew\_Gaudet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matthew_gaudet/32/116255_2.png) [@Matthew\_Gaudet](https://meta.discourse.org/u/Matthew_Gaudet)
#### Post date: [November 28, 2016, 7:00pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492/3 "2016-11-28T19:00:10Z")

</div>

Colour me intrigued 😃

That’s definitely something we could probably arrange to have happen. Does this code have a home for poking at?

(PS: thanks so much)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 28, 2016, 8:05pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492/4 "2016-11-28T20:05:37Z")

</div>

> [@Move topics from one Discourse instance to another](https://meta.discourse.org/t/topic-and-category-export-import/38930):
>
> 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…

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [November 28, 2016, 8:30pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492/5 "2016-11-28T20:30:41Z")

</div>

You can export a list of topics instead of an entire category. See that topic that @falco linked to.

```plaintext
RAILS_ENV=production bundle exec script/discourse export_topics 25 29

```

It takes a list of topic id’s.

---

<div class="post-metadata">

### Author: ![Matthew\_Gaudet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matthew_gaudet/32/116255_2.png) [@Matthew\_Gaudet](https://meta.discourse.org/u/Matthew_Gaudet)
#### Post date: [November 28, 2016, 10:08pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492/6 "2016-11-28T22:08:40Z")

</div>

Awesome. Thanks so much. This looks like exactly what I want.

I’ll report back on any feedback if I have any once I’ve had the opportunity to use it!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/migrate-topics-from-one-discourse-instance-to-another/53492/8 "2024-06-08T12:45:08Z")

</div>

This topic was automatically closed after 2748 days. New replies are no longer allowed.
