I have a new laptop and I've copied across my photo collection and digikam set up. But when I open up digikam, it shows me very few of my albums. I faithfully copied across my settings, including:
~/.kde/share/apps/digikam/*
~/.kde/share/config/digikamrc
~/Photos/*
with all my photos and including the sqlite databasedigikam4.db
But when I started, digikam didn't find most of my albums. I opened up digikam4.db from backups and after digikam had opened, and found that most of my albums had been deleted. How can I get digikam to show everything again?
Turns out that digikam saves the full path to the photos directory, not just relative to your home directory. I had to correct this in a few places as I had changed username when moving laptops, so the full path to the photos had changed from
/home/user1/Photos
to/home/user2/Photos
.First I had to edit the text file digikamrc -
gedit ~/.kde/share/config/digikamrc
and search foruser1
. The settings were called "Database Name" and "Database Name Thumbnails".Then I had to edit some settings in the sqlite file. I did this by using the sqlitebrowser GUI app which allowed me to open digikam4.db, choose each table one by one, and then edit the contents by double-clicking on a cell in a table. The tables that needed updating were:
identifier
column. I had to changevolumeid:?path=%2Fhome%2Fuser1%2FPhotos
tovolumeid:?path=%2Fhome%2Fuser2%2FPhotos
and similariconkde
column has some entries where the tag image is a photo, which is saved as the full path to the photo, so they needed their paths updating.