Gallery DB is corrupt. Can't repair. Please help.

skuba

Joined: 2004-05-06
Posts: 103
Posted: Wed, 2014-04-02 06:02

Hi, my VPS hosting company had to move my sites into new servers and contacted me about issues with my Gallery DB. Apparently there are issues and they can't do the dump. It was working fine last I checked so I am surprised about this issue. I do see now that some images are not showing, probably issue with some of the tables.

My last DB backup unfortunately is from a few months ago and I would prefer to not lose all the more recent data. I tried repairing the DB but didn't work. I am posting below the issue with the repair, has to do with the storage system, which in this case it's InnoDB.

Is there any way to repair? Or to use the backup to fill in what's broken with the current DB?

I really appreciate if you can help me in anyway.

Thanks so much!

These are the errors the hosting service got while trying to do the data dump:

Quote:
(125254185 bytes) snow07_rosawarn [pkgacct] snow07_rosa: mysqldump: Got error: 1146: Table 'snow07_rosa.g2_ImageBlockCacheMap' doesn't exist when using LOCK TABLES

warn [pkgacct] snow07_rosa: mysqldump: Got error: 1146: Table 'snow07_rosa.g2_ImageBlockCacheMap' doesn't exist when using LOCK TABLES

snow07_rosa.g2_AccessMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_AccessSubscriberMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_AlbumItem
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_AnimationItem
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_CacheMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_ChildEntity
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_Comment
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_CustomFieldMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_DataItem
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_Derivative
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_DerivativeImage
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_DerivativePrefsMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_DescendentCountsMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_Entity
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_EventLogMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_ExifPropertiesMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_ExternalIdMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_FactoryMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_FailedLoginsMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_FileSystemEntity
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_G1MigrateMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_Getid3PropsMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_Group
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_ImageBlockCacheMap
Error : Table 'snow07_rosa.g2_ImageBlockCacheMap' doesn't exist
status : Operation failed
snow07_rosa.g2_ImageBlockDisabledMap
Error : Table 'snow07_rosa.g2_ImageBlockDisabledMap' doesn't exist
status : Operation failed
snow07_rosa.g2_Item
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_ItemAttributesMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_ItemHiddenMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_LinkItem
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_Lock
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_MaintenanceMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_MimeTypeMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_MovieItem
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_MultiLangItemMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_PendingUser
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_PermalinksMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_PermissionSetMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_PhotoItem
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_PluginMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_PluginPackageMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_PluginParameterMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_QuotasMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_RatingCacheMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_RatingMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_RecoverPasswordMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_RssMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_Schema
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_SequenceEventLog OK
snow07_rosa.g2_SequenceId OK
snow07_rosa.g2_SequenceLock OK
snow07_rosa.g2_SessionMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_SubscriptionMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_ThumbnailImage
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_TkOperatnMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_TkOperatnMimeTypeMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_TkOperatnParameterMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_TkPropertyMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_TkPropertyMimeTypeMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_UnknownItem
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_User
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_UserGroupMap
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_WatermarkImage
note : The storage engine for the table doesn't support repair
snow07_rosa.g2_WebDavLockMap
note : The storage engine for the table doesn't support repair
warn [pkgacct] snow07_rosa: mysqldump: Got error: 1146: Table 'snow07_rosa.g2_ImageBlockCacheMap' doesn't exist when using LOCK TABLES

warn [pkgacct] snow07_rosa: mysqldump failed -- database may be corrupt

Here is is the info on my Gallery:

Quote:
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.5 apache2handler
Webserver = Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5
Database = mysqli 5.0.95-community-log, lock.system=flock
Toolkits = Exif, Getid3, LinkItemToolkit, Thumbnail, SquareThumb, ArchiveUpload, ImageMagick, NetPBM, Gd
Acceleration = none, none
Operating system = Linux snowbrasil.fbyneserv.com 2.6.32-042stab057.1 #1 SMP Fri Jun 22 02:17:07 MSD 2012 x86_64
Default theme = snow
gettext = enabled
Locale = pt_BR
Browser = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Rows in GalleryAccessMap table = 17
Rows in GalleryAccessSubscriberMap table = 2149
Rows in GalleryUser table = 3
Rows in GalleryItem table = 2137
Rows in GalleryAlbumItem table = 90
Rows in GalleryCacheMap table = 0

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Wed, 2014-04-02 14:32

Basically, your host hosed your db.

Well, the solution is simple. They just need to restore the backup they took before they started mucking about with it.

A professional outfit would have definitely done that. They would always ensure they maintain the ability to restore to the last known working state before undertaking major actions like transfering servers.

Some would even go as far as keeping the old setup around and confirming the new works before pulling the plug on the old.

It simple terms, it is not your problem to solve. It is theirs.
--
dakanji.com

 
skuba

Joined: 2004-05-06
Posts: 103
Posted: Thu, 2014-04-03 03:55

Hi Dayo, thanks for the suggestion. They were able to restore a previous backed up version on the new server, but there is still some stuff broken. Mainly some of the full size pictures are not showing. I suspect it's related to the folder permissions. All my photo folder under g2data used to be set to 777 and it all works. The recent folders and the one I just did as a test are defaulting to 700 and not only the pictures don't show, but I can't even access the folder via FTP or change the permission. Would anyone know why this is happening and how to fix?

Thanks so much

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Thu, 2014-04-03 04:44

Hi.

All of these issues, permissions settings etc, are server management/setup related issues and have nothing specifically to do with G2 or any other PHP application you might happen to run.

You need to either get your host to resolve these issues for you, look to a server management community such webhostingtalk.com for help, or consult google.

All the best!

--
dakanji.com

 
skuba

Joined: 2004-05-06
Posts: 103
Posted: Fri, 2014-04-04 21:10

Hi, but what about not being able to repair the DB? The backup the host had found was also corrupted and I only have one from several months ago.
Is there a way I can still repair the DB?

THanks

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2014-04-05 19:00

The db management also falls under the server management/setup.

--
dakanji.com

 
markwillium

Joined: 2014-04-30
Posts: 1
Posted: Wed, 2014-04-30 04:36

Yes you can repair your corrupt database with the help of 3rd party repair tool.

Tool is available in two versions: demo & full. Demo version scans the corrupt file and shows the preview of database. If you are satisfied with the result then go for the full version.