Moving from one server to another... no photos!

manuel.gulin

Joined: 2010-12-09
Posts: 3
Posted: Thu, 2010-12-09 14:11

Hello!
I'm using gallery on one site and now I have to move the server. To do this I searched on the site and I found a guide to do it (http://codex.gallery2.org/Gallery2:FAQ#How_can_I_move_my_gallery_installation_from_one_server_to_another.3F) so I decided to follow it. All steps were done without error (I've copied the g2data, imported the database and reused the old tables), but when I log in as admin there are no albums neither photos. Help will be appreciated.

Kind regards,
Manuel

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-12-09 17:28

Make sure your DB tables were populated when you imported the data.
Make sure the 'data.gallery.base' and the db info is correct in gallery2/config.php

Also make sure rewrite is disabled until you have it working correctly.

Finally check your server's logs for errors or clues.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
manuel.gulin

Joined: 2010-12-09
Posts: 3
Posted: Thu, 2010-12-09 20:45

Thanks for your answer suprsidr :)
I've repeated the process once again just to check these things and now I can't complete the database step:
0. The rewrite module is disabled and unloaded.
1. After the process:
-The db is dumped, I can see data in the dump file. The file transfer is verified with sha256sum. The db is loaded and I can see tables with data.
-The gallery directory (g2data) is moved in a tgz file, the sha256sum is checked (OK). The permissions are set to 777 and the owner is suser:suser (I use suphp in my apache and suser is a test user).
2. Program version: 2.3.1 full in english only. The same on both servers (the old server was upgraded from 2.3 without problems).
-The owner on both servers is suser:suser.
-Both servers use suphp.
3. Installation:
-Begins ok, creating the login.txt file and changing the owner.
-System check with one warning about gettext (I think it shouldn't be a problem).
-Installation type standard.
-Storage directory is the aforementioned.
-The selected db is the one loaded earlier. It sais something about different versions of the data directory and the database.

I'm confused. The app. is working on the old server and several times the transfer process had the messages of no albums (that's why I have opened this ticket). Also I've tried several times again the whole process (packing the g2data directory and dumping the database) and these times I can't pass the database step.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-12-09 20:52

I always install gallery on the destination server, make sure it works, then migrate my g2data and re-populate the db and make sure all info in config.php is correct

Never had a problem
Make sure g2data is 777 recursively
chmod -R 0777 path/to/g2data

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
manuel.gulin

Joined: 2010-12-09
Posts: 3
Posted: Wed, 2010-12-22 19:12

Thanks for the support :) Finally I found the problem. Although the migration was from a Linux to another Linux the source database had all tablenames in lowercase due to a mysql configuration (lower_case_table_names). So I picked up the MySQL dump and changed manually the tablenames for their right capitalization and now everything is working.

Hope this can help someone else in the future with the same problem.