Weird problem; I can reproduce this.
I have observed that only the files that have been already visited (thus buffer exists) when you do db-sync are put into the nodes table of the db. I tried to debug this but don’t know exactly why this is the case.
As a solution, see below.
You can put the following in an org file in the second instance’s directory (so as to use the same
.dir-locals.el values) and:
- Visit one of the Org files in the second instance’s directory
- C-c C-c to evalute the
dolist below (if it’s easier for you, you can just evaluate the dolist without putting into Org source block)
(dolist (f (org-roam-list-files))
(with-current-buffer (find-file-noselect f)
EDIT: Sorry, just changing the code to be easier…
EDIT the EDIT: OK, the only the original works. Back to the original code.
Essentially, it visits every file in the org-roam directory, changes the “modified” status – status only, no actual change – and saves it to update the Org-roam db. It might take a while if you have many files, but it has done the job on my end.
Hope this helps.