Darktable 5.2.0 trying to us dbmaint lua script

Dear reader,

I’m on Ubuntu 24 04, darktable 5.2.0.

I have quite some stricken through folders as I have manually moved folders… Started to manually remove them but quitted this job as it will be a boring and lengthy one.

Found out about the db maintenance script, opened the ‘scripts’ in the left down corner, selected and turned on ‘db maintenance’, went to de 'DB maintenace tab a bit above, selected ‘images’ from the drop down menu and pressed ‘scan’. Nothing seemed to happen.

Then I started darktable from the commandline with darktable -d lua > ~/debug-lua.txt. Performed the same as above first making sure I selected the highest level in my picture folder tree. Nothing still happend and de log-file shows some compile options and the how I’ve started darktable and then… nothing.

I must be doing something quite wrong here, maybe even quite obvious… but not to me.

How to proceed. Otherwise in case nothing works I will try the shell script which does the same, but first I hope to gain a bit of experience.

Kind regards
Jetze

You can fix the locations, but that’s still manual work: darktable user manual - collections

Then there’s also a shell script (not a Lua script): darktable user manual - purge_non_existing_images.sh

Or you can select all images, remove them, and reimport everything, including those that have been moved.

1 Like

Thanks again István @kofa, I will try the shell script then…

Suppose I would select all pictures, remove and reimport, that would mean rebuilding all previews in de cache as well wouldn’t it? That will take me a considerable amount of time. So not preferential in my situation.

Kind regards,
Jetze

PS I do love darktable, its makers and this forum! So much nicer than what I experienced during all those years using Adobes products.

I don’t know how the cache keys are generated. If they are based on the path to the image or some attributes (checksum?) derived from the image, they could be reused after reimport. If they are based on e.g. ID in the DB, they would be ineffective.

Thanks @kofa, done through using the shell script and all well!
Regards Jetze

2 Likes

Cache images are based on the database image id. The first image in the database, with id of 1, would generate 1.jpg files in each of the cache size directories.

I’ll check the dbmaint script.

1 Like

Thanks for the info!

Try selecting film rolls. Scanning for images assumes the film roll folder exists, which it doesn’t in this case.

Thank you very much Bill @wpferguson for extra info and clarification. My problem is now solved happily, I’ve learned a couple of things on the way.

It is now 5 month ago that I decided to leave MicroSoft, Adobe and Google. Never regretted a thing!

Thanks to all for helping me out,

Kind regards,
Jetze

1 Like