Associate digiKam with New Ext-HDD?

For what it’s worth = 64-bit Windows 7 Pro DigiKam v. 5.6.0

I have all of my digiKam image files (collections/albums) on an external hard-drive that is becoming somewhat untrustworthy; thus, I have copied all of my image files onto a new external drive.
I have assigned all of my USB drives permanent drive letters so that they stay the same.

I have perused the “Handbook” and investigated “settings” and such and am having no luck in finding my answer; how do I associate digiKam with the new drive and not have to reenter all of my collections and such ?

Thanks in advance and thanks for reading.

The easiest way would be to assign the drive letter of the old drive to the new drive.

1 Like

I had considered that and I guess that is the route I will go; thanks for confirming that to be my easiest option.
As both drives will remain attached, I guess my plan of action will be to change the old drive to some unused letter, then change the new drive to the old drives letter, then change the old drive to the new drives previous letter.
Thanks for the advice.

Drive letter is certainly the easiest route. If that doesn’t work and you need to reimport or otherwise fiddle with digikam, make sure you backup your database.

1 Like

To make your collection more mobile for future migrations I would consider writing metadata into JPEGs themselves and sidecar XMP files for RAW images and video files. I think digiKam writes a unique ID into each file which will make it easier to find a match in SQL database on import if you have to do so.

There is no logical, scientifically reasonable explanation as to why changing the new drive’s letter to the old drive’s letter should not have fooled digiKam into being none the wiser and went along as if nothing new had happened; alas…, after swapping around the drive letters, digiKam just swapped also and ignored the new drive, still remaining associated with the old drive and it’s new drive letter.

So, to prevent further confusion in other programs that had already aligned themselves with the new drive, I changed the letters back to their previous state.

I do have digiKam set to always write metadata such that it remains with the jpeg file no matter where it may go from here.

I counted my collections and there are currently thirty-five of them, so I printed a screen-shot of the collections list and have been one-by-one deleting and then reinstating the collections a few at a time.

I have numerous image handling programs and in every case except for digiKam it is a simple matter to realign the program with a new drive.

Actually, I was very surprised to find that changing the drive letters did not work.

Thanks so much for helping.

Looks like digiKam saved disk ID somewhere in settings or database.

I actually migrated my collection few times now (Windows to Linux; old HDD to new HDD, etc.). I usually just point the new installation of digiKam to the existing *.db file and let it rescan the collection. That’s all. Never lost anything. I do write metadata to JPEGs themselves and sidecars for raw and videos though.

Please explain and expand upon this in beginner’s language; thanks.

Sorry I only got a chance to take a seat in front of my laptop.
I would do the following:

  1. Backup your pictures collection

  2. Backup your *.db files (if they are not in the same folder where the pictures collection is)

  3. Backup digikam settings (search for "digikamrc" and then open the folder and backup all the configuration files from that folder. If you are on windows 10 it probably won’t find them. I downloaded open source double commander and searched from there.

  4. Copy the collection to the new HDD

  5. If you are planning on moving the database files to the new HDD and if they are not in the same folder where the pictures collection is move digikam4.db, recognition.db, thumbnails-digikam.db to the new HDD

  6. Open digikam, if you moved the database files go to to Settings - Configure digiKam - Database and point the new location of the database there.

  7. Go to Settings - Configure digiKam - Collections - Add collections ( I have never used network locations. I have used local and removable collections and did not see any difference between them). Add the collection on your new HDD

  8. Click OK, close settings and wait until digiKam finishes adding the new collection.

  9. Now in the Albums tree on the left side you should have two root folders:
    Albums
    /your/collection/on/old/hdd
    /your/collection/on/NEW/hdd

  10. Everything will be duplicated. That is fine

  11. Now you need to do random checks to make sure that pictures you copied to the new HDD contain all the metadata you have entered.

  12. If you are confident that the items copied to the new HDD contain all the data your had in your database you can go to Settings - Configure digiKam - Collections and remove the collection on the old drive (look for a little trash can icon on the right). This will delete the collection from the digiKam database but it won’t physically delete your pictures.

  13. That is it. It worked for me few times but again, I write metadata to JPEGs themselves as well as sidecar files for read-only files (RAW images and video files) so my system was more redundant. I actually treat database files as temporary files and deleted them many times and then restored again reading metadata from images (when I was using Windows Live Photo Gallery and Picasa in parallel)

2 Likes

Thank you so much for taking the time to explain this procedure.
Much appreciated.

Hi, sorry reviving an old topic, but I would like to know if this procedure is still valid and still the best way to handle moving files between hard drives.

EDIT: Also, all the steps in this procedure imply that the files are already in the new HDD, right? So in step 4, copying the collection is done inside Digikam and will not copy the physical files, correct?

I would not claim the procedure I wrote as the best they but it did the job for me when I needed.
Correct, you should already have a copy your files on the new HDD.
I copied my collection in a file manager actually (Dolphin in my case).


I had few thoughts after reading your question about “doing things inside digiKam” and maybe it is easier to just use digiKam’s function “Move To”. I have been using it a lot lately and it works perfect.
I actually use it so often so I even created a button on the top toolbar for it. But in your case you can just right click - move to Album.

Let me see if I got it right.
Let’s say I have an external HDD and the Pictures folder in my computer.
The Pictures folder in the PC is where I keep the latest photos and do the edits.
After 1, 2 months, I want to move the PC collections to the HDD.
So, should I just use the “Move to” function? After physically moving the files?

No you either move files physically in the file explorer or use ‘Move To Album’ function in digikam.

Before ‘Moving To’ you will need to create a folder on the new drive and add is as a Collection. (It will be empty before you moved all albums in there)

2 Likes

Thanks, it worked!