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.
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
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.
@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
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.
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
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>'
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>'
@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…
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)]$