PDA

View Full Version : Recovering from desaster and resetting Image ID's


okaven
10th of August 2005 (Wed), 11:34
Hello, All,

So....my story goes something like this:

(and yes, thank you, I am aware that a good backup would have prevented this situation) ;-)


I have a somewhat extensive ee database of images (around 3,000) , use IPTC tagging extensively and store my images on a NAS drive. I upload conventionally through ee's FTP and create 3 images sizes plus the thumbs and microthumbs per gallery.

Yesterday, my NAS device crapped out and I am left holding the bag. All images are gone (except for the originals of course—which I do backup onto an extra drive, DVD and tape). However, I did not backup the NAS device.

So, now I am sitting here with my functional database and an empty new NAS drive.

I obviously have to re-upload all original JPEG images through ee. This is a thought I have made myself comfortable with (in the end there is no other option, except for re-sizing and thumb nailing everything in Photoshop and then re-creating the directories that way).

The only problem I have is that ee keeps track of the images you have in the database, so re-uploading will add the first re-uploaded image as image number 3,001, rather than image number 1.

Question: Is there any way to reset ee's ID counter in the db to 0? Even if you delete all images in the db it keeps on counting from where you left off.

If this has been asked already, take my apologies and please just disregard.

Thanks for any good advice.

Oliver

Pekka
10th of August 2005 (Wed), 14:34
Sorry to hear you had so bad luck.

In phpMyAdmin choose the correct database, view ee_photo table, click operations and set in "Table options" auto_increment to 0.

Note that before you do this EE should have no photos at all, else it will cause errors. I have not tested this, so backup before testing :)

okaven
10th of August 2005 (Wed), 14:57
Pekka,

Thank you so much. That is going to save me. Otherwise, I would have started everything from scratch.

And, thanks for the backup advice LOL ;-) ....like I have anything to back up at this point ;-)

Oliver

ArtM
14th of August 2005 (Sun), 01:59
in the end there is no other option, except for re-sizing and thumb nailing everything in Photoshop and then re-creating the directories that way

This may or may not work in this situation; but with Photothumb you can create thumbs+1024 in one pass, microthumbs+800 in another, etc -perhaps in a more automated fashion than Photoshop.

http://www.photothumb.com/

- Art