I’m planing to migrate from SMF 2.0.9 to Discourse. I already have discourse running and everything is working fine. So my question is it possible to “RESET” discourse to look like i installed it fresh. And then migrate to Discourse from SMF?
EDIT: Also i have Woltlab 4.0.8 forum running (Also i can migrate to phpbb or any other that is required for the simpliest migration) ty
No, unfortunately there is no reset feature. You may need to reinstall Discourse and manually copy the things you wish to keep, i.e. your design, customizations, category settings and such.
Migrating SMF2 to Discourse is quite possible, but because it involves interacting with the Linux console and since there are a few technological barriers to bridge, the process can be somewhat finicky. Basically:
- setup Discourse,
- make a backup,
- copy your old SMF2 forum to your new server under
- install the
mysql2 gem in the container and run the importer:
cd /var/discourse && ./launcher enter app
apt-get update && apt-get install libmysqlclient-dev
su - discourse
gem install mysql2
ruby smf2.rb /shared/smf -h $myql_server -t $php_timezone
In the last command, replace
$mysql_server with the hostname or IP address of SMF2’s database server. This server must be reachable over the internet; if direct access isn’t possible (due to a firewall, for instance), you can try to tunnel the connection through SSH (see TCP FORWARDING in
man ssh). If you can’t connect to your old server via SSH, you may need to temporarily install MySQL on the new Discourse server and import an SQL dump.
$php_timezone is the default timezone used by PHP on your old server. You can skip this setting (also remove the
-t switch in this case), but imported timestamps may be slightly off.
Thanks @elberet for replying. I decided that i’ll start clean and just copy the important topics from last site. I’ve bulked all email and sent invite codes to users so no problems. Also changing host in containers/app.yml name from lets say
“www.oldname.rs” --> “www.newname.rs” should be simple right? just modify app.yml and after my isp change ip from newname.rs to this discourse i can then modify it and rebuild it correct? there shouldnt be much problems with it?
You may need to run a script inside the container that rewrites internal links embedded in posts, but that’s it. There’s also a howto about changing the domain name.
Yes, actually - remove the
postgres folders in
/var/discourse/shared/standalone, then rebuild the container. That will wipe out your database.
Thanks guys, appreciate all help. Definelty best support of any project i’ve meet so far. Cheers!
Does this mean that I have to install the mysql server inside the docker or in the server?
For who us wondering about how to use the script:
- The path is required to parse the
Settings.php file and get the database connection parameters. In my case I imported the db locally and updated that file and created a folder with only this file
- For timezone you have to write in that syntax: Europe/Rome as example and UTC
- Add many ram to your vm. I forgot it to do it and now is important 45000 user with the default parameters
- Don’t forget to install your discourse in your installation
- Tweak a little bit the MySQL settings for more cache and more connections because with an huge db the connection can stop and you have to start again
- The script reconize the already stuff imported so in case of crash you can execute again
- I made a patched version of mysql2 to avoid invalid month/date https://github.com/Mte90/mysql2