Migrating Gitorious to Another Server, Part III

If you’ve read my earlier posts, you know that I’ve migrated our Gitorious instance to a new server. In the project, I had to update it from 2.3 to 3.0.

All of the projects and data appears, so far, to have migrated successfully. The latest issue, however, that I’ve run into is that not all the projects show up on the Projects index page. Since all the projects are supposed to be visible, this didn’t make sense.

The fix ended up being time consuming but fairly straightforward. I did a search in the database to find all of the projects, their slugs, and their owners:

SELECT id, title, slug, owner_id FROM projects;

For each project not appearing on the index page, I:

  • opened the project page:
    • [main site url]/[slug]
  • opened the Admin menu by clicking the Admin button
  • clicked Edit
  • saved the edit page (no changes necessary)

Voila! The project appeared on the index page.

One small gotcha: if the admin (the user I was logged in as) wasn’t the owner of the project, the Admin button wouldn’t appear. So I’d temporarily change the owner of the site to admin:

update projects set owner_id = 1 where id = [project id from table];

Once I’d saved the Edit page, I simply changed the owner back to the original, as seen in the original table.