Database lost - Howto import hierarchy?

neca

Joined: 2006-05-23
Posts: 18
Posted: Tue, 2010-12-21 19:04

Hi,

I had two galleries on a server that crashed.
I managed to get all data files (complete hierarchy), and the database for one of the gallery (that I restored fine).
For the second gallery, I only have empty mysql description table files, they seem useless.

Is there a way to re-create / import this folder hierarchy into a whole new database?

My conf :

Gallery version : 2.3 noyau 1.3.0
API = Noyau 7.54, Module 3.9, Thème 2.6, Intégré 1.5
PHP version : 5.2.4-2ubuntu5.10 apache2handler
Webserver : Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch
Database : mysqli 5.0.51a-3ubuntu5.4, lock.system=flock
Activated toolkits : ImageMagick, Thumbnail, LinkItemToolkit
Operating system : Linux 2.6.32.2
Browser : Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.2.10)

Thank you.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-12-21 23:18
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-12-21 23:20

also if you have an old xml backup from that gallery I may be able to help you restore at least some of the descriptions, titles...

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

 
neca

Joined: 2006-05-23
Posts: 18
Posted: Wed, 2010-12-22 12:52

About your first answer : OK, this may be a primary and very useful help
About your second one : Though I completely forgot about this XML backup, the only one I yet had done were those on the first gallery (Murphy's law). Indeed, inside it, cryptic as it looks, this seems to contain valuable data that could be restored.

Anyway, I'm going now to work on your first proposal and see where it's going to bring me.

Thank you for your answer.

 
neca

Joined: 2006-05-23
Posts: 18
Posted: Wed, 2010-12-22 21:02

As I am a polite guy, I thought it would be polite to tell about the end.
- I recreated the second gallery. This hasn't been that easy, as it's part of a multisite setup, and this is not the easiest that exists.
- Doing that, I erased and recreated the second DB
- With the help of the Add_Item plugin, I was able to import the whole folder hierarchy into a brand new gallery
- This took time, especially when re-creating all thumbnails, but it worked flawlessly
- I lost every setting about the preferred picture of each album, and lost every description.
- Hopefully, I've the habit of using very explicit folder names, that helped me much (yyyymmdd-ThisAlbumsShowsMySonEatingMyTVremoteController ...)

So, once again, thank you for your help!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2010-12-22 22:02
Quote:
I lost every setting about the preferred picture of each album, and lost every description.

Sorry.
Lesson learned:
Backup -> Backup the Backup -> Backup the Backup of the Backup.....

Losing data is always a tough one, especially if you've spent any time customizing.

My importXML.php script crawls your gallery and compares filename and filesize to that of a gallery xml backup and will import the title, description, summary...
So if any items in your hardly restored match your backup let me know and I'll send you the script.

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