Mass updated titles via sql - how to trigger sync? #3586
-
Hello I updated note titles directly in the document.db using sql on Windows. The changes are reflected in Windows client correctly, but they are not synced to Web instance (even after calling Options>Advanced>Force Full Sync). I realize, that Trilium doesn't know about changes made directly in the database so this the reason of sync problem. Any way to trigger sync? What would be the proper way to update notes in the database via sql so sync works automatically? Update modified date? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There's a separate table to keep track of the sync process - In your case, you can click "Fill entity changes records" which will regenerate them and thus force sync. The side where this is triggered will be newer and thus "stronger" to overwrite the other instance data (since they are now out of sync): |
Beta Was this translation helpful? Give feedback.
-
Thank you, good to know. On my db (or Trilium version?) "Fill entity changes records" crashes
I then executed "DELETE FROM entity_changes". Fill changes crashes with the same error. |
Beta Was this translation helpful? Give feedback.
There's a separate table to keep track of the sync process -
entity_changes
, you would have to updatehash
andutcDateChanged
columns for all affected entities. It's a better idea to use JS backend script notes to do such changes since they will do all necessary "book keeping" for you.In your case, you can click "Fill entity changes records" which will regenerate them and thus force sync. The side where this is triggered will be newer and thus "stronger" to overwrite the other instance data (since they are now out of sync):