First time here? Check out the FAQ!
1

Export Import questions
 

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. ?

Thx

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
coldsystem's avatar
31
coldsystem
asked 12 years ago
Evgeny's avatar
13.2k
Evgeny
updated 12 years ago

Comments

see more comments

1 Answer

1

You can do the following:

In version 0.7.43:

#with your sqlite settings
python manage.py dumpdata > data.json

#with your mysql settings
python manage.py 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 manage.py migrate

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Fitoria's avatar
1.1k
Fitoria
answered 12 years ago
link

Comments

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 (12 years ago)
1

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 (12 years ago)
see more comments