[SOLVED] Exporting a database and then indexing it's folder

Hello,
I successfully exported a database by entering it in DT, selecting everything and then choosing the menu “File / Export / Files and Folders” to a folder.

Then, I tried to index this folder:

i first created a new database, selected it, then chose “File / Index Files and Folders”

That seems to work … but:

It includes the folder as top group in the database, while the Inbox and the Tags remain empty.

I tried both to index the folder and entered the folder and selected all items.
Both lead to the same result that no tags were added and the Inbox remained empty (while there is an “Inbox” folder below the top level folder).

I can only assume that I did something wrong at either export or when indexing.

Any idea?

Many thanks!

I also tried to just “Open Database” and selecting the folder with the exported items, but that does not work.

The strange thing is, that I already moved one imported database to an external folder and indexed it - and it has all tags …

What did I do, that I cannot remember?!?
:open_mouth:

Curious you are bothering to do this, but perhaps take a look at the section “Tagging” starting on page 14 of the outstanding “DEVONthink Manual” for clues.

1 Like

Ah, many thanks.

So it seems that it is required that SpotLight indexing is required for this to work?

That’s disappointing … and it would better to show a pop-up when exporting files and folder while this is not enabled for a database!

I enabled SpotLight and rebuild it, then I tried to re-export.
But sadly, DT creates all files and folder with an attached “-1” instead of overwriting.

There should an option to prevent this!
So, I needed to delete and export again - all to a OneDrive devices :expressionless:
Lots of file operations and uploads…

But:

The behavior is the same: All tags are lost!
I also checked for the “DisableFinderTags” hidden preference, but it does not exist, so is not set.

Any other idea?

I already tried the “Tags” button in Finder, but it indeed does not show any tags, so they were not exported from DT.
Maybe I need to enable this for Finder too?

About why I want to use indexed instead of imported items:

It is by far the better solution for me!

It allows to access everything with the command line!
And, I can store this in an encrypted Cryptomator Volume, that sits on OneDrive - this way, Microsoft only sees encrypted files, while all my devices can not only access them with DEVONthink and DTTG, but also freely in the Finder or the command line!

This is just perfect, as DT / DTTG do not offer access as a virtual file system.

I tested this for months with one database and found no problems.

But now, I am stuck, as I cannot find a way to keep my tags.
This definitely worked with the first database!

In general, it would be better to have some way to export tags in a way that can be imported again, without the need for SpotLight.
:cry:

I can’t reproduce the issue. Did you enable the hidden preference DisableFinderTags?

I wrote that already in my first reply, I checked for this and it is not set:

(base) tja@mini:~$ defaults read com.devon-technologies.think3 DisableFinderTags
2022-07-30 11:17:04.476 defaults[11185:15075179]
The domain/default pair of (com.devon-technologies.think3, DisableFinderTags) does not exist

(base) tja@mini:~$ defaults read com.devon-technologies.think3 | grep -i disable | grep -i finder
(base) tja@mini:~$

Is there a way to check, wether a SpotLight index was created by DT?

Try a local folder instead, does this work? OneDrive doesn’t retain Finder tags, not sure if that’s causing the issue now but sooner or later it will.

1 Like

I tried to manually create a Finder tag on a file in the Cryptomator volume.
This gave the following error:

The operation can’t be completed.
An unexpected error occured (error code -8058).

That could hint to a problem with Cryptomator or OneDrive, as you wrote.

But … I already migrated one database into such a volumes and it has all tags!
Either I did something different and cannot remember, or one of the components involved changed their behavior meanwhile.

This could prove to be very very frustrating.
Need a break.

Thanks for your reply!

Search with your favorite internet search tool “onedrive macos finder tags” for clues.

1 Like

I tested this, directly in my $HOME

No tags were created for the exported files and folders.
I then tried to manually create a tag and this time it worked!

So, if I can get DT to export all tags to a local folder and then index it, I should later be able to move the database and change the folder after moving it to Cryptomator on OneDrive.

But as it seems, the tags do not get exported by DT.

EDIT: This is solved!
My inexperience with SpotLight (which I normally totally disable) was the cause.
The way to first export to a local folder and then change the indexed path works!
I tested this successfull, many many thanks!

Will do!

EDIT: Did this. Yes, OneDrive seems to be problematic with tags.
I can only imagine that I exported to a local folder and later moved the folder to Cryptomator on OneDrive, after the tags got imported into the datase.

But right now, it seems that DT does not export them to begin with, even when using a folder in my $HOME on the Mac disk.

The “Create Spotlight Index” is set for the database and I used “Rebuild” (which did not indicate wether it did something or not)

EDIT: This is solved!
My inexperience with SpotLight (which I normally totally disable) was the cause.
The way to first export to a local folder and then change the indexed path works!
I tested this successfull, many many thanks!

It’s not the first time that this comes up in the forum. Finder tags are extended attributes and as such they depend on the file system‘s details. There are file systems that support extended attributes and there are the others. And even if two file systems both support extended attributes they might not use the same _names _ for them.

Other extended attributes are comments and keywords. Just as a warning.

3 Likes

One question remains:

On one database, the original shows the numbers “115/897” for tags while the migrated database show “115/667” …

The number of tags seems to be 115, which is OK.

But what are those second numbers and why do they differ?

None of the other databases showed differences in that …

I think, I found the cause.

The exported database shows different counts than the original:

The above is the original database.

And this is the fresh export to my $HOME

The differences are:

Groups: 369 → 374 (this got 5 more at export?!?)

Tags: 365 → 355 (10 less)

Video: 5 → 1 (4 less)

Audio: 22 → 26 (this got MORE at export? But then, we have 4 videos less - they got interpreted differently?!?)

Total: 7406 → 7401 … 5 items got lost?

And lastly:

Words: 339413 unique → 251704 unique
Words: 23451861 total → 15084457 total

That’s a big difference for words!!!

I did run Verify & Repair on both, also Check File Integrity and Optimze Database -then re-exported - with the same result.

Either the original database has a problem, of the exports creates a problem.

I started a “Rebuild Database” …

So, the Rebuild removed 1 tag, 1 image and 2 PDFs, while replicants did go up by 4.

All very strange.

How could I ever find out, which files that were? At least where they were located …