For the 5k posts, and about 600 attachments, on an older xeon and an SSD disk it took about 10 mins. I would grab a reasonably powered box, do the import offline, and let it chug away.
Fantastic! Looking forward to it.
Ok Iāve done a very quick test and the additions to the script seem to have worked - doing a proper test now with a few thousand members and 100K posts. Will report back if it worksā¦
Hi, anything new? If you need help with testing, I will be glad to help
Iām getting an error that users table doesnāt exist when I run the xenforo script. Any help really aprreciated!
Reading about this for an hour but havenāt figured it out yet.
There are some variables at the top of the script that you need to fill in so that it can connect to your xenForo MySQL database and query the data. I believe āimport_dbā might be the placeholder value - double check that those values are filled out correctly.
@Ghan I thought Iām importing to import_db
with this: mysql -u root -p import_db < /shared/db.sql
My xenforo.rb is:
Ah ok. If that is your database name, then check to make sure you have the table name correct. Your table might be xf_user
with the prefix, and that would cause an issue. There should be a TABLE_PREFIX
variable in the script as well.
@Ghan Thanks you!
Right now, Iām still stack on the import script.
It iterates through users and categories all good. On the import_posts
function though it just hangs there until after some hours it times out.
Starting debugging this by just printing the values in the import_posts:
All prints after the assignment of the results variable never print.
Just in case anyone is looking to import a vb3 forum, this guide might help if you also have a Xenforo licence:
Does this importer import tags from xenforo along with the threads they are attached to?
Always a good idea to look at the source code.
I think the answer is ⦠yes (but not super familiar with Xenforo data structures):
So, it looks like it at least once imported some tags for someone under some conditions. If youāre lucky, itāll work for you too!
Is it safe to set up my trust levels, badges, other discourse settings before the import? Iām thinking this importer will just insert/replace posts/threads/profiles? Iād hate to get everything set up in discourse settings and have this wipe out those settings, even though I donāt immediately see anything in the code related to that.
Yes, but make a backup. You will likely need to change things and run it multiple times, starting over from scratch,so keep a backup of your configuration with no imported data.
It inserts. It mostly doesnāt replace anything. If a user exists, it wonāt change it. It wonāt use categories that you set up. If you run it again, with an updated database from your old site, itāll add new data, but not change things that were imported on earlier runs. This makes it much faster, but if you need to change the script for some reason youād need to delete it all and start again.
So, two things. First, is there a way to make this run faster? Iām on a 32 CPU Linode with 64GB of ram and itās still taking 4-5 hours to import 250k posts.
Second, does it import attachments before or after the posts? Because looking at the script it looks like it does it after. Itās just a bummer to have to wait 4-5 hours just to find out the attachments didnāt import.
Everything is dependent on the data before it,for the most part, the post-processing can take advantage of the multiple cpus, but that doesnāt start until youāre done, for the most part. Get a single cpu thatās faster.
You can modify the script to import only recent uploads, but if youāre not planning on doing major development, if just wait the 5 hours.
Well, Iāve tried this several times now and the attachments arenāt getting imported, and Iām running out of ideas. Iām hoping someone can help me (thanks @pfaffman for your input so far).
Iāve placed the *.data files in their original folder structure from xenforo (so, the āattachmentsā folder) in /root/attachments in the docker container. Iāve updated the import script to /root/attachments. I can see the files in /root/attachments on the command line with ls.
Iāve run the script, and every time (after about a 4-5 hour wait), all posts with attachments/photos show the old bbcode from xenforo ([ATTACH]123456[/ATTACH]) and I donāt see any pictures or attachments in the discourse install.
What could I be doing wrong here? I feel like Iām 90% there, Iām just missing something.
Youāll have to look at the code. Is the attachment code even running? Are your attachments on the format the script expects?
If the attachment function is run after the post import then you donāt need to run the whole thing again, itāll just skip over the posts (or comment out the post import to make it a bit faster so).
But there are a bunch of things that could be wrong from you not configuring it correctly to it just not working with your version of zenforo. Youāll have to look at the code and add some debugging output to see whatās going on.
Well, just FYI for anyone coming across this thread, I was not able to get the attachments to work with this script, no matter where I placed them. IMO the script needs work and the instructions especially need a lot of work to be more clear about what goes where and how.
Until then, I would consider this script to be broken.