Importing data from another G2 server

Larry Menard
Larry Menard's picture

Joined: 2005-10-01
Posts: 757
Posted: Thu, 2006-08-10 19:59

Folks, I've done something stupid, and am now paying the price.

When I first ported G2 to support DB2, I started using that development build as my production server. (I know, I know... what was I thinking?) Now I'm having problems with it, so I'm trying to move the contents of my current server into a new (GA-level) one.

I've successfully installed another instance of G2 (G2.1.1), with its own database and its own g2data directory.

Is there any easy way to import the contents of my development-based G2 instance into my G2.1.1 instance?

Or any other suggestions or tips?

Thanks in advance.

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Fri, 2006-08-11 00:55

hrm, maybe rsync might help.

 
Larry Menard
Larry Menard's picture

Joined: 2005-10-01
Posts: 757
Posted: Fri, 2006-08-11 02:03

Hi, Scaturan.

Sorry, I should have mentioned that I'm using Windows XP.

This is tricky because it's not just a matter of syncing "g2data" directories... there are two things that need to be kept in sync... the "g2data" directory, and the database table data. Of the database table data, you need to know which tables/columns need to be updated and which need to be left alone.

I have taken a couple of shots at this previously, but with no success.

First I tried simply replacing the "Gallery2" code directory (preserving the "config.php" file). Then I tried exporting all the item data from the original database and importing it into a new database. Neither approach worked.

I forget the exact errors each approach got, but I remember one of them resulted in some sort of version mismatches from various modules.

I now see the version info in the "g2_pluginparametermap" table, but God only knows what other data depends on this data. So I concluded that direct manipulation of the database tables was probably not a viable solution.

I further concluded that the best way to proceed would be to somehow re-import all the data. But I have a lot of objects, so it would be very time-consuming to recreate them all individually. That's why I'm wondering if there is any way to do a bulk import from my other "g2data" directory and database.

 
Larry Menard
Larry Menard's picture

Joined: 2005-10-01
Posts: 757
Posted: Fri, 2006-08-11 02:51

Or, if someone knows for sure exactly which subdirectories of "g2data" and which database tables I need to copy over...