Disaster recovery help

peemhq

Joined: 2009-07-03
Posts: 2
Posted: Fri, 2009-07-03 23:35

Hi

By some coincidence involving rush and careless, I've managed to destroy my gallery2 database. Unfortunately backup was bit corrupted and I ended up by setting up new gallery installation using old file structure. Now, new installation is missing all my descriptions, keywords and titles. I have two tables from old database : g2_filesystementity and g2_item. As far as I can see, one is containing filenames, second is holding descriptions, titles and keywords. Both have gallery ID linking them, so theoretically there should be possible to create script moving that data to new database based on filenames existing in it. Is that possible and if so, do I need to be aware of anything else database wise ?? I don't want to end up importing data just to find out that there is another table which needs to be updated. As I'm seeing it, I'm trying to replicate editing of picture title and description in bit more automated way, so probably I need info of what is being updated during such edit.


Gallery version : 2.6, main module 1.3.0
API : Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version : 5.2.9 apache2handler
Webserver : Apache 2.2
Database : postgres7 8.3.7
Activated toolkits : Thumbnail, Gd, ImageMagick, ArchiveUpload, Exif, LinkItemToolkit, NetPBM
Operating system : Linux 2.6.28.9-3 #1 SMP i686
Browser : Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.11) Gecko/2009061223 PLD/3.0 (Th) Iceweasel/3.0.11

Regards
Piotr

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9283
Posted: Tue, 2009-07-07 01:39

If you've imported the photos into your new install, every photo has a different ID than it use to. So mapping them to the old IDs is going to be very labor intensive. Good luck.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16320
Posted: Tue, 2009-07-07 02:37
Quote:
Gallery version : 2.6, main module 1.3.0

He has a time machine so he might be able too without luck. :-)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
peemhq

Joined: 2009-07-03
Posts: 2
Posted: Tue, 2009-07-07 18:30

@nivekiam

No, I don't want to map them to old id. My idea is that I have same file name for each photo in both databases (new, working one and old, corrupted) So, in theory script could :

1. go to new DB, picking filename from g2_filesystementity table.
2. save new ID for later.
3. go to old DB, matching this filename to old ID from g2_filesystementity table.
4. go to old DB, matching old ID in g2_item table.
5. save content of fields from old g2_item table.
6. insert saved content to new g2_item table under new ID

As I'm seeing it, it would be only scripted replacement for manually typing that content (title, description, keywords) for each picture in new instance of gallery2. I just need to know if there is anything else updated during such operation when I'm doing it in gallery interface, so I can fully reproduce this process in script without corrupting new installation..

@floridave

This is very strange. I've copied this data from system info in my gallery installation. Only thing I've translated polish terms into english, as it would be bit difficult to understand it for most of people. It is quite hard to get help if nobody understand what problem you have. Readme file says 2.3, so I will stick to it, however, this is freshly copied and not translated original :

Wersja galerii = 2.6 moduł główny 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
Wersja PHP = 5.2.9 apache2handler
Serwer WWW = Apache
Baza danych = postgres7 8.3.7 3 8.3.7, lock.system=flock

2.6 number is still there. :-)

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16320
Posted: Wed, 2009-07-08 01:42
Quote:
2.6 number is still there.

Strange indeed.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments