# \[Paid\] Need a Vanilla 2 Import tool

**URL:** https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852
**Category:** Marketplace
**Created:** [18 באפריל,‏ 2014,‏ 4:42am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852 "2014-04-18T04:42:08Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![rjd22](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rjd22/32/114685_2.png) [@rjd22](https://meta.discourse.org/u/rjd22)
#### Post date: [3 באוגוסט,‏ 2014,‏ 8:08pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/21 "2014-08-03T20:08:37Z")

</div>

I’m also really in need of the importer. I do want to fix it myself if someone can explain to me how to debug it. Since it doesn’t really throw clear error messages.

---

<div class="post-metadata">

### Author: ![cosmo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cosmo/32/33624_2.png) [@cosmo](https://meta.discourse.org/u/cosmo)
#### Post date: [3 באוגוסט,‏ 2014,‏ 11:30pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/22 "2014-08-03T23:30:46Z")

</div>

@rjd22 So, yes, the importer is broken. I’m looking forward to this as well.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [11 באוגוסט,‏ 2014,‏ 4:57pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/23 "2014-08-11T16:57:17Z")

</div>

Just letting you know that I just pushed our new vanilla importer 🙂

[https://github.com/discourse/discourse/commit/d0095ce0415bd7cb77998dd37269752dc6988135](https://github.com/discourse/discourse/commit/d0095ce0415bd7cb77998dd37269752dc6988135)

You will need to export your vanilla forum using [Vanilla Porter](https://github.com/vanilla/porter) and then run:

```shell
./launcher enter app
su discourse
cd /var/www/discourse
RAILS_ENV=production ruby script/import_scripts/vanilla.rb path/to/vanilla/exporter/file.txt

```

---

<div class="post-metadata">

### Author: ![pnikosis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pnikosis/32/114756_2.png) [@pnikosis](https://meta.discourse.org/u/pnikosis)
#### Post date: [13 באוגוסט,‏ 2014,‏ 12:03am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/24 "2014-08-13T00:03:44Z")

</div>

Thanks for the amazing work (it’s hard to even imagine how much work is to create an importer). I failed to run it anyway, this is the log I got… I’m not very good at… well nothing around here, mostly a Java developer myself, so I don’t quite get what I’m doing wrong:

```
2014-08-13T00:00:20Z 11640 TID-ovochl8d0 INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:898:in `rescue in connect': FATAL: role "root" does not exist (ActiveRecord::NoDatabaseError)
Run `$ bin/rake db:create db:migrate` to create your database
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `connect'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
        from /usr/local/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
...

```

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [13 באוגוסט,‏ 2014,‏ 12:16am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/25 "2014-08-13T00:16:44Z")

</div>

You’re running the import script as `root`. `root` is the equivalent of the `SYSTEM` account on Windows. You should not be running programs as `root` unless you intend to do maintenance on the operating system.

If you’re using the default recommended install and `./launcher enter app`, you should switch to the proper unprivileged user account by running `exec su - discourse`.

---

<div class="post-metadata">

### Author: ![pnikosis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pnikosis/32/114756_2.png) [@pnikosis](https://meta.discourse.org/u/pnikosis)
#### Post date: [13 באוגוסט,‏ 2014,‏ 9:30pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/26 "2014-08-13T21:30:03Z")

</div>

You are right, I’m such a dumbass, I realized that later. Thanks for the help!

---

<div class="post-metadata">

### Author: ![cosmo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cosmo/32/33624_2.png) [@cosmo](https://meta.discourse.org/u/cosmo)
#### Post date: [14 באוגוסט,‏ 2014,‏ 2:59am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/27 "2014-08-14T02:59:34Z")

</div>

Hey @zogstrip, k, i’m officially stuck on importing. Apologize about the question in advance. I was able to set the chmod of the development.log, but now I need to create “discourse\_development” database. Any help would be appreciate to import vanilla data.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [14 באוגוסט,‏ 2014,‏ 6:30am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/28 "2014-08-14T06:30:42Z")

</div>

Do this instead:

```
RAILS_ENV=production ruby script/import_scripts/vanilla.rb path/to/vanilla/exporter/file.txt

```

---

<div class="post-metadata">

### Author: ![cosmo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cosmo/32/33624_2.png) [@cosmo](https://meta.discourse.org/u/cosmo)
#### Post date: [14 באוגוסט,‏ 2014,‏ 6:46am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/29 "2014-08-14T06:46:16Z")

</div>

@riking That worked! Though got some new errors as well.

```
 RAILS_ENV=production ruby script/impo rt_scripts/vanilla.rb export_openbook_db_2014-08-13_190843.txt
2014-08-14T06:43:43Z 18358 TID-ox4vznp8w INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
parsing file...
reading file...
parsing categories...
parsing comments...
parsing conversations...
parsing conversation_messages...
parsing discussions...
parsing media...
parsing permissions...
parsing roles...
parsing users...
parsing user_conversations...
parsing user_discussions...
parsing user_roles...
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_r ecord/attribute_assignment.rb:50:in `rescue in _assign_attribute': unknown attri bute: avatar_url (ActiveRecord::UnknownAttributeError)
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/attribute_assignment.rb:45:in `_assign_attribute'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/attribute_assignment.rb:32:in `block in assign_attributes'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/attribute_assignment.rb:26:in `each'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/attribute_assignment.rb:26:in `assign_attributes'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/core.rb:455:in `init_attributes'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/core.rb:198:in `initialize'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/inheritance.rb:30:in `new'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4 /lib/active_record/inheritance.rb:30:in `new'
        from /var/www/discourse/script/import_scripts/base.rb:244:in `create_use r'
        from /var/www/discourse/script/import_scripts/base.rb:208:in `block in c reate_users'
        from /var/www/discourse/script/import_scripts/base.rb:197:in `each'
        from /var/www/discourse/script/import_scripts/base.rb:197:in `create_use rs'
        from script/import_scripts/vanilla.rb:79:in `import_users'
        from script/import_scripts/vanilla.rb:17:in `execute'
        from /var/www/discourse/script/import_scripts/base.rb:69:in `perform'
        from script/import_scripts/vanilla.rb:240:in `<main>'

```

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [14 באוגוסט,‏ 2014,‏ 7:44am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/30 "2014-08-14T07:44:33Z")

</div>

Sorry, this should be fixed now 🐩

[https://github.com/discourse/discourse/commit/61842157bf7e96b2a23168cc8d06eaafb82c6f61](https://github.com/discourse/discourse/commit/61842157bf7e96b2a23168cc8d06eaafb82c6f61)

---

<div class="post-metadata">

### Author: ![cosmo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cosmo/32/33624_2.png) [@cosmo](https://meta.discourse.org/u/cosmo)
#### Post date: [14 באוגוסט,‏ 2014,‏ 8:20am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/31 "2014-08-14T08:20:34Z")

</div>

@zogstrip Awesome! Seems like everything is importing properly as I type this. Thanks!

---

<div class="post-metadata">

### Author: ![cosmo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cosmo/32/33624_2.png) [@cosmo](https://meta.discourse.org/u/cosmo)
#### Post date: [14 באוגוסט,‏ 2014,‏ 8:24am UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/32 "2014-08-14T08:24:25Z")

</div>

@zogstrip I spoke too soon. Seems like it’s getting stuck at something called ‘Private Topics’. Also, seems like the posts that were imported, none of the embedded images are working.

```
RAILS_ENV=production ruby script/impo rt_scripts/vanilla.rb export_somedomain_db_2014-08-14_001737.txt
2014-08-14T08:19:46Z 413 TID-owzetv7vc INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
parsing file...
reading file...
parsing categories...
parsing comments...
parsing conversations...
parsing conversation_messages...
parsing discussions...
parsing media...
parsing permissions...
parsing roles...
parsing users...
parsing user_conversations...
parsing user_discussions...
parsing user_roles...
       14 / 14 (100.0%)
importing first-level categories...
    General
    Videos
        
importing topics...
      111 / 111 (100.0%)
importing posts...
     1103 / 1103 (100.0%)
importing private topics...
script/import_scripts/vanilla.rb:199:in `block in import_private_topics': undefined method `[]' for nil:NilClass (NoMethodError)
        from /var/www/discourse/script/import_scripts/base.rb:325:in `block in create_posts'
        from /var/www/discourse/script/import_scripts/base.rb:324:in `each'
        from /var/www/discourse/script/import_scripts/base.rb:324:in `create_posts'
        from script/import_scripts/vanilla.rb:178:in `import_private_topics'
        from script/import_scripts/vanilla.rb:23:in `execute'
        from /var/www/discourse/script/import_scripts/base.rb:69:in `perform'
        from script/import_scripts/vanilla.rb:240:in `<main>'

```

---

<div class="post-metadata">

### Author: ![cosmo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cosmo/32/33624_2.png) [@cosmo](https://meta.discourse.org/u/cosmo)
#### Post date: [15 באוגוסט,‏ 2014,‏ 10:50pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/33 "2014-08-15T22:50:39Z")

</div>

Hey @zogstrip, any thoughts on the errors above?

---

<div class="post-metadata">

### Author: ![ashledombos](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashledombos/32/114818_2.png) [@ashledombos](https://meta.discourse.org/u/ashledombos)
#### Post date: [26 באוגוסט,‏ 2014,‏ 12:13pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/34 "2014-08-26T12:13:49Z")

</div>

Hello, I’m also curious to know the state of Vanilla 2 importer 🙂

And how are the lists of emoticons (yahoo messenger style) converted to discourse emojis?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [26 באוגוסט,‏ 2014,‏ 12:19pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/35 "2014-08-26T12:19:03Z")

</div>

> [@ashledombos](#):
>
> And how are the lists of emoticons (yahoo messenger style) converted to discourse emojis?

Do you have a list of these emoticons?

---

<div class="post-metadata">

### Author: ![ashledombos](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashledombos/32/114818_2.png) [@ashledombos](https://meta.discourse.org/u/ashledombos)
#### Post date: [26 באוגוסט,‏ 2014,‏ 12:29pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/36 "2014-08-26T12:29:18Z")

</div>

Yes!  
This is exactly the same list as [yahoo messenger](https://messenger.yahoo.com/features/emoticons/)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [26 באוגוסט,‏ 2014,‏ 12:42pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/37 "2014-08-26T12:42:03Z")

</div>

We do have some of them, but most of them won’t be translated though. Is that something Vanilla has natively or is it a plugin?

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [26 באוגוסט,‏ 2014,‏ 12:44pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/38 "2014-08-26T12:44:52Z")

</div>

I believe it’s a plugin that is included in the main package but isn’t enabled by default.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [26 באוגוסט,‏ 2014,‏ 12:47pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/39 "2014-08-26T12:47:37Z")

</div>

I’m fine with adding a pre-processing step in the [vanilla importer](https://github.com/discourse/discourse/blob/master/script/import_scripts/vanilla.rb) to _translate_ these emoticons to the ones we support if there is a match. PRs are welcome 😉

---

<div class="post-metadata">

### Author: ![ashledombos](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashledombos/32/114818_2.png) [@ashledombos](https://meta.discourse.org/u/ashledombos)
#### Post date: [26 באוגוסט,‏ 2014,‏ 1:06pm UTC](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852/40 "2014-08-26T13:06:56Z")

</div>

Thank you, I’ll make a test this week and make the report 🙂

[Previous page](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852.md?page=1)

[Next page](https://meta.discourse.org/t/paid-need-a-vanilla-2-import-tool/14852.md?page=3)
