migrate old mysql install to new postgres install

mailme_gx

Joined: 2008-06-21
Posts: 2
Posted: Sun, 2008-06-22 10:55

Hi

I previously was using gallery on an old pc which recently bombed out, I have setup a new environment and got gallery working with postgres sql as I prefer it to mysql, having managed to get an instance of mysql to run and connect to old database I can view the g2_* tables.

Is there a way to save my old installation by exporting data to flat files etc. all im interested in is keeping user information, permissions and albums.
I dont mind recreating albums if necessary its just preserving user data. Appart from g2_Users which tables need to be exported?

Thanks for your help
GX

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-06-22 18:40

The problem you will have is that the various database tables are keyed together by referring to id numbers of items in other tables. I suspect you'd need to do a lot of unpicking to get your old user data to be consistent with a new installation. There's no documentation per-se about the what the different fields in the different tables are used for (it's kind-of in the schema). It will certainly be more effort and study than just importing a selection of tables and off-you-go.

An alternative would be to import the entire gallery, images and all, and then if you really want, deleting all the images.