First thing first: the Demo
My Story
I've been using Gallery since 2000 and finally I think it is time to move away from it.
Gallery is a fantastic piece of application, but it has become too heavy and too slow. I was hosting about 6000 pics on my site, with 1.x, it was a drag, whatever I click I had to wait for 5 seconds. Eventually I had to write my own caching code to deal with the situation. 2.0 solved the issues but it wasn't as spiffy as most of the newer gallery apps out there. Plus most of the time, I barely use 30% of the features it has to offer.
Just 2 weeks ago, I found ZenPhoto and trying to convenience myself not to do the switch.
What Migrator?
ZenPhoto is great, it's lean, Ajax-y and it gets the professional look and feel. Since it is folder file structure based system, I thought the migration could be as easy as moving the album folders.
Well, While moving everything under g2data/albums/ to zenphoto/albums/ does move all the pictures, I lost most of the album/photo titles, descriptions, timestamps and comments. Being a young product, the user base/support isn't strong. Finally I had no choice but writing this tool to help me with the migration process. (This tool was inspired by this post at ZP)
Features:
- migrate albums: titles and description
- migrate photos: titles only (since I don't have descriptions for photos in Gallery2)
- migrate media files: titles only
- migrate timestamps
- migrate comments
- takes care of multiple images with the same name
- progress bar
- logging
Todo (shortly)
migrate timestampsmigrate comments- convert video files (to flv) on the fly: I also have a script to convert video files to flash files, maybe I'll add it so media files are converted.
Quick Howto
- Install ZenPhoto and have your Gallery2 database ready on the same host
- Copy your Gallery2 data to ZenPhoto, e.g:
cp -Rp /var/www/g2data/albums/* /var/www/zenphoto/albums/
- Populate the ZenPhoto database by browsing to your zenphoto with your browser and pre-cache all your photos. (so the metadata are populated in ZenPhoto database)
- Download the tool, extract it somewhere under your webroot then make it writable Apache server
e.g:cd /var/www/htdocs/ tar -zxvf g2z.tar.gz chown -R www-data:www-data g2z - Browse to the g2z location e.g: http://www.xxxx.com/g2z/ with your browser and fill in the required information; no logfile will be generated if log file field is empty.
- Click on "Migrate Now" button and wait.

Always backup before performing.
Download
Here is my first version. g2z.tar.gz
Code clean up is needed. comments needed.
Awesome tool! Thanks so much for creating this user, this should be published on ZenPhoto website since I couldn't find a darn thing about transferring my old database to the new zenphoto database.
However I was confused on the step that says "under your webroot then make it writable Apache server." I had to skip that one since I couldn't find anything about it on google nor I'm a much literate when it comes to those kinds of things. I only know how to deal with html and some php.
Anyways, thanks for your help!
Sounds like a great script! Will test it out tonight and see if it works. Agree with your observations on Gallery2.
Jonathan
Looks great.
Any chance of being able to specify different accounts and servers for each DB?
Does this already include image description migration? Based on the SQL query at http://www.zenphoto.org/support/topic.php?id=3259it should be possible I guess?
Thanks for this nice piece of software!