Gallery2 - moving to new URL

Long ago I installed Gallery2. It was initially just a test installation to see if it worked, as it should. Being a test install it was just placed at /g2/ on this server. Time passed. It just worked and before long, there were a large number of photos (with metadata) in the gallery. So how do you move it to a slightly more suitable location without breaking too many things? I tried it a few times before, but with very little success.