Saturday, January 14, 2012

How to restore Picasa albums

I really love using Picasa to edit and organize my photos. It has a fantastic set of features for editing as well as sharing. However, I had some issues when I moved some photos from my internal hard drive to my external hard drive: the albums created from these pictures disappeared. I had spent a lot of time making these albums so I was determined to find a way to restore them.

Picasa keeps backups of old albums, so at first I tried just copying the backup files into the "current albums" folder. However, Picasa seems to be too smart for such a simple hack and would undo all of my work immediately. I Googled many times trying to find a solution that would work but none were 100% correct. After combining the tricks I read about, I discovered the following solution.

Edit: it seems as though Picasa has changed the way it stores albums starting with build 3.9.0.522 which was released on December 8, 2011. You can read their release notes here but essentially it looks like they'll be storing album information in the same picasa.ini files that they already used to store photo edits. Hopefully this post is soon useless!

Setup:

How to restore your "missing" albums:
  1. Locate your "missing" albums.
    1. I found mine in [home folder]/Library/Application Support/Google/Picasa3/Picasa3Albums/backup/[date]
  2. Identify your missing albums.
    1. Open each album file (it ends in ".pal") in a program such as MacVim.
      1. You should be able to spot the title of the album around line 7 or 8, as shown in the picture below (power users see the script at the end of this post to automate this process):
        Locating the album title in the .pal file
      2. If this is one of the missing albums, follow step 3 and then return to this step for each subsequent album.
    2. Note: do not use TextEdit -- it automatically saves extra information that you don't want and will cause this process to fail.
    3. If you're using Windows, you might try something like Notepad++ instead of MacVim.
  3. Copy the "missing" album to a new folder (in case you mess something up).
    1. If your album is missing because you moved your pictures without telling Picasa, you'll need to use this file to point to the correct files. Do this by editing the "filename" entries; one is highlighted in the picture below:
    2. Changing the album's knowledge of the path (location) of your files in the .pal file.
  4. Create a "backup" of your existing albums using "Tools -> Back Up Pictures"
    1. Click "New Set"
      1. Make sure you use "Disk-to-disk backup"
      2. Choose a location you can easily find again (we'll call this the "backup folder" from now on)
    2. Make sure you click "Select none" so you're actually not backing up any picture files
      1. If the "Backup" button won't light up, try selecting then deselecting an album
    3. Go into the backup folder and then open the folder. $Library/Application Support/Google/Picasa3/Picasa3Albums/
    4. Open up the only folder within (it should be a weird mash-up of letters and numbers). Put your edited "missing" album files into this folder.
  5. Go to the Picasa3 folder (in [home folder]/Library/Application Support/Google/Picasa3/) and rename it something like "Picasa3 BACKUP". If you ever need to undo the steps in this tutorial, delete the Picasa3 folder that will be created in future steps and rename your backup folder back to "Picasa3".
  6. Go to Applications/Picasa, right-click and choose "Show Package Contents". This lets you see hidden parts of the application.
  7. In the new window that pops up, go to the folder Contents/Resources/cdautorun/ and double-click "Picasa Restore.app"
    1. The window that pops up looks like an error, but don't worry about it. Instead, choose "Open Manifest..." and choose "PicasaManifest.xml" in your backup folder
  8. Now start up Picasa again and let it search for all of your photos again. When it finishes, all of your albums should be back!

Did this work for you? If not, what went wrong?


Power users:
I created a little shell script to automate the process of finding the album titles. Here it is:

#!/bin/bash/
for f in *.pal
do
        echo "Processing $f"
        head -7 $f | tail -2
echo ""
done
Note that you'll have to store it outside of your Picasa3 folder since Picasa tends to wipe out any unrecognized files. Run it from within the albums folder (the one with all of the .pal files).

1 comment:

  1. my photos were deleted by picasso where are they

    ReplyDelete