Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
2.8k views
in Q2A Core by
I'd like to transfer my 500+ questions already asked on my OSQA website and all it's users etc onto a Question2Answer website. How would I go about doing this, I already have a dump file of all the content but what would I need to change to make the dump structure compatible with Question2Answer's database strucuture so it would work properly? I hope someone can help me.
by
What database does OSQA use? (e.g. MySQL)
by
It uses MYSQL.
by
I know it's been about a year - but any progress on this? I'm keen to see if anyone has made any progress in this regard.

2 Answers

+3 votes
by
edited by

I think you need to:
1. Create sql dump file of your osqa database.
2. Write a script or Q2A plugin that convert data from osqa dump file into Q2A .sql dump file structure.
(If you decide to make a script, please share with the community).

Or do the conversion manually, line by line.

None the less, before doing this, you must check if you can retrieve all necessary data from your OSQA database.
 
Then you can use my backup plugin (https://github.com/KrzysztofKielce/q2a-backup) to import the data (only full restore available).
Tip: you can do the backup of some existing Q2A instance to lookup how .sql file should look like.

 

by
It sounds like I might be stuck programming a python script that will convert my OSQA DB structure into a Q2A friendly structure. This will take some time. I'll let you guys know how it goes. If I do decide to do this I'll probably just take all the questions and import them into the website anonymously. Anyways, thanks for the info!
0 votes
by
edited by

So far I've been successful in creating a PHP script that loops through the OSQA 'User.xml' library and adds table entries into qa_users, qa_userprofile and qa_userpoints tables.

Seems to work pretty good so far, but the main issue right now is the difference in password hashing/salting algorithms. My workaround is to reset everyone's password to 'password' (or another string that you choose.)

Script is available here: http://www.question2answer.org/qa/24213/migrating-osqa-xml-backup-to-new-q2a-installation

 

by
will it work if I already have a test question? (no real questions, and no real users so far)
by
I don't see why not. Give it a try and let me know if it spits out any errors.
by
I was about to, but I'm having issues to actually get the XML out of the OSQA site
by
Can I ask why you're trying to export the DB if it doesn't contain any real users?
by
I was referring myself to the only 2 users my Q2A site have. The OSQA has abouth 25 users, and about 50 questions (not an awful lot)
...