Photos Resources‎ > ‎Photos & Picasa FAQ‎ > ‎Picasa‎ > ‎Troubleshooting‎ > ‎

How to rebuild the Picasa database

The Database is where Picasa keeps an index of all the pictures along with all information and thumbnails on all the folders and pictures being managed by Picasa. Rebuilding the database is the process of purging the database of incorrect or damaged information and then rebuilding the information.

This process can take quite a while... and depends a lot on the situation, but an hour per 10.000 pictures for finding the pictures AND doing the face recognition should suffice. 

Read the advantages and disadvantages and choose the method of rebuilding the database below.


Reasons for rebuilding

Rebuilding the Database is the process of purging the database of incorrect or damaged information and then rebuilding the information. The data to rebuild the database comes from the "MetaData" included in the photos, and the hidden .picasa.ini files that Picasa writes to each folder containing pictures.

There are a number of cases where the Picasa Database can become corrupt:

  • If Picasa is stopped or exits or freezes unexpectedly, the database can become confused and not reflect the data in the computer accurately.
  • The database can get scrambled where the pointers in the database or the thumbnails can point at the wrong photos or files.
  • CBlock errors are where the database records or pointers are corrupted and cause Picasa to stop with a database error.
If your Picasa library is showing broken thumbnails such as these, it's time to rebuild the database: 



Limitations on Rebuilding 

Some data is only saved in the Picasa database... so will be lost when rebuilding the database.

  • Ignored Faces
    One other thing that happens when you rebuild the database is any faces you have "ignored" will go back into the "unnamed" People album.
  • Picture order
    The order of the pictures in both folders and albums is only saved in the Picasa database.
  • Some movie edits
    • If you add/change the "date taken" of a movie, it will only be stored in the picasa database
    • If you add/change the "geotag" of a movie, it will only be stored in the picasa database
  • Double Face Labels
    After Picasa gets done detecting the faces, there will probably be some faces, especially ones that were manually labeled in the past that will have a second rectangle for the same face. This could be because the manual rectangle was a different size or placement, or the face detection algorythm is improved. 
  • In rare cases: any data that didn't get in the photo metadata or .picasa.ini files
    • If the .ini files were erased for any reason, the data stored in them ofcourse will be lost (eg. albums, cropping,...) 
    • If an ini file is set to read-only, Picasa won't add any data to it anymore
    • If a picture file is set to read-only, Picasa won't add the caption to it anymore. Other metadata (geotag, normal tag,...) gets added nonetheless.

The Google or Mac way (Method A)

  • Advantages:
    • Simple and endorsed by Google.

  • Disadvantages:
    • Almost All  Faces will be grouped together but some may be labeled <Unknown Person> depending on how the People Names are stored.
      • If the setting: [Tools -> Options -> Name Tags -> Store Name Tags in Photo] is Enabled, Faces named after it was enabled will be retained.
      • If the People Names were only saved in the contacts.xml file in the database, the faces will be grouped together, but named <Unknown Person>. This is typically a small percentage of the Persons, but it just depends on what is stored in the ini files and XMP Metadata in the photo.
      • Google and Picasa are silent on the subject of retaining Face Tags
      • See Limitations on Rebuilding at the bottom of this paper for limitations to any method of rebuilding the Picasa Database.

  • Database Rebuild Procedure:
    • On Mac
      1. Open Finder 
      2. Browse to the following location: Your User Name > Library > Application Support > Google > Picasa3
      3. Delete the db3 directory
    • On Windows
      • Delete the db3 directory
      • First , uninstall Picasa:
      1. Click on the Start menu on your computer taskbar.
      2. Select All Programs.
      3. Select Picasa 3.
      4. Select Uninstall.
      5. In the confirmation window that opens, click the Uninstall button.
      6. Click the Yes button to remove your database.
        Note:  Make sure that you answer "Yes" to step 6 to delete the database.
    • Once you've successfully uninstalled, you can download and reinstall Picasa by visiting http://www.picasa.google.com.
    • Start Picasa and tell it to scan My Pictures and My Documents folders.
    • Wait until Picasa completes scanning all folders and rescans the faces.
 
NOTE:

Any time after  Picasa starts scanning My Pictures and My Documents you can go to the Tools menu -> Folder Manager and tell Picasa which folders to "Scan Always" and which to "Remove from Picasa"  if you have custom picture folders.

The alternate, safer way (Method B)

  • Advantages:
    • Safer because you can go back to your previous database if you don't like the results.
    • It is not necessary to reinstall Picasa or tell it which folders to watch if they were already defined.
    • Most Face Names will be restored due to keeping the database Contacts.xml file.

  • Disadvantages:
    • Requires some familiarity with Windows operations and knowledge of "Windows Explorer" including ability to select, copy, paste, and delete files.
    • See Limitations on Rebuilding (above) for limitations to any method of rebuilding the Picasa Database.

  • Database Rebuild Procedure:

1) Close Picasa.

2) Navigate to the Google application data folder on your computer. There are numerous ways to get there; here are 3 methods:
  1. Press the "Windows button" on your keyboard (sometimes labeled "Start") plus the R key - to open the Run screen.
  2. Click the round "Start" button (lower left corner of your desktop) (to find the search box). 
  3. Open Windows Explorer and paste the appropriate path below into the path field; press Enter.
    Paste the appropriate path below (depending on your operating system) into the Run screen or into the Start search box:
  • Windows XP:     %userprofile%\Local Settings\Application Data\Google\
  • Windows Vista / Windows 7 / Windows 8 / Windows 10:  %LocalAppData%\Google\
3) In the Google folder, you'll see two folders that have "Picasa" in the folder name: "Picasa2" and "Picasa2Albums.
(Note that these folders have Picasa2 in their folder name even though the program is Picasa3)
You will now copy those two folders, so that you have a backup. Here's how to copy the two folders:
  • Right-click on the Picasa2 folder and select Copy, then right-click again into an empty space in the Google folder and select Paste.
    Copying could take a long time (for example, 30 minutes or more) if you have a large collection of pictures. The copied folder will be named "Picasa2 - Copy"
  • Repeat the copy and paste process with the Picasa2Albums folder. The copied folder will be named "Picasa2Albums - Copy"
    These two "- Copy" folders are your backup copy of the Picasa database.
4) In this step, you will be doing some deletions of database files. 
In the Google folder, double-click on the "Picasa2" folder to open it, then double-click the "db3" folder to view the database files. 

Read carefully: You will now delete all the database files in the db3 folder except these three files:
  • scanlist.txt
  • thumbindex.db
  • thumbs_index.db
5) Start Picasa... and wait... it will probably take an hour or more to scan your pictures and about 2 hours per 10,000 pictures to rescan the face tags. 
    (it will rescan the faces, but Picasa will see that you tagged them already and assign the correct name automatically).
         Note: 1.  You May get a couple of CBlock errors when Picasa starts, Just answer OK to each.
                  2.  If Picasa fails to start follow Picasa Fails to Start Using Alternate Method B directions below.
  
6) Evaluate the results long enough to be sure you are happy with the newly rebuilt database.
  • If the rebuilt database is not satisfactory, and you want to roll back to what you had before the rebuild, follow Roll Back to Previous Database directions below.
  • If the rebuilt database is satisfactory, you may want to delete the backup copy of the previous database, see Remove Previous Database directions below.
End of Procedure

 
Roll Back to Previous Database after trying Alternate Method B:
 If you don't like the results after the rebuild you can roll back to your old database by following these steps:
 
1) Close Picasa. 
2) Navigate to the Google folder as in Step 2 of Method B above. 
One way to do that: Open the "Run" window by pushing the "Windows button" (sometimes labeled "Start") + R
    Paste the appropriate path below:
  • Windows XP: %userprofile%\Local Settings\Application Data\Google\
  • Windows Vista / Windows 7 / Windows 8: %LocalAppData%\Google\

3) There are four folders named Picasa2, Picasa2Albums, Picasa2 - Copy, and Picasa2Albums - Copy.
     The 2 "- Copy" folders are the Backup of the "Old" database that was saved before the rebuild.
     The Picasa2 and Picasa2Albums folders are "New" database that was generated by the rebuild procedure.

  • If the two "- Copy" folders are not there, it is not possible to roll back to the Old Database.
  • If you want to Keep a copy of the "New" database in case you want to try it again, rename the Picasa2 folder to Picasa2_new, and the Picasa2Albums folder to Picasa2Albums_new.
  • If you are sure you don't want to keep the "New" database you just generated, delete the 2 folders Picasa2, and Picasa2Albums. 
  • Right-click on the "Picasa2 - Copy" folder and rename it to "Picasa2"
  • Right-click on the "Picasa2Albums - Copy" folder and rename it to "Picasa2Albums"
4) Start Picasa. It should start up immediately in the condition it was before the rebuild. There may be minor scanning if photos were added or changed.

End of Procedure
 
Remove Previous Database after using the Alternate Method B:
If you like the results after the rebuild you can remove the unneeded previous database by following these steps:
 
1) Open the "Run" window by pushing the "Windows button" (sometimes labeled "Start") + R
    Paste the appropriate path below:
  • Windows XP: %userprofile%\Local Settings\Application Data\Google\
  • Windows Vista / Windows 7 / Windows 8: %LocalAppData%\Google\
2) There are four folders with "Picasa" in the folder name: Picasa2 , Picasa2Albums, Picasa2 - Copy, and Picasa2Albums - Copy.
  • Delete the two folders "Picasa2 - Copy" and "Picasa2Albums - Copy".
  • If the two "- Copy" folders are not there, the previous database was already removed.

End of Procedure 

 


Picasa Fails to Start Using Alternate Method B:
In Alternate Method B Step 5, Picasa could fail to Start if there is a critical error in a remaining Database file,
or if there are errors in the Watched folders list.
If Picasa fails to start or finds no photos, do the following: 
1) Close Picasa.

2) Navigate to the Google folder on your computer. There are numerous ways to get there; here are 3 methods:
  1. Press the "Windows button" on your keyboard (sometimes labeled "Start") plus the R key - to open the Run screen.
  2. Click the round "Start" button (lower left corner of your desktop) (to find the search box). 
  3. Open Windows Explorer and paste the appropriate path below into the path field; press Enter.
    Paste the appropriate path below (depending on your operating system) into the Run screen or into the Start search box:
  • Windows XP:     %userprofile%\Local Settings\Application Data\Google\
  • Windows Vista / Windows 7 / Windows 8:  %LocalAppData%\Google\ 

3) In the Google folder, you have previously copied the folders named: "Picasa2" and "Picasa2Albums, so you should already have the two - Copy folders for backup.

4) In the Google folder, double-click on the "Picasa2" folder to open it, then right-click the "db3" folder and delete it. 
 
5) Start Picasa. You will see a welcome page asking you if you want to scan everything or only My Pictures. Select Only My Pictures. You will see another page asking you about Photo Viewer. Select 'Don't Use Picasa Photo Viewer, you can enable it later if you want it. 
 
6) Picasa will now start scanning for photos and folders ... it will probably take an hour to scan your pictures and about 2 hours per 10.000 pictures to rescan the face tags...
 
 7) If you want to decide which folders Picasa should scan, then after Picasa starts scanning, go to the top menu Tools -> Folder Manager. In the Folder and drive tree on the left set all drives and folders except any you have photos in to "Remove from Picasa", and click OK. Then go back in to the Tools -> Folder Manager, and set any folders you want to see in Picasa to "Scan Always".. and click the OK button to continue scanning including any newly selected folders.
End of Procedure