by Tim Hunt.
Sorry, this is a rather brief answer, but try reading Moodle migration. That may explain what you are seeing.