Perhaps I could rename both the old gallery folder and the new one to something completly different. Install a fresh zen photo, then simply rename the new gallery so it overwrites the freshly installed one, so it would then connect to the new database?
Or then would the backup/restore feature work? Perhaps though this would just cause the same error as above.
The reason I asked is that there is a bug in 1.2.2 that occurs if you install an updated revision while you are logged out. It gives the symptoms you describe. But it should not happen if the revision did not change, so is probably not the problem you are seeing. Still you might want to install the nightly build and see if the problem gets fixed.