SUMMARY Hi Developers, Sorry I don't know how to reproduce the issue, I don't even know how it happened, is it caused by some of my action, or the program "randomly" made it happen, below is the issue: I've serveal Collections in SMB driver. Within each Collections, there're Albums (subfoders) One day, whithin one of my Collection, all Albums are gone, there's only one "Album", the Trash, and it's empty. All files still existed in the subfolders when I browse the SMB driver. I opened digikam4.db by sqlite3 tool. Observed and managed to restore it as below: observed: - in "AlbumRoots" table, collection is there, but the uuid in the "identifier" field string content is slightly "wrong" action: - I fixed the uuid, by referencing the uuid after manually re-defined the Collection folder path in Digikam observed: - in Albums table, all the entries, related to my missing albums, have null in "albumRoot" field, and what is suppose to be in "albumRoot" is now appended in "relativePath" field with dash. "Uncategorized Album" is in "collection" field. example: correct value:{ id:1170, albumRoot:13 relativePath:"/albumA", ..., collection:(null), ... } what I see:{ id:1170, albumRoot:(null) relativePath:"13-/albumA", ..., collection:"Uncategorized Album", ... } action: - by referencing other fine albums, I fixed these value result: - albums are now appear in DigiKam, but within it no photos are listed observed: in "images" table, entries related to my photos in missing albums, are having null in "album" field and 4 in "status" field, example: expected, correct data:{ id:20173, album,13 name:ABC.JPG status:1, ... } what I see{ id:20173, album:(null) name:ABC.JPG status:4, ... } action: - fix the "album" to correct value and set 1 to status result: - missing photos are now back in Digikam, with tags, everything looks good now. I appreciate you take time reading my post. I have three questions: 1, do you have a clue what happened? If this is a known issue (as I'm not using the latest released version), is it fixed now? 2, what does status:4 mean in images table? and what does "uncategorized album" mean in "albums" table? This is my first time looking into the db and I see many other photos with album:(null)/status:4, and other entries with "uncategorized album", what do they mean? 3, Looks I "fixed" my db by what I observed and verified it by checking images in Digikam, not sure if there're some more data I need to check and actions need to do, that I missed? Thanks you!
If you had a UUID in the album root, you set up your collection incorrectly. An SMB drive must be set up as a network collection. A local collection type is expected to always be online, e.g., the internal boot drive. If the folder isn't online, with an SMB drive, digiKam would remove all albums. Please update your digiKam version; we now use a UUID in a file folder (in the .dtrash folder) to resolve this issue. Unfortunately, the partition UUID changes with every major update on macOS. Maik
(In reply to Maik Qualmann from comment #1) > If you had a UUID in the album root, you set up your collection incorrectly. > An SMB drive must be set up as a network collection. > A local collection type is expected to always be online, e.g., the internal > boot drive. If the folder isn't online, with an SMB drive, digiKam would > remove all albums. > > Please update your digiKam version; we now use a UUID in a file folder (in > the .dtrash folder) to resolve this issue. Unfortunately, the partition UUID > changes with every major update on macOS. > > Maik Hi Maik, Thank you for your quick response. My configuration here is a bit more complex. Physically, the files are in a server, with SMB service. In macOS, each time before I launch DigiKam, I have a shell using mount cmd to mount remote path to my local folder. That way, any Mac app try to visit the path "/Users/xxx/xxx/" is in fact visiting the folder on my SMB server. In DigiKam, my collection is defined as "Collections on Network Shares", and the path I typed in the pop-up is "/Users/xxx/xxx/", which talked above. BTW, it seems even if I remove the uuid part of the string in database table, it also works. What does uuid mean to the app, since there already stored the file path? Thanks!
A network collection now only has one file UUID. If you delete it, a new one will be created when files are found in the specified directory. Please do not manually manipulate the root entries in the database; it has become a bit more complex. Use the "update" function in the digiKam collection settings. We will create a digikam.uuid file in the .dtrash folder. This is how collections will be primarily recognized. Maik
You won't be able to avoid scanning your albums again, but digiKam should reactivate the NULL albums and images if they are found again. Maik
(In reply to Maik Qualmann from comment #3) > A network collection now only has one file UUID. If you delete it, a new one > will be created when files are found in the specified directory. > Please do not manually manipulate the root entries in the database; it has > become a bit more complex. Use the "update" function in the digiKam > collection settings. > We will create a digikam.uuid file in the .dtrash folder. This is how > collections will be primarily recognized. > > Maik Hi Maik, Thanks for your explaination, I now understand the UUID and won't touch it as you told. (In reply to Maik Qualmann from comment #4) > You won't be able to avoid scanning your albums again, but digiKam should > reactivate the NULL albums and images if they are found again. > > Maik Sorry I don't understand, what do you mean "scanning your albums again" and "reactivate NULL albums"? BTW, what does status=4 mean in "images" table? -- I don't want to manipulate the data, but in case like this, when I try to fix a disaster, knowing what it means is helpful. Thanks