messed up database and recovery

249 views
Skip to first unread message

Shadow Chaos

unread,
Apr 18, 2012, 6:49:13 PM4/18/12
to Picasa starter
hello all,
First thank you picasa team and earlboss for all the hard work done
here. I have been using picasa and picasastarter for a long while now.

And Now I have finally screwed up :S

Heres the short story
1. made a databas on my desktop. save pictures to it, tagged photos,
wrote captions and notes on them. Used that for a while now.
2. the database (all photos and picasastarter/picasa files) got moved
to a server (home nas with file share)
3. when the database was run from there SOME of the tags/face/captions
stayed but allot were missing.
4. I copied the database (again all pics and picasa/ps) files back to
my desktop. (in attempt to save the notes and captions and faces)

now some of the tags/faces/caption are there, some or incorrectly
applied to the wrong pictures and some are missing.

Unfortunately the underlying folder structure got changed. (bad I
know)
it was
desktop/photos/ (subfolders)
on my desktop
when it went to the nas it became
photos/(folder)/ subfolders.

Is there a way I can recover the tag/captions at all and then set up
the database on my nas PROPERLY and keep as much as possible? possibly
by opening the database in notepad and finding all the captions with
what photos they should be on or something?


Thank you so much to anyone who can offer advice!

earlboss

unread,
Apr 18, 2012, 7:48:33 PM4/18/12
to picasa...@googlegroups.com
Hi Shadow:
 
 
Please tell me you backed up the database somewhere! - You are not completely out of luck if not, but it might make it easier and more complete. Also are you using Picasa 3.9??  If not, don't change yet, but if so it is probably better.
 
I have never been able to edit the folder names in the database because they are not text files. and the structure is murky. Also when I talk about Pictures I just mean the Picture folders with the pictures and the ini files.  When I say Database I mean the files in the Google\Picasa2, and Google\Picasa2Albums folders.
 
Ok, I am not completely sure about Picasa 3.8 without doing a lot of checking, but in 3.9, the Captions are stored in the tags inside the picture, so you should be able to get the captions back.
The facetags, or at lease an alphanumeric string representing the face is stored in the .ini file in each picture directory, and these strings are referenced to person names in the contacts.xml file, so the main thing is getting all this data referenced to the pictures and back into the database.
 
The easiest thing would be if you have a complete backup of the pictures folders and database files. In that case you could copy all the pictures back exactly where they were, and copy the database back where it was.
I assume you don't have the above? Otherwise we wouldn't be talking!
I also assume the nas is mapped to a drive letter, if not, do it now.
 
The next best thing is if  when you copied the picture folders you copied the whole folders so the .ini files are still in them. At this point you should put the pictures where you want them to end up, Probably on your NAS drive, and Photos/(folder)\subfolders should be fine. (If that means all the Photos are in photos\ and nothing else is. It is always easier to define the folders to watch if there is a containing folder for all of them.
 
Use PicasaStarter to make a database somewhere, and copy the least screwed up database there.
 
Start Picasa with that database, then immediately go to tools-folder manager and set all the directories to remove from Picasa.
Then set the NAS Photos directory with it's picture folders to scan always.
 
Go away for a few hours until Picasa is done rebuilding the database.  It has to rebuild ans scan faces, and that could take a long while. You won't know how well it went until it is done, because the faces have to be scanned, but once they are, they should be named.
 
See how well that goes before we start trying to do more.  You will probably have groups of faces that are grouped together but unnamed.
 
Good Luck,
Earl

earlboss

unread,
Apr 19, 2012, 3:11:13 PM4/19/12
to picasa...@googlegroups.com
Hi Shadow:
I was kind of rushed before (above). I'm going to just do an outline here.
 
PLANNING:  I advise you to figure out where you want the pictures to end up after you go through the trouble, because the database includes the path to the pictures, and if you change the path, you will have to rebuild the database.
 
- The best way to handle a NAS in my opinion is to make a new directory on the NAS. (maybe call it something like "Picture drive source") 
- Make a subdirectory called Pictures or something that will contain all the picture subfolders. 
- Make a directory called something ilke Database which will be the database. 
- Make a directory called PicasaStarter and copy PicasaStarter and it's DLLs.  This will be where the settings file will be, and it is always nice to have PicasaStarter on the NAS too in case someone else needs to use it.
- Using the "Map Network Drive" function in Windows Explorer, Map the NAS folder you  made above (Picture Drive source) to a Drive letter. I suggest a fairly high letter so it isn't likely to be already used. I usually use the P: drive for this.  Then do all the stuff below where I say NAS on the P: drive. This will make the P: drive have only Pictures instead of having the whole NAS visible.
 
Once you have the P: drive filled and working, you can map it to P: on any other PC on the network, and it will work.  You can also use "Picture Drive source" folder as the Virtual Drive source if you don't want to map it statically, although static is better while you are setting it up.
 
 
1. The best thing is if you have a backup copy of both the picture folders and the database folders. In that case the best thing to do is to get everything back to where it was (in Desktop etc.).  Then when it is the way it was, make a couple of copies of the database with PicasaStarter. Put one of them on the NAS, then use that database copy on the NAS to move the Pictures to the NAS. You would do that using the Picasa Move Folder function, so the database would be updated to the new drive without rescanning. See the FAQ or User Guide on the PicasaStarter site.
 
2. If you don't have a full backup or can't put the Pictures and database back where they were:  The next best thing is if you still have the database somewhere (preferably the original one). and the copies of your picture folders include the Picasa.ini files. In this case you put the Picture directories on the NAS in their final destination, Then copy the default personal database to a new database you create on the NAS.  Then start Picasa from PicasaStarter on this new database.  As soon as Picasa starts, go to tools-Folder manager and set all drives and folders to remove from Picasa, and set the NAS directory that holds the Pictures to Scan always. This will require Picasa to scan all of the Picture folders and match the Faces it finds with the face tag in the .ini file and the face name in the Contacts.xml file.
 
3. If the Database has been corrupted or some of the .ini files are not available,  You can try to build a new database from scratch, but start it once for a few seconds, then copy the Contacts.xml file to the new database from whatever copy of the database you can find. This will name the faces in the folders that have the .ini files, and make it easy to name groups of faces by just typing a few letters of the name.  This also requires a complete scan.
 
Ok, that is enough for now.

Shadow Chaos

unread,
Apr 19, 2012, 3:44:03 PM4/19/12
to Picasa starter
woah complete reply. thanks
no, I made the database before I started backing up to my freenas,
everyone has to learn the hard way sometime or another.

I can and did move the directory back to its original location. but
since it was run from the wrong location (my old nas) and the
underlying folders where changed I think it got screwed up because the
captions are on
the wrong photos! If I can at least fix the caption I can be happy,
faces would be nice to but not as important..

earlboss

unread,
Apr 19, 2012, 5:23:47 PM4/19/12
to picasa...@googlegroups.com
Wow! You've really got me now.  As far as I know, the captions are stored in the pictures, so I don't know how they would get to the wrong pictures.
 
All I can think of is the database is screwed up to the point where it can't keep the pictures straight.
 
Try making a new empty database. give it a unique name, and "Create an empty database" from the button in the database edit screen.
 
Start Picasa with it pointed at that database, and don't let Picasa search for pictures.
When Picasa is started go to tools-Folder Manager and make all the drives remove from Picasa.  Then set the directory that has the pictures to scan always, and let it rip!
This will force Picasa to read all the Ini files and the Picture tags to make the new database.  Face scanning and maybe captions will take a while, and the faces will probably be grouped but not named.
Let me know if this does any good.
 
Earl

Gill & Terry Bass

unread,
Apr 20, 2012, 10:30:05 AM4/20/12
to picasa...@googlegroups.com
The Captions are definitely stored within each photo. I use another product called Zoner to batch update Captions plus other info such as copywrite, country, location, etc., Picasa displays this info correctly so from this I assume that Picasa is following some industry standard. I'm on Picasa 3.9 at present using PicasaStarter v 1.5.0.2

earlboss

unread,
Apr 20, 2012, 12:25:39 PM4/20/12
to picasa...@googlegroups.com
Hi Terry:
Thanks! I was sure the caption was in the picture, in fact I have seen it there in the tags both in Picasa and in other photo editors. Then of course it is hard to figure out how they could be on the wrong pictures in Shadow's case, so I hope rebuilding the database is the answer.
 
I just looked at Zoner (Free edition) and it seems to be a nice little thing, and you are right it looks like a cool way to check and edit the captions
 
I see you are sticking with PicasaStarter 1.5 for now, which is just fine. 
2.0 has some added features and it doesn't screw with the syatem as much as 1.5, because Picasa 3.9 allows you to move the database with a registry key change, but if 1.5 is doing everything you need, there is no compelling need to change.
 
Best Regards,
Earl

Shadow Chaos

unread,
Apr 20, 2012, 12:28:40 PM4/20/12
to Picasa starter
Earlboss and terry,
Thank you both. going off of earlboss's recommendation I created an
empty database on my nas.
Picasa rescanned and found mostly all the captions!
it found the faces too but they were all "unnamed person" or
something.
Now about the captions being written to the photos themselves, I
though only JPEG/JPG could get metadata written to them? not pngs.

Thanks again!
> ...
>
> read more »

Shadow Chaos

unread,
Apr 20, 2012, 12:37:49 PM4/20/12
to Picasa starter
yes it is as I have suspected, the captions for JPEGS are stored in
the files but the captions for PNGs are stored in a .ini file in the
photos folder:
::::.picasa.ini:::
[106209435Was_n.jpg]
backuphash=48885
[6045669Dogphoto23.jpg]
backuphash=6004
[88ccbtreelake0-large.jpg]
backuphash=23263
[bandana.png]
caption=Bandana
backuphash=4243
star=yes


Notice how only the .png has a caption under to it, even though I
added captions to all the photos.
> ...
>
> read more »

earlboss

unread,
Apr 20, 2012, 1:01:17 PM4/20/12
to picasa...@googlegroups.com
Hi Shadow:
You got me there! I made the hasty assumption that you were using Jpeg format Photos and didn't consider other formats.  The Picasa help stuff says that the data is stored in the tags in formats that support it, (and that Picasa supports) and in the ini file when Picasa doesn't support the tags on that file type.
 
You could try the same new database thing again, but in this case copy the contacts file from one of your previous copies  back into the database after you set the pictures directory. Or even make a copy of your new database and substitute the contacts.xmp file from your old database into it.
 
Find a contacts.xml file in one of your old databases and look at it with a text editor to see your contacts, just FYI.
 
Earl

Pieter Roggemans

unread,
Apr 20, 2012, 1:51:36 PM4/20/12
to picasa...@googlegroups.com
btw... on the picasastarter site, in the section with custom buttons
you can find a button that shows the info stored inside an image. if
you are in doubt, this can be a good doublecheck to see picasa is
storing the info properly ins the jppgs.

another remark: if the image file is set to read-only on the
filesystem, picasa won't store the metadata inside the jpgs either...

2012/4/20, earlboss <earl...@gmail.com>:

Shadow Chaos

unread,
Apr 24, 2012, 3:08:42 AM4/24/12
to Picasa starter
Pieter and Earl
Thanks for the help. I got it all fixed up now.
I'm just going to manually re-add the faces.
Oh and backup the db every so often too.


On Apr 20, 10:51 am, Pieter Roggemans <pieter.roggem...@gmail.com>
wrote:
> btw... on the picasastarter site, in the section with custom buttons
> you can find a button that shows the info stored inside an image. if
> you are in doubt, this can be a good doublecheck to see picasa is
> storing the info properly ins the jppgs.
>
> another remark: if the image file is set to read-only on the
> filesystem, picasa won't store the metadata inside the jpgs either...
>
> 2012/4/20, earlboss <earlb...@gmail.com>:
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages