Bookmarks missing after backup restore

I upgraded my iOS DTTG to v3.0, and tragedy happened. It seems that an incomplete sync was done, and thousands of files (mostly bookmarks) disappeared.

Then the database in the cloud was synced, and these files were deleted from the database… So I tried to restore these data through a former backup. Most bookmarks came back to appear in my Devonthink on Mac. However, once I choose to “verify” the database, it failed since these bookmarks were labeled as “missing files”. The fact was that the original .webloc files of these bookmarks in the presented path was missing, but these bookmarks can actually work since it can pop up websites when I double-clicked them.

I tried “Update Index Items” and it also didn’t work. It seems that I have to manually re-import these bookmarks one by one? But there are over one-thousand bookmarks missing…

Could anyone help with this? Thanks in advance.

You could either restore a full backup of the database (e.g. via Time Machine) or use this script:

tell application id "DNtp"
	repeat with theRecord in selected records
		if type of theRecord is bookmark then
			set theURL to URL of theRecord
			set URL of theRecord to ""
			set URL of theRecord to theURL
		end if
	end repeat
end tell

Thank you so much! All my bookmark files are recovered!
I noticed that there are still some web archive files converted from bookmarks missing. They all have url but can not be found in the presented path. Which parameters should I change to get these web archive files back?

Select the items, then use Scripts > Download > As Web Archive

1 Like

Problem solved. Thanks a lot :smile:

Great. Please use also File > Verify & Repair Database… to ensure that there are no more issues.

@cgrunenberg - That is intriguing. Why does this script work? It sets the URL to Null and then back to its original value?

Changing the URL of bookmarks creates/updates/removes the webloc file if necessary. Just like changing it in the user interface.

1 Like