forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Forgott3n on November 19, 2007, 09:59:12 pm

Title: Lost images due to server crash
Post by: Forgott3n on November 19, 2007, 09:59:12 pm
Hello,

There was an issue with our server and some image data was lost. However, the MySQL database survived and now means that there are roughly 200 photo entries in the database that point to no actual existing images.

When I try to remove the entries (aka delete albums and photos within albums) I get an error saying,

Quote
Directory 'albums/###/' is not writable, files can't be deleted

Where "###" is the album number.

Of course this is because no such ### folder exists. Is there any way I can fix the problem? You can see the gallery here:

http://www.avrilbandaids.com/Gallery
Title: Re: Lost images due to server crash
Post by: phill104 on November 19, 2007, 10:23:48 pm
You could use a tool such as phpmyadmin to manually edit the database.

Does your host not have a recent backup you could restore to?
Title: Re: Lost images due to server crash
Post by: Forgott3n on November 19, 2007, 10:33:25 pm
You could use a tool such as phpmyadmin to manually edit the database.

Does your host not have a recent backup you could restore to?

I can manually delete the images in Phpmyadmin, I am just wondering if there is an easier/faster method. There is no way to use a backup to restore the lost images. This is due to the fact that this dedicated server did not have the backup system activated until after the crash. It was then we realized that no such system was online.

Could you tell me which entires I have to delete or edit to make sure I don't break the database by accident?


Thanks.
Title: Re: Lost images due to server crash
Post by: Nibbler on November 19, 2007, 10:46:03 pm
Best thing to do is create the directories it complains about. If you delete things manually then you could end up with the database in an inconsistent state.
Title: Re: Lost images due to server crash
Post by: Forgott3n on November 20, 2007, 02:19:53 am
Best thing to do is create the directories it complains about. If you delete things manually then you could end up with the database in an inconsistent state.

Would it be wise to create a tool to automatically weed out missing data so one doesn't have to manually remove albums? Thanks for your help, I've started on your method.