Skip to content

Old page data migration

vlejd edited this page Mar 20, 2017 · 5 revisions

Recommended practices and scripts for old page data migrations.

Wiki documents

It highly depends on the original state of your articles, however, manual migration is a great opportunity to revise and update them.

Users

Automatically copy all the old users, without any login info and store the id mapping. Let users create their new credentials and then merge them (using merge tool). Don't forget to update id mappings accordingly.

4 thinks are (will be) merged. Kaspar (old ksp), fks (old fks), kms (old kms), random csv filed provided by Mato Badin.

KSP

There is a script https://github.com/trojsten/web/blob/master/trojsten/people/management/commands/migrate_people_from_kaspar.py that can be run on a webserver and that will connect to kaspar. To run localu (for testing), you need to ask someone to dump kaspar for you (there is a column with fancy privileges). Then restore it locally and change corresponding variables in settings/common.py. It is a postgres database, so there is not much of a trouble. However you need to create a few new users to run smoothly (mio, kaspar, kaspar_ro, brano ... and so on.). -O Swith does not help, because life would be too easy that way.

KMS

Time for MySql. Some database architecture decision are questionable, but nothing terribly painful to do. No problems with restoring.

FKS

1.1G MySql file. No problems with restoring.

CSV files

TODO

Semesters, Rounds, Tasks, Statements, Solutions and Results

TODO: There will be a script, that converts filesystem structure with pdf statements and solutions, txt metadata (deadlines, task names, task points) and csv results to the correct database instances.

## Events

If you had event attendees in the old database migrate them automatically using user mappings. Otherwise, create old important events manually (using action wizard (TODO: not implemented yet)). Event has it's own wiki article subtree, so you can migrate any content.

Submits

Optionally, it is possible to migrate also old user submits. This may, however, be a complicated process, that requires deep knowledge of both old and new submit systems. Try at your own risk.

Clone this wiki locally