Page 1 of 1
Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Tue Sep 08, 2009 5:08 pm
by sanchehl
Does anyone have any ideas on how to migrate gallery2 from a windows setup to Amahi?
Currently, i have win2k3, IIS6, MYSQL and Gallery2. I found some instructions on Gallery's website about moving servers, but that is moving to a server where you start from scratch and pick an option to reuse an already configured database. I don't get such options using the Amahi setup?
here is the link to those instructions:
http://codex.gallery2.org/Gallery2:faq# ... another.3F
What i've tried so far is this.
I performed a backup of the database on win2k3.
setup gallery in Amahi.
used phpMyAdmin to import the backup, but this created duplicate tables since windows uses all lower case. couldn't rename tables, as described in the link, because they already exist. Deleting the Amahi created tables and renaming the imported tables to be case sensitive breaks the database.
any help would be greatly appreciated.
Re: Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Tue Sep 08, 2009 5:27 pm
by bsk
Have you verified that the SQL DB on MS is running as UTF-8 or is it running as ASCII? Im sure the DB on MS is running as ASCII. You need to specify that when importing into the new DB, as it will be running UTF-8
Re: Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Tue Sep 08, 2009 8:42 pm
by sanchehl
Thanks for your reply.
i did check the MS database. it looks like the character set is "utf8" and the collation is "utf8_general_ci"
the one thing i did change on the MS DB before performing a sql backup was to change the table engine from MyISAM to InnoDB. Could it be the way i'm doing a the dump? i'm using the gui tool and using the default settings to perform the backup? i've tried to change the sql tables to be case sensitive before the backup, but the changes don't seem to work in windows. everything stays lower case.
Re: Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Tue Sep 08, 2009 8:49 pm
by bsk
Are you sure your windows box is using MySQL and not MSSQL? There is a difference and when exporting you have to give it support for MySQL.
What are you using to export on the windows box?
Re: Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Wed Sep 09, 2009 7:46 pm
by sanchehl
yep. i'm running MySQL. Currently, i'm using the MySql Administrator and doing a backup from there to dump a sql file. Maybe i need to try the command line tool to perform the dump? i'll give that a try tomorrow and let you know what happens.
Re: Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Wed Sep 09, 2009 7:47 pm
by bsk
Im not familiar with using MySQL on windows, ive always used MSSQL for windows and MySQL for Linux.
Let me know how it goes

. If I find anything Ill let you know.
Re: Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Fri Sep 11, 2009 12:41 am
by cpg
this is the tool to dump DBs:
Code: Select all
mysqldump --add-drop-table -u [username] -p[password] [database] > [backup_file]
home that helps
Re: Migrate Windows Gallery2 to Amahi Gallery2?
Posted: Fri Sep 11, 2009 5:57 am
by sanchehl
Ok. apparently i'm an idiot and can't type. I had a typo in the script to modify the table names from lower case to uppper case. that's why i was getting duplicate tables. So my import works properly now. The trick is to get the Amahi install to not overwrite my imported db. to get around this, i had to export my newly cleaned up database using phpMyAdmin. Installed Gallery2. Dropped the tables that the Amahi install created, and imported my tables. From here, i still could not get the gallery pages to come up. I figured out I could re-run the setup wizard manually and tell it to reuse my database. this let me disable the modules that it automatically setup, i did not use all of the modules on my windows install. this at least allowed me to get into the Admin pages only. after a lot of messing around i figured out that i had to download and install some of the modules used on my Windows install because they were not there at all on the amahi install. After running some of the db cleanup tools in Gallery2, i was able to get into gallery and see the albums but only the original sized pictures. all of the resized and thumbnails are gone. At this point, i'm stuck again because i can't get all of the thumbnails to regenerate. by this time, it was after 1am so i gave up and went to bed.
not sure what is causing this problem yet, could be that my windows install was using imagemagick and i'm not on Amahi, even though i disabled imagemagick module on Amahi? could be a problem with windows files names? the process gets about 1000 thumbnails done and then hangs up. i know there are errors being reported but there were too many. i'll have to try again another day.
anyway, thanks for your help getting this far.