Damon Cortesi's blog

Musings of an entrepreneur.

Upgrading Gallery From 1.x to 2.0.4 to 2.1.2 on Gentoo

| Comments

I recently moved from hosting this website on a Debian server to one running Gentoo, which I’ve been running personally for just over a year now. The main reason was webapp-config - I manage a couple other blogs and galleries besides this one on my server, and manually upgrading those each time a new version of software came out was really beginning to make my life difficult. Webapp-config appeared to be able to make that somewhat easier.

When I moved to Gentoo, I upgraded my gallery to Gallery2 (2.0.4, as 2.1.x was not stable in Gentoo yet). The upgrade went flawlessly. I copied my old gallery1 data over, showed G2 where it was and maybe a half-hour later, I had a fully fuctional new gallery.

I then noticed today that 2.1.2 was marked stable in Gentoo, so I figured I’d put webapp-config to the test. It performed extremely well, and I thought I had successfully completed the upgrade in about 10 minutes. But…I then noticed that my old gallery1 links were not redirecting properly. After an hour or two of trying to tweak every Apache option I could think of, I turned to the new database feature of Gallery…and quickly noticed where the problem was. My g2_G1MigrateMap table had somehow been emptied, and while I’m not sure…I’m assuming that Gallery uses that for it’s URL redirects. Sneaky. Fortunately, I was a responsible user and made a backup of the database prior to upgrading. Simply inserting the old g2_G1MigrateMap table made my URL redirects work properly again.

Always a problem somewhere…