restoring Gallery
griztown
Joined: 2005-04-15
Posts: 18 |
Posted: Tue, 2010-03-23 19:49 |
Hi, I'm using Godaddy (a mistake I know) for my hosting. While trying to enable SSH, they required that I uninstall all of my databases and my applications. So I backed up my gallery database, move the files and directories to another location, and uninstalled the application. After SSH was enabled, I reinstalled gallery. It created a new database. I used that database to restore my old database. I then moved the new gallery files to another directory and moved the old ones back to where they belong. I also updated the old config.php to reflect the new db name, host location, passwords, etc. Sadly, no pictures. Can someone point me in the right direction for finding, what I would think would be simple, the solution to this problem. Thanks in advance! |
|
Posts: 16504
www.nodaddy.com yes godaddy absolutely sucks all around.
This is a total WTF moment to have to uninstall all that to enable SSH. But it sounds they, as usual, totally screw with their customers to do this.
Since you may or may not have moved physical servers, try to make sure you followed these directions as closely as possible, it sounds like a permissions issue most likely:
FAQ: How can I move my gallery installation from one server to another?
FAQ: How can I fix the filesystem permissions of the Gallery storage folder?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
Thanks nivekiam. They did move me to a new server. I've checked the config.php file and everything is accurate there. Using Filezilla I updated the permissions recursively for the g2data directory but still nothing. Shouldn't all the album and picture information be in the database somewhere? I poked around but didn't see anything.
Posts: 4342
OK. The fact that the root gallery for your installation is showing empty ("has no items") means that the database that you're pointing the G2 code to (via the entries in the config.php) is *not* the one that contains your image data. That's where you need to be checking. Whhich database did you recover your data to, and which database is your config.php pointing at.
Posts: 18
Thanks Alec, you are right. I found another database backup that is much larger. I restored the database but the website still showed no pictures. Looking at the database info I noticed the tables started with 'g2_'. Checking my config.php file I noticed it was set to 'g_' so I changed that. Now my website says simply "Error". The columns all appear to start with 'g_' so left that alone. What is the best way to turn on debugging?
Posts: 18
Oh, that was easy. Set debug to true and got this output. Am I missing a plugin?
Posts: 4342
No. Your backup/restore was defective.
Posts: 18
So it says PluginsMap is missing. Searching the database backup file it is definitely in there. Then I noticed that my db restore didn't actually work! Woops! I was given this error:
I've commented out the CREATE DATABASE and USE lines at the top and am trying to restore again. Hopefully this will work.
Posts: 18
Well, I fixed that problem but now have a new Error. Any ideas on why it is looking for g2_Schema.g_info? Currently g2_Schema appears to only have g_name, g_major, and g_minor.
Posts: 4342
Because that's a normal part of that table.
Then you are missing the columns g_createSql, g_pluginId, g_type, g_info. I deduce that your backup/restore procedure failed at some point.
Please don't post debug logs as quotes - post them as .txt attachments, otherwise it makes the thread very difficult to read. Thanks.
Posts: 18
So I think that the db that I used to restore must be from an older version, is that possible? At one time I had Gallery 1 on here. So I'm afraid I don't have the right db for restoring, not sure how that's possible but there it is. Is there a way to rebuild it so it will recognize all of my albums and pictures?
Posts: 4342
Gallery version 1 doesn't use a database at all.
If you can't restore from a backup, install a fresh installation (looks like you've already done that bit ok) and import all your pictures from scratch. You can do that in one go if there are sufficiently few of them (depending on your server resources) by moving the g2data/albums directory from the old installation somewhere else on the server before the reinstallation - that directory contains the jpgs - and using the serveradd module, which will allow you to import from a local directory on the server. Obviously point it at wherever you moved the old g2data/albums directory to.
You will not be able to import any other data though, like titles, comments, users, and so forth.