Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
digikam 4:4.14.0-trusty~ppa1 amd64
The digikam database is sqlite format.
It contains a table AlbumRoots used to locate de database(s) and
pictures;
On a correctly working system it looks like:
$ sqlite3 ~/Pictures/digikam4.dbOne (as root) can look at the devices and its UUID:
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
AlbumRoots ImageHistory ImageTagProperties Tags
Albums ImageInformation ImageTags TagsTree
DownloadHistory ImageMetadata Images VideoMetadata
ImageComments ImagePositions Searches
ImageCopyright ImageProperties Settings
ImageHaarMatrix ImageRelations TagProperties
sqlite> .schema AlbumRoots
CREATE TABLE AlbumRoots
(id INTEGER PRIMARY KEY,
label TEXT,
status INTEGER NOT NULL,
type INTEGER NOT NULL,
identifier TEXT,
specificPath TEXT,
UNIQUE(identifier, specificPath));
CREATE TRIGGER delete_albumroot DELETE ON AlbumRoots
BEGIN
DELETE FROM Albums
WHERE Albums.albumRoot = OLD.id;
END;
sqlite> select * from AlbumRoots;
1||0|1|volumeid:?uuid=1a87f605-16e3-46f2-b973-37fe2b414561|/home/lucienne/Pictures
sqlite>
# lsblkThe (for me) amazing point is that the UUID of the / partition (/dev/sda1) is combined with a Path /home/lucienne/Pictures
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 145.1G 0 part /
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 8.8G 0 part [SWAP]
└─sda6 8:6 0 1.7T 0 part /home/lucienne
sr0 11:0 1 1024M 0 rom
# blkid
/dev/sda1: UUID="1a87f605-16e3-46f2-b973-37fe2b414561" TYPE="ext4"
/dev/sda5: UUID="a605a0e2-f440-407c-8de3-7872b366a8d1" TYPE="swap"
/dev/sda6: UUID="a343aead-ce3b-431e-8b49-da2a358c3a9b" TYPE="ext4"
When switching to a new machine using a backup of the
digikam files, we did encounter two problems:
1) The disks UUID's did change.
2) The location of the Picture files and Digikam DB got changed.
This seems related to
$ sqlite3 ~/Backup_digikam/digikam4.db.2015120323At startup digikam produces a screen :
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from AlbumRoots;
1||0|1|volumeid:?uuid=7199951a-fea7-4d70-ad7d-6dbeff318ee5|/lucienne/Pictures
$ sqlite3 digikam4.db
...
sqlite> select * from AlbumRoots;
1||0|1|volumeid:?uuid=7199951a-fea7-4d70-ad7d-6dbeff318ee5|/lucienne/Pictures
sqlite> UPDATE AlbumRoots SET specificPath='/home/lucienne/Pictures' where specificPath='/lucienne/Pictures';
sqlite> select * from AlbumRoots;
1||0|1|volumeid:?uuid=7199951a-fea7-4d70-ad7d-6dbeff318ee5|/home/lucienne/Pictures
sqlite> .exit
sqlite> UPDATE AlbumRoots SET identifier='?uuid=8c178eec-e410-4346-85c1-0fe9db3336f9' WHERE identifier='?uuid=8c178eec-e410-4346-85c1-0fe9db3336f8';