It is way harder to write up than it is to execute, it takes minutes to do but I am always concerned that if I write something with the assumption that a reader will not be encountering something they have never done before and written in a different language to what they are used to then they might get stuck part way through.
So the easy version
- Get a copy of DB Browser for SQLite.
- Create database backups (as many as you feel you might need, plus 1) using either the ‘File’'DxO PhotoLab database'Create a backup’ option of PhotoLab or by making copies of the database directly by using appropriate file management software.
- Use PowerShell to find the new drive and copy/note the GUID
- Open one of the backup copies of the database with “DB Browser for SQLite” and use ‘Browse Data’ to locate the ‘Folders’ structure
- Scroll until the drive to be replaced is shown on screen.
- Select the UniqueId field and replace with the GUID of the replacement drive and ‘Apply’
- Save the database using ‘Write Changes’, no option to ‘Write as’ is available so the copy of the database backup will be overwritten
- Use the ‘Restore’ option in PhotoLab to restore the amended database
- Hope the two copies were as close to one another as possible, depends on the frequency of taking and maintaining backups
It took longer to write the summary than it does to execute the procedure!
The database is not tied to the Drive serial number, the Drive serial number is used to look up the disk entry regardless of what label or drive letter it might have today after its journey to… wherever.
But some time after replacing my Hard drive I decided to re-investigate DigiKam and the first thing it did was to warn me about the Drive Serial Number (GUID) and ask if I wanted to update it.
Such a feature would be useful in DxPL or even a simple utility that allowed a replacement drive to be registered would be useful.
In the meantime if a user is desperate to preserve the database then a procedure exists and I have used it a number of times, mostly with USB3 SATA drives but in the example above with two hard drives.