Moving folders in the database

(David LaCivita) #1

My hard drive is almost full so I just got a 3 TB external hard drive. Whats the best way to move folders off of my laptop to the external hard drive but keep the folders in the darktable database? They are a few years old and it’s OK if they are only accessible as needed.

(Pascal Obry) #2

Move the collections from darktable (see [move] in [selected image(s)] module on right of the lightable. This is the safe way for dt to update the database accordingly.

When the external drive is connected you can access the pictures.

When the external drive is not connected you won’t have access to the pictures for development but the thumbnails will be visible on the lightable and you’ll still be able to add stars or keywords.

If you want to get full access to a collection (or a single picture) while moving away from your external drive you can use the [copy locally] action from the [selected image(s)] module. And when you are back you can [resync local copy].

(Pascal Obry) #3

BTW, a good configuration is to have a RAID external drive to avoid issues :slight_smile: I had one of my drive dead last week and I was quite happy to just have to replace it. Nothing lost and the NAS just resync the pictures without any other action from me. Magic :slight_smile: And of course an external backup is also a good idea.

(David LaCivita) #4

It looks like Move only moves images, not folders or film rolls. Do I need to create the folders on the external hard drive first?

(Pascal Obry) #5

Yes, you select all pictures and you recreate the folder on the external drive.

Alternatively you can:

  1. in dt select all images and do [remove], this just remove the reference in the database
  2. move all corresponding folders directly from the explorer
  3. back in dt reimport all folders

You won’t lose editing as the XMP is there. Well double check that you did not deactivate the XMP creation. This solution is maybe faster but error prone, so be careful or use my first procedure :slight_smile:

(David LaCivita) #6

Got it, thanks and merry Christmas!


But you would lose some information that is only stored in the database. I am aware of the time correction for gpx import, but it’s maybe more.

(Pascal Obry) #8

The database does not have the time correction for GPX. This is only in the GUI and in the database only the GPS latitude/longitude are stored.


Oh, too bad. I once got the hint that I could use that feature to overwrite my bi-annual daylight saving time mistakes because there’s no other way to fix a wrong xmp time/date. Being database only, I never used it for that purpose, but from what you tell it wouldn’t work anyway. I guess it’s a good time of the year for new feature requests, isn’t it? :smile:


It’s also grouping of images.

(Jon Sullivan) #11

I just found this thread after solving this another way. At the year’s end, I needed to move all my 2017 photos, organised into lots of folders and subfolders, off my main laptop drive to make space for my 2018 photos. I wanted to keep all of my folder structure and I didn’t want to use the Move feature one folder at a time.

I found the feature “updating folder path” in the darktable manual: “The collect images module has a feature that allows you to tell darktable about the new location of imported folders which have been moved.”

So I quit darktable and copied all of my 2017 photos from my main hard drive to an external drive, moved them to the trash on my main drive, then re-opened my 2017 darktable library. The Collect:Folders module on the left now displayed all of my 2017 folder names struck out.

As the manual explained, I could right click on a struck out folder name and select “search film- roll…” to tell darktable where to look.

There were just a couple of quirks I first had to navigate.

Quirk one was that I’m using darktable on a Mac and the usual Mac equivalent of “right-click”, “ctrl-click”, was not recognised by darktable. After some head-scratching, I found out that the two-finger tap option on my MacBook trackpad is recognised, which allowed me to see and select the “search film-roll…” option.

Quirk two was that after I’d browsed through and selected where a folder had been moved to, nothing happened. (Gulp.) I discovered that I needed to move out from the folders option of the Collect module into another option (I chose film roll) and back again for the changes to show up. (I first tried quitting and reopening darktable, which also worked.)

My folders are organised first by month, and I started by resetting the location of each month’s folder individually, After a couple of months I realised that I could instead navigate up one level in Collect to my “2017” top folder that contained everything and just re-set that with “search film-roll…”.

So, bingo, one year of images organised into lots of folders and subfolders successfully shifted to their new home, without needing to reimport all of the images and their xmp files.


Good to hear that it worked.

I guess you want to get a mouse with a right button and a scroll wheel to work with darktable. There are some things that can only be changed with the scroll wheel (for example the filter size in monochrome, or the size of the affected area in the curve widgets) and right click is used to delete mask nodes, curve points, …


a little issue here when renaming a parent folder and using Search filmroll. Using darktable 2.6.0.
If I search filmroll to a parent folder that has some subfolders and those subfolders have again more subfolders(childfolders) then all relation is lost and all folders become children of the parent folder. Subfolders doesn’t have the triangle button to expand and see what is inside as before.
all subfolders are displayed as “subfolder1/childfolder1”, “subfolder1/childfolder2”, etc without any triangle buttons.

(Mica) #14

Are you renaming the folder on the filesystem? If so, I wouldn’t expect the filmroll to still work properly without reimporting.


Yes I am renaming the parent folder on the filesystem. And it works after using the Search filmroll function right clicking the folder in the collections panel. The problem is that I have to do it for each subfolder, and it doesn’t work when doing it on the parent folder as I described. Imagine renaming a parent folder that has 1000 subfolders… Then maybe removing everything and importing it again would be the best.

(Mica) #16

The database stores the path to the files/folders… You can use some lua to rescan the folders on application start, maybe that’d help. But really just do all your renaming before import.