First time here? Check out the FAQ!

Revision history  [back]

Updating askbot from 0.47 to 0.50 / Data Migration PostgreSQL

We were using askbot for about three years now. As we want to update the underlying OS we also want to update the askbot instance as well, since it has some flaws (able to comment without login -> login -> 404) we wonder how we could just dump the database and load the dump on the newer instance before "migrating".

What would, generally, the best way to do such an update without loosing data be?

Update: I've chosen to give 0.50 a try over the git version, which I was not able to get to work. As a clean installation it is working on my recent debian 7, but still the problem remains, how to get the data of the old instance into the new. I've choosen to pg_dump the contents of the "old" askbotdb and create a new one on the new system. The dump is then imported using psql and the user permissions are set as it should be and I'm able to connect to the imported database with the credentials in askbot's settings.py.

Then I tried to follow the answer given in nolink://stackoverflow.com/questions/4840102/why-dont-my-south-migrations-work:

(env.0.7.50)askbot@debian:/data/askbot50$ python manage.py schemamigration askbot --initial
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

 + Added model askbot.Tag
 + Added unique constraint for ['name', 'language_code'] on askbot.Tag
 + Added M2M table for suggested_by on askbot.Tag
 + Added model askbot.MarkedTag
 + Added model askbot.TagSynonym
 + Added model askbot.ActivityAuditStatus
 + Added unique constraint for ['user', 'activity'] on askbot.ActivityAuditStatus
 + Added model askbot.Activity
 + Added M2M table for receiving_users on askbot.Activity
 + Added model askbot.EmailFeedSetting
 + Added unique constraint for ['subscriber', 'feed_type'] on askbot.EmailFeedSetting
 + Added model askbot.GroupMembership
 + Added model askbot.Group
 + Added model askbot.BulkTagSubscription
 + Added M2M table for tags on askbot.BulkTagSubscription
 + Added M2M table for users on askbot.BulkTagSubscription
 + Added M2M table for groups on askbot.BulkTagSubscription
 + Added model askbot.ThreadToGroup
 + Added unique constraint for ['thread', 'group'] on askbot.ThreadToGroup
 + Added model askbot.Thread
 + Added M2M table for tags on askbot.Thread
 + Added M2M table for followed_by on askbot.Thread
 + Added model askbot.QuestionView
 + Added model askbot.FavoriteQuestion
 + Added model askbot.DraftQuestion
 + Added model askbot.AnonymousQuestion
 + Added model askbot.PostToGroup
 + Added unique constraint for ['post', 'group'] on askbot.PostToGroup
 + Added model askbot.Post
 + Added model askbot.PostRevision
 + Added unique constraint for ['post', 'revision'] on askbot.PostRevision
 + Added model askbot.PostFlagReason
 + Added model askbot.DraftAnswer
 + Added model askbot.AnonymousAnswer
 + Added model askbot.ReplyAddress
 + Added model askbot.Vote
 + Added unique constraint for ['user', 'voted_post'] on askbot.Vote
 + Added model askbot.BadgeData
 + Added model askbot.Award
 + Added model askbot.Repute
 + Added model askbot.AskWidget
 + Added model askbot.QuestionWidget
 + Added model askbot.ImportRun
 + Added model askbot.ImportedObjectInfo
Created 0184_initial.py. You can now apply this migration with: ./manage.py migrate askbot
(env.0.7.50)askbot@debian:/data/askbot50$ python manage.py migrate askbot --fake
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

DatabaseError: relation "south_migrationhistory" does not exist
LINE 1: ...gration", "south_migrationhistory"."applied" FROM "south_mig...
                                                             ^
(env.0.7.50)askbot@debian:/data/askbot50$

How to get my database migrated correctly?

Updating askbot from 0.47 to 0.50 / Data Migration PostgreSQL0.51

We were using askbot for about three years now. As we want to update the underlying OS we also want to update the askbot instance as well, since it has some flaws (able to comment without login -> login -> 404) we wonder how we could just dump the database and load the dump on the newer instance before "migrating".

What would, generally, the best way to do such an update without loosing data be?

Update: I've chosen to give 0.50 a try over the git version, which I was not able to get to work. As a clean installation it is working on my recent debian 7, but still the problem remains, how to get the data of the old instance into the new. I've choosen to pg_dump the contents of the "old" askbotdb and create a new one on the new system. The dump is then imported using psql and the user permissions are set as it should be and I'm able to connect to the imported database with the credentials in askbot's settings.py.

Then I tried to follow the answer given in nolink://stackoverflow.com/questions/4840102/why-dont-my-south-migrations-work:

(env.0.7.50)askbot@debian:/data/askbot50$ python manage.py schemamigration askbot --initial
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

 + Added model askbot.Tag
 + Added unique constraint for ['name', 'language_code'] on askbot.Tag
 + Added M2M table for suggested_by on askbot.Tag
 + Added model askbot.MarkedTag
 + Added model askbot.TagSynonym
 + Added model askbot.ActivityAuditStatus
 + Added unique constraint for ['user', 'activity'] on askbot.ActivityAuditStatus
 + Added model askbot.Activity
 + Added M2M table for receiving_users on askbot.Activity
 + Added model askbot.EmailFeedSetting
 + Added unique constraint for ['subscriber', 'feed_type'] on askbot.EmailFeedSetting
 + Added model askbot.GroupMembership
 + Added model askbot.Group
 + Added model askbot.BulkTagSubscription
 + Added M2M table for tags on askbot.BulkTagSubscription
 + Added M2M table for users on askbot.BulkTagSubscription
 + Added M2M table for groups on askbot.BulkTagSubscription
 + Added model askbot.ThreadToGroup
 + Added unique constraint for ['thread', 'group'] on askbot.ThreadToGroup
 + Added model askbot.Thread
 + Added M2M table for tags on askbot.Thread
 + Added M2M table for followed_by on askbot.Thread
 + Added model askbot.QuestionView
 + Added model askbot.FavoriteQuestion
 + Added model askbot.DraftQuestion
 + Added model askbot.AnonymousQuestion
 + Added model askbot.PostToGroup
 + Added unique constraint for ['post', 'group'] on askbot.PostToGroup
 + Added model askbot.Post
 + Added model askbot.PostRevision
 + Added unique constraint for ['post', 'revision'] on askbot.PostRevision
 + Added model askbot.PostFlagReason
 + Added model askbot.DraftAnswer
 + Added model askbot.AnonymousAnswer
 + Added model askbot.ReplyAddress
 + Added model askbot.Vote
 + Added unique constraint for ['user', 'voted_post'] on askbot.Vote
 + Added model askbot.BadgeData
 + Added model askbot.Award
 + Added model askbot.Repute
 + Added model askbot.AskWidget
 + Added model askbot.QuestionWidget
 + Added model askbot.ImportRun
 + Added model askbot.ImportedObjectInfo
Created 0184_initial.py. You can now apply this migration with: ./manage.py migrate askbot
(env.0.7.50)askbot@debian:/data/askbot50$ python manage.py migrate askbot --fake
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

DatabaseError: relation "south_migrationhistory" does not exist
LINE 1: ...gration", "south_migrationhistory"."applied" FROM "south_mig...
                                                             ^
(env.0.7.50)askbot@debian:/data/askbot50$

How to get my database migrated correctly?

Updating askbot from 0.47 to 0.51

We were using askbot for about three years now. As we want to update the underlying OS we also want to update the askbot instance as well, since it has some flaws (able to comment without login -> login -> 404) we wonder how we could just dump the database and load the dump on the newer instance before "migrating".

What would, generally, the best way to do such an update without loosing data be?