[Paid] Need a Vanilla 2 Import tool

Hi all,

I have an existing forum that is running Vanilla 2, I have an export of the database and I’m looking for someone with experience importing from another forum to help.

I see this project on GitHub GitHub - rikkit/discourse-import-phpBB: deprecated phpbb importer for discourse, official solution linked: that looks like exactly what I need, just for phpBB.

From what I can gather it would just need to be modified slightly to reflect the tables that Vanilla rather than the phpBB table names. Ideally you’d be pro at this and able to tell me :smiley:

I’m willing to offer $150 - $200 for a tested importer and someone to walk me through running the import via Skype.

Would be great if you were located in North America for timezones and able to get started on this right away as our current forum is down while I migrate this over.

Takers? Interested?

@zogstrip where are we at on our Vanilla converter?

Finally pushed it :goat:

@ThatLeeGuy If you have a running instance of Discourse, you should update to latest and run the thor vanilla:import -f /path/to/vanilla-export.txt command :wink:

2 Likes

That is awesome @zogstrip and @codinghorror, Thank you!!

Can you point me to the format that .txt file needs?

I have a .sql dump currently.

It’s based on a Vanilla 2 export generated using VanillaPorter (which I believe is the standard export mechanism in Vanilla).

Ok, I managed to export that and I have it uploaded, though I cannot seem to get it to work as I cannot find thor or where I should be executing that from.

I installed via https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md and I’m reasonable with my way around the command line, just need a couple pointers to get me started.

Do you have time to help me out?

You should run that command from inside the container.

Here’s how to do it:

cd /var/docker
# copy your export inside the shared folder (ie. accessible from inside the container)
cp /path/to/your/export.txt shared/standalone/
# ssh into the container
./launcher ssh app
# launch the command
thor vanilla:import -f /shared/export.txt
# ------
# if this does not work, try switching to discourse user
su -l discourse
cd /var/www/discourse
# run the command
RAILS_ENV=production thor vanilla:import -f /shared/export.txt
1 Like

And if that doesn’t work,

RAILS_ENV=production bundle exec thor vanilla:import -f /shared/export.txt
2 Likes

When I tried @zogstrip’s two methods it gave me thor not found.
When I try that @riking’s method it starts and then gives me

root@discourse-app:/var/www/discourse# RAILS_ENV=production bundle exec thor vanilla:import -f /shared/export.txt
loading rails...
enabling rate limiter...
/var/www/discourse/lib/tasks/vanilla.thor:317:in `enable_rate_limiter': uninitialized constant Thor::Sandbox::Vanilla::RateLimiter (NameError)
    from /var/www/discourse/lib/tasks/vanilla.thor:33:in `ensure in import'
    from /var/www/discourse/lib/tasks/vanilla.thor:33:in `import'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/runner.rb:36:in `method_missing'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:29:in `run'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:128:in `run'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/bin/thor:6:in `<top (required)>'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `load'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `<main>'

Thoughts?

Haha, yes, forgot that part.

Working!

1 Like

It ran and imported a bunch of users and then threw this error

/var/www/discourse/lib/tasks/vanilla.thor:149:in `strptime': invalid date (ArgumentError)
    from /var/www/discourse/lib/tasks/vanilla.thor:149:in `block in create_categories'
    from /var/www/discourse/lib/tasks/vanilla.thor:138:in `each'
    from /var/www/discourse/lib/tasks/vanilla.thor:138:in `create_categories'
    from /var/www/discourse/lib/tasks/vanilla.thor:25:in `import'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/runner.rb:36:in `method_missing'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:29:in `run'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:128:in `run'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/bin/thor:6:in `<top (required)>'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `load'
    from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `<main>'

It looks like all the users are there, so that part ran flawlessly.

@zogstrip Do we need to make categories first? Is that possibly the issue? Can we rerun it without it trying to import the users again or will we have to delete everything?

And the bounty still stands, even though you included it as part of the core, you @riking and @codinghorror can have some beer $ for the weekend on me.

How you divide it up, well, I’ll leave that to you guys to decide…

1 Like

@ThatLeeGuy Any news on this? I plan to replace Vanilla with Discourse but i want to make sure it works correctly first.

Just gave it a try, and i stuck at enabling rate limiter...:

[vagrant@precise32:/vagrant (master)]$ thor vanilla:import -f shared/vanilla.txt

WARNING: --------------------------------------------------------------------------
You are running an old version of bundler, please update by running: gem install bundler

loading rails...
2014-07-17T09:56:01Z 29227 TID-14mou4 INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
reading file...
parsing activities...
parsing categories...
parsing comments...
parsing conversations...
parsing conversation_messages...
parsing discussions...
parsing permissions...
parsing roles...
parsing users...
parsing user_conversations...
parsing user_discussions...
parsing user_meta...
parsing user_roles...
disabling rate limiter...
creating users...
enabling rate limiter...
/usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:50:in `rescue in _assign_attribute': unknown attribute: bio_raw (ActiveRecord::UnknownAttributeError)
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:45:in `_assign_attribute'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:32:in `block in assign_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:26:in `each'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:26:in `assign_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/core.rb:455:in `init_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/core.rb:198:in `initialize'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/inheritance.rb:30:in `new'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/inheritance.rb:30:in `new'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/validations.rb:39:in `create!'
	from /vagrant/lib/tasks/vanilla.thor:90:in `block in create_users'
	from /vagrant/lib/tasks/vanilla.thor:86:in `each'
	from /vagrant/lib/tasks/vanilla.thor:86:in `create_users'
	from /vagrant/lib/tasks/vanilla.thor:22:in `import'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `load'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `<main>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `eval'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `<main>'
[vagrant@precise32:/vagrant (master)]$

Any ideas?

That script is out of date and needs to be ported to the new structure. @neil will probably look at it next week.

1 Like

Ah okay, thanks! I’ll wait for @neil then :slight_smile:

Any news on this, @neil?

We are kind of busy with V1 work, and no customers need a Vanilla import right now. It may be a month or two.

Ah okay. I’m really looking forward to the Vanilla importer :slight_smile: