Ask Your Question

Export Import questions

asked 2013-02-13 15:33:56 -0600

coldsystem's avatar

updated 2013-02-13 15:37:39 -0600

Evgeny's avatar

How to export all questions from Askbot 0.7.43 with sqlite3 database and import them to other running askbot 0.7.48 with mysql database. ?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-13 15:45:27 -0600

You can do the following:

In version 0.7.43:

#with your sqlite settings
python dumpdata > data.json

#with your mysql settings
python loaddata  data.json

The first command will dump the database data into json format then the second one will load them into your mysql database, always on the 0.7.43 version this is very important because for loading data the version must be the same from the data dump.

Now after that upgrade to askbot0.7.48 and do the migration.

python migrate

And after the migration it should work on the new version.

edit flag offensive delete link more


is this the same way . to export questions from askbot 0.7.48 SQlite and import them to the same version askbot 0.7.48 with mysql based .??

coldsystem's avatar coldsystem  ( 2013-02-13 17:15:08 -0600 )edit

In theory this should work, but for large data sets this may be slow (the json loaddata method). If your sqlite is already on version 0.7.48, then you don't need to migrate afterwards. You can do migrations either before or after. Marked your question as feature request because more robust script would be necessary for larger sites.

Evgeny's avatar Evgeny  ( 2013-02-13 17:23:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-02-13 15:33:56 -0600

Seen: 496 times

Last updated: Feb 13 '13