Loosing database and preferences on power loss

I’m not sure if this is what you’re talking about here, but I too found that DEVONthink 3 (which is still a Beta…) “looses” open databases sometimes when something goes wrong (but I never lost preferences or data).

Opening the databases manually that were open before a (forced) quit became a little bit annoying after some time (and I guess this is what the OP is experiencing?) so I added “default databases” to a script I used to open databases.

If that’s not helpful to the OP it would be great to get at screenshot or a more detailed description what’s going on as I’m also on a MacBook Pro 2012 and could try to reproduce.

property thePath : "/DEVONthink Datenbanken/"

set preferredDatabases to {} -- "default" databases

tell application "Finder"
	try
		set theFiles to files of folder (POSIX file thePath as alias)
		set allDatabases to {}
		repeat with thisFile in theFiles
			set theDatabase to my Remove_From_String(name of thisFile, ".dtBase2")
			set end of allDatabases to theDatabase
		end repeat
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
	end try
end tell

tell application id "DNtp" to set openDatabases to name of databases

set theDefaultItems to preferredDatabases & openDatabases
set theDefaultItems to my dedupList(theDefaultItems)
set theDefaultItems to my sort_list(theDefaultItems)

tell application "System Events" to set activeApp to name of first application process whose frontmost is true
tell application "SystemUIServer"
	activate
	set openOrCloseDatabases to choose from list allDatabases with title "Open or close database" default items (theDefaultItems) with multiple selections allowed and empty selection allowed
	
end tell
activate application activeApp
if openOrCloseDatabases is false then return

tell application id "DNtp"
	
	repeat with thisDatabase in allDatabases
		if thisDatabase is in openOrCloseDatabases then
			open database thePath & thisDatabase & ".dtBase2"
		else if thisDatabase is not in openOrCloseDatabases and thisDatabase is in openDatabases then
			close database thisDatabase
		end if
	end repeat
	
	activate
end tell

on Remove_From_String(theText, CharOrString)
	local ASTID, theText, CharOrString, lst
	set ASTID to AppleScript's text item delimiters
	try
		considering case
			if theText does not contain CharOrString then ¬
				return theText
			set AppleScript's text item delimiters to CharOrString
			set lst to theText's text items
		end considering
		set AppleScript's text item delimiters to ASTID
		return lst as text
	on error eMsg number eNum
		set AppleScript's text item delimiters to ASTID
		error "Can't RemoveFromString: " & eMsg number eNum
	end try
end Remove_From_String

on dedupList(theList)
	set dedupedList to {}
	repeat with thisItem in theList
		set thisItem to thisItem as string
		if thisItem is not in dedupedList then set end of dedupedList to thisItem
	end repeat
	
	return dedupedList
end dedupList

on sort_list(theList)
	set old_delims to AppleScript's text item delimiters
	set AppleScript's text item delimiters to {ASCII character 10} -- always a linefeed
	set list_string to (theList as string)
	set new_string to do shell script "echo " & quoted form of list_string & " | sort -f"
	set new_list to (paragraphs of new_string)
	set AppleScript's text item delimiters to old_delims
	return new_list
end sort_list