Importing from phpBB3

import
(Cedric) #438

Hi Gerhard ! thanks a lot for the hard work. I’m using the Digital Ocean Discourse droplet

ESK8FRDiscourse
2 GB / 25 GB Disk / FRA1 - Ubuntu Discourse 2.0.20180802 on 18.04

I’m stuck on importing my phpbb raw database. I’ve uploaded the full content of your github on the server (digital ocean).

This initial command

ruby phpbb3.rb phpbb3/settings.yml

gives me:

root@ESK8FRDiscourse : ~/discourse/script/import_scripts # ruby phpbb3.rb phpbb3/settings.yml
Traceback (most recent call last):
6: from phpbb3.rb:11:in &lt;main&gt;' 5: from phpbb3.rb:12:in<module:ImportScripts>’
4: from phpbb3.rb:14:in &lt;module:PhpBB3&gt;' 3: from phpbb3.rb:14:inrequire_relative’
2: from /root/discourse/script/import_scripts/phpbb3/database/database.rb:1:in &lt;top (required)&gt;' 1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire’
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require’: cannot load such file – mysql2 ( LoadError )

I don’t really know what to do; maybe it’s because i’m using the droplet discourse from digital ocean instead of @gerhard installation. I’m also not able to install a local Mysql or it will cost a new droplet

well I’m lost guys! any help is welcome!

(Jay Pfaffman) #439

That’s likely not enough machine to do an import unless it’s very small. How many posts & users do you have?

If you did a one click install you can control-c out of the script and follow the instructions as if you did a proper install, though you should

cd /var/discourse 

./discourse-setup

And it’ll create swap. And maybe make the other instructions make more sense.

(Cedric) #440

thanks Jay. I just did it and it fails

>FAILED
>--------------------
>Pups::ExecError: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 &amp;&amp; echo postgres already running stop container ; exit 1 failed with return #&lt;Process::Status: pid 45 exit 1&gt;
>Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
>exec failed with the params "socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 &amp;&amp; echo postgres already running stop container ; exit 1 >24f9bd2c5a37439d0ae738c6b3eb09dc43f719dd12c8405c0056eed480d6e4c4
>** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
> **root@ESK8FRDiscourse** : **/var/discourse** #

Following your advice, I just started from scratch, recreated the droplet for Discourse on Digital Ocean. I did the ssh setup and I’m good. The Discourse forum is now back and running here

I’m using a A DNS value for forum.xxxx as the domain is not hosted by the same provider (here Digital Ocean) than the existing e-sk8.fr/forum forum.

now I’m coming to how I migrate http://www.e-sk8.fr/forum (3.2.1) to this discourse forum and that’s where I’m stuck. I got the raw file db export in .sql

I would love someone to help me but as it’s all personal money for a good cause; I would be able to pull out around 200/300 euros but not more. I know it’s not much but again, nothing is money driven on the ESK8FR forum.

It may also be a good option to simplify the categories to make the move simpler.

Would love to have your help Jay as you seem to be the man and it’s for a good cause :slight_smile:

For some reasons, I went into Discourse admin and clicked “Update docker” (option was available). Went fine. Then I had the “Update Discourse” option available. I clicked “Upgrade”… and after 3 minutes it failed. Well, I didn’t gave up, so I went back to the terminal and did a ./discourse-setup and it’s running now. what a journey.

The discourse is now back up and running at the same state. It seems the “Upgrade option in Discourse just screwed the whole”, but now using the discourse-setup again, it’s now back to a proper/nominal state.

In the meanwhile and by reading a lot of tutorials, I managed to setup:

  • SSL
  • Adsense plugin
  • Email works with Mailgun.
  • I took a snapshot of the environment to avoid redoing this initial setup hundred of time and can get back to a normal initial / baseline state anytime needed.

I imagine that this may be a laugh for you experts, but for me it’s a huge win and I almost didn’t sleep this night.

So now I’m back to my initial issue (and I apologize for some of the off topic of my post) : migration from my existing forum to this brand new and lovely Discourse.

I did an export of the php 3.2.1 database in gzip

and uploaded it in the right place. Renamed it accordingly

I then run the import script

I’m trying to do whatever I can but I’m stuck. At this time, the discourse was no more working and I had to come back to the snapshot

So I’m now back to the initial situation.

My forum is super simple : users, categories, posts. No polls, attachements uploads or whatever. I believe this could be achievable but I’m stuck

(Jay Pfaffman) #441

How many users? How many posts?

To get the forum back you need to stop the import container and start the app container.

(Cedric) #442

Hey Jay : From the early start of the forum : 3500 topics and 700 declared users (and probably way less as I’m pruning the accounts while we talk). More than 300 hundreds never posted or last active date was 3 yeas ago), but from what I see, less than 30 users are “active posters”. There are a lot of users that didn’t connected for a while. Average 30/40 posts a day, which is barely nothing.

I’ve continued, still trying to figure out what’s wrong.

I’ve copied the script folder in my home folder

when I run

root@ESK8FRDiscourse : ~/script/import_scripts # ruby phpbb3.rb phpbb3/settings.yml

It says that that ruby is not found, so I installed it using

root@ESK8FRDiscourse : ~/script/import_scripts # apt install ruby

install goes fine.

Then I launch

root@ESK8FRDiscourse : ~/script/import_scripts # ruby phpbb3.rb phpbb3/settings.yml

and I get

and I’m stuck again :slight_smile:

and… back to the original initial state.

if someone could provide me a walkthrough that we be SO awesome cause I don’t know what to do.

As per the nature of phpbb, I had in my forum a thread where people post a link to video they like or a photo. I don’t care of saving that and migrating these. These will save more than 3000 posts that can be removed too. There is also a category where people post they “group ride” notification. I also don’t care about it… It’s 6000 posts so far that could be removed.

So we are really talking about a very limited amount of data to “migrate”.

(Jay Pfaffman) #443

How many total posts?

From an import perspective, there is no train to prune the users. 700 is not many. You really don’t want to remove a user who had posts.

You should be following the “Importing using Docker container” section of the OP.

1 Like
(Cedric) #444

Hey Jay, 80 000 total posts. I read the full thread around 100 times for around 2 days now eheh. I just don’t get it. All my previous posts are a complete end to end follow up of the OP. The OP gives a non compatibility with phpbb 3.2.x as a result

(Jay Pfaffman) #445

You are not following the docker instructions. Your files are not where the OP describes and you didn’t do this:

It looks the 3.2 changes have not been merged. I think there’s a link in this topic, but if you can’t follow the instructions the OP then integrating the other code will be even more mystifying.

With the 3.2 complexity it’s not a job I would touch for under $1000 (but that’s not a promise). My advice is to see if your community is interested in crowd funding the migration.

(Cedric) #446

thanks !! @gerhard did you manage to move towards a proper release for phpbb 3.2.x (I’m running 3.2.1. That will ease my life so much!!!

2 Likes
(Jeremiah Sherrill) #447

I don’t have a lot of money but I would chip in to pay for a migration for 3.2.1 to discourse. Perhaps if we all create a fund we can raise enough money to get this done.

2 Likes
#448

I’d be down to pitch in what I can.

@gerhard do you have a sense of how much work remains, and how much budget it might take to get there?

Thanks.

1 Like
(Jay Pfaffman) #449

For a frame of reference, I did a small 3.2 import for something over $2000 last August. I handed my code over to Gerhard, but it wasn’t pretty. If your budget is in that range and you want the job done–as opposed to having code that is up to Gerhard’s standards (which is beautiful, and often does things that to me seem magical), please contact me.

I’d guess (but certainly don’t know, as I don’t work for them), that you could likely pay for a year of Standard hosting (and almost certainly Business-level hosting) and get an import, which would result in the importer getting updated.

1 Like
#450

Thanks @pfaffman!

I don’t have the budget for that, unfortunately, so I’m hoping that group funding may be viable.

I appreciate the offer though. :slight_smile:

2 Likes
(Al) #451

This page is a great source for importing to Discourse. Thanks for the contributions.
I used Permalinks with prefix and it worked the way I wanted to import from PHPBB to Discourse. I added forum as prefix in settings.yml to redirect from /forum/viewtopic.php?f=6&t=43 to /t/topic-name/81
The issue I have is the case insensitivity. some or pages have been indexed at google or other search engines as /Forum/viewtopic.php?f=6&t=43 and because of “F” in Forum, it is not redirected! Any thoughts how I can fix this?

(Jay Pfaffman) #452

I think you can add a permalink redirect with the F.

(Al) #453

Then lower case f would not work!

(Jay Pfaffman) #454

You can have multiple permalink redirects.

(Al) #455

You mean something like this:
prefix: forum
prefix: Forum

Will try? Is this making a duplicate map then!

(Jay Pfaffman) #456

Only one will match.

(Gerhard Schlager) #457

Add additional permalink normalizations. There’s a site setting for this.

2 Likes