Backing up the picasa 3.6 db when "backup pictures" is borked

18 views
Skip to first unread message

John Washbourne

unread,
Dec 27, 2009, 1:14:53 PM12/27/09
to Google-Labs-Picasa-for-Linux
Further to my post a couple days ago - if you get picasa 3.6 working
it seems likely that the "backup pictures" feature is borked (at least
for me on ubuntu 9.10 with wine 1.2). I found that a reasonable thing
to do instead is to backup the albums and the db, since you can
rebuild the database easily by pointing to the directories with your
images. I believe picasa can recover edits even with a missing
database from the picasa.ini and .picasaoriginals bits left around. I
do know that a couple weeks ago when I was using 3.0 and first
migrated to 3.6, I lost the db and was only able to recover albums
after a bunch of painful twiddling. What I learned after all that is
that if the image paths remain intact, you can copy the folder with
the albums (.pal files) to the right location and get back in
business.

Here is a quick hack to backup the essential bits of the picasa
database. I run it nightly, or more often if I am in heavy editing
mode. I haven't had any issues with 3.6 except for a freeze or two,
but you can't be too safe once you have a hundred hours into
something. For 30K pictures this creates a tar.gz archive around 1 Gb,
although the unpredictable nature of the picasa db compaction results
in some variability.

If you untar the backup into the right directory, you will get the
exact picasa db and albums from the time of the backup.

<code>
#! /bin/csh

set date = ( `date +%Y.%m.%d` )
set file = ( /home/$USER/picasa_backup.`date +%Y.%m.%d`.tar.gz )
cd /home/$USER/.google/picasa/3.0/drive_c/Documents\ and\ Settings/
$USER/Local\ Settings/Application\ Data/
pwd
set c = ( tar czf $file ./Google )
echo $c ; $c
</code>

John Washbourne

unread,
Dec 27, 2009, 10:07:47 PM12/27/09
to Google-Labs-Picasa-for-Linux
Sweet! I can confirm that picasa 3.6 will recover individual edits
from a broken db, and albums from the respective xml (.pal) files. The
pal files only need to be on the path that picasa scans to be
recovered.

You can delete the contents of the db3 directory, start picasa and
have it regenerate the database, and all edits will be preserved. This
is useful if you screw up your db like I did with an inadvertent soft
link (the pictures are duplicated but the path in the db is the actual
path, not the path with the soft link).

This implies that if you back up the images themselves with a way to
restore paths, and backup the album xml files, you are covered.

Barry Jackson

unread,
Dec 28, 2009, 7:44:37 AM12/28/09
to google-labs-pi...@googlegroups.com
> --
>
> You received this message because you are subscribed to the Google Groups "Google-Labs-Picasa-for-Linux" group.
> To post to this group, send email to google-labs-pi...@googlegroups.com.
> To unsubscribe from this group, send email to google-labs-picasa-f...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-labs-picasa-for-linux?hl=en.
>
>
>
Thanks for the tips John - I don't do a great deal of work with Picasa
but the script looked interesting so I've been playing around with it.
I don't have (or particularly want) csh on my machine so I tweaked it to
run in bash instead :-

#!/bin/bash
# picasa_backup.sh

date=$(date +%Y.%m.%d)
file="/home/$USER/picasa_backup.$date.tar.gz"
cd /home/$USER/.google/picasa/3.0/drive_c/Documents\ and\
Settings/$USER/Local\ Settings/Application\ Data/
pwd
tar czf $file Google
echo $file

John Washbourne

unread,
Dec 28, 2009, 3:37:44 PM12/28/09
to Google-Labs-Picasa-for-Linux
dood!

bash : csh :: emacs : vi !

Which may be ambiguous, so to be clear what I mean is that vi rocks,
emacs sux, csh rocks, bash sux.

> > For more options, visit this group athttp://groups.google.com/group/google-labs-picasa-for-linux?hl=en.

Barry Jackson

unread,
Dec 29, 2009, 9:09:30 AM12/29/09
to google-labs-pi...@googlegroups.com
I'll take your word for it - I never looked at csh, however...
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
:-)
Reply all
Reply to author
Forward
0 new messages