Migrating from GetSatisfaction to Discourse

import

(Arpit Jalan) #1

Want to migrate from GetSatisfaction to Discourse? Great! Let’s get started.

What data can be imported?

  • Users
  • Topics & Replies
  • Topic Permalinks

Prerequisites

  1. Set up Discourse development environment on OS X, Ubuntu or Windows.

  2. Install dependencies:

    cd ~/discourse
    echo "gem 'reverse_markdown'" >> Gemfile
    bundle install
    
  3. Clear existing data from your local Discourse instance:

    cd ~/discourse
    rake db:drop db:create db:migrate
    
  4. You will get a bunch of CSV files as export data, rename them all so

    • users.csv is the users table export (it may come from getsatisfaction as Users-Table 1.csv)
    • topics.csv is the topics table export
    • replies.csv is the reply table export

Perform Import

  1. Start import process:

    cd ~/discourse
    bundle exec ruby script/import_scripts/getsatisfaction.rb /home/user/files/path
    

    Replace /home/user/files/path with the path of CSV export files.

  2. Wait until the import is done. You can restart the process if it slows down to a crawl.

  3. Start your Discourse instance: bundle exec rails server

  4. Take backup of the data and upload it on your production site by following this howto.

  5. After restoring, wait for Sidekiq to finish processing all posts. You can watch the progress at /sidekiq. Until this is done, some interactions may not work properly.


Congratulations! You have successfully migrated your site from GetSatisfaction to Discourse! :tada:


(Felix Freiberger) #2

Shouldn’t there be a step Wait for sidekiq to be happy somewhere in here, probably after step 3?


(Arpit Jalan) #3

I, personally, prefer to run Sidekiq on production machine instead of my dev machine.


(Felix Freiberger) #4

In that case, maybe add a step 5:

After restoring, wait for Sidekiq to finish processing all posts. You can watch the progress at /sidekiq. Until this is done, some interactions may not work properly.


(Arpit Jalan) #5

I made the first post wiki, feel free to make the edits as you see fit. :wink:


(RouteXL) #6

Trying to migrate our support community to Discourse, I have set up a development environment and executed all steps until the import successfully. However when starting the import (Perform import step 1), the following error pops up:

loading existing groups...
loading existing users...
loading existing categories...
loading existing posts...
loading existing topics...
loading post mappings...

creating users
script/import_scripts/getsatisfaction.rb:150:in `block in import_users': undefined method `suspended_at' for #<#<Class:0x007f1678a62d00>:0x007f1678a62c60> (NoMethodError)
    from script/import_scripts/getsatisfaction.rb:127:in `block in csv_parse'
    from script/import_scripts/getsatisfaction.rb:91:in `each_line'
    from script/import_scripts/getsatisfaction.rb:91:in `csv_parse'
    from script/import_scripts/getsatisfaction.rb:148:in `import_users'
    from script/import_scripts/getsatisfaction.rb:45:in `execute'
    from /home/ubuntu/discourse/script/import_scripts/base.rb:45:in `perform'
    from script/import_scripts/getsatisfaction.rb:360:in `<main>'

Update
I’ve found the error is triggered because my input has different column names. E.g. the field suspended_at is not in my users.csv file, real_name is realname, and nick is nickname.

Apparently my files are not what is expected. What I downloaded was the Full Data Export, from GetSatisfaction > Configure > Management > Data. Is this the right one? If not, what should I download?


(Erlend Sogge Heggen) #7

Did this get resolved or are you still stuck?


(RouteXL) #8

After some hacking we got it to work. Basically, the some field names were changed or even dropped. So we adjusted the import code to overcome these differences. The permalinks code got broken and we simply skipped that part. Some replies did not come through in the correct order, but it came out good enough for us.

You can check the final result at https://support.routexl.com/