zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.03k stars 1.89k forks source link

so urgent, trilium-data lost (Bug report) #3807

Open Nobellcq opened 1 year ago

Nobellcq commented 1 year ago

Trilium Version

0.47.5

What operating system are you using?

Ubuntu

What is your setup?

Server access only

Operating System Version

Ubuntu20.04

Description

I used trilium-server for 2+ years. And i will sync all the backup to github monthly. Today i restart the ubuntu server, and then restart trilium. i find the notes data lost, it seems likely the note data is one years old. I check the trilium-data, the md5sum of document.db equals the md5sum of data in the backup, daily backup, weekly backup, and monthly backup all equals. I check my github backup, the server document.db file size actually over the github backup. So it may running normal, just may be coverd something when restarting server? So urgent, please help me how to recover it that lots of note data over one years, i will appreciate for any help!

Error time in the 11:00+, that time i restart the server.

Error logs

0-24:00:00.000 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 00:38:39.761 Slow query took 90ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 00:38:39.804 All consistency checks passed (took 147ms) 01:38:39.705 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 01:38:40.608 Slow query took 884ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 01:38:40.665 Slow query took 56ms: SELECT note_revisions.noteRevisionId FROM note_revisions LEFT JOIN note_revision_contents USING (noteRevisionId) WHERE note_revision_contents.noteRevisionId IS NULL AND note_revisions.isProtected = 0 01:38:40.835 Slow query took 143ms: SELECT id, entityId FROM entity_changes LEFT JOIN notes ON entityId = noteId WHERE entity_changes.isErased = 0 AND entity_changes.entityName = 'notes' AND noteId IS NULL 01:38:40.923 All consistency checks passed (took 1236ms) 02:38:39.748 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 02:38:40.712 Slow query took 924ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 02:38:40.765 Slow query took 51ms: SELECT note_revisions.noteRevisionId FROM note_revisions LEFT JOIN note_revision_contents USING (noteRevisionId) WHERE note_revision_contents.noteRevisionId IS NULL AND note_revisions.isProtected = 0 02:38:40.925 Slow query took 142ms: SELECT id, entityId FROM entity_changes LEFT JOIN notes ON entityId = noteId WHERE entity_changes.isErased = 0 AND entity_changes.entityName = 'notes' AND noteId IS NULL 02:38:41.033 Slow query took 45ms: SELECT noteId, parentNoteId FROM branches WHERE isDeleted = 0 02:38:41.093 All consistency checks passed (took 1367ms) 03:38:39.747 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 03:38:39.845 Slow query took 80ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 03:38:39.893 Slow query took 23ms: SELECT noteId, parentNoteId FROM branches WHERE isDeleted = 0 03:38:39.913 All consistency checks passed (took 166ms) 04:38:39.776 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 04:38:39.871 Slow query took 77ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 04:38:39.908 All consistency checks passed (took 132ms) 05:38:39.807 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 05:38:39.893 Slow query took 77ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 05:38:39.950 All consistency checks passed (took 144ms) 06:38:39.836 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 06:38:39.989 Slow query took 126ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 06:38:40.047 All consistency checks passed (took 211ms) 07:38:39.867 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 07:38:39.960 Slow query took 79ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 07:38:40.022 All consistency checks passed (took 156ms) 08:38:39.896 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 08:38:39.982 Slow query took 77ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 08:38:40.033 All consistency checks passed (took 138ms) 09:38:39.897 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 09:38:39.998 Slow query took 89ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 09:38:40.036 All consistency checks passed (took 140ms) 10:38:39.897 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 10:38:39.991 Slow query took 79ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 10:38:40.035 All consistency checks passed (took 139ms) 11:38:39.912 Table counts: notes: 1693, note_revisions: 3840, branches: 1722, attributes: 533, api_tokens: 0 11:38:40.008 Slow query took 87ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 11:38:40.062 All consistency checks passed (took 151ms) 12:04:29.023 Generated CSRF token GCi4h7Sv-YV9jFiwb9CL261fpiQaeYGWiu4A with secret undefined 12:04:31.891 304 GET /api/options took 4ms 12:04:31.899 200 GET /api/tree took 3ms 12:04:31.905 304 GET /api/keyboard-shortcuts-for-notes took 3ms 12:04:31.908 304 GET /api/keyboard-actions took 2ms 12:04:31.974 304 GET /api/script/widgets took 1ms 12:04:32.394 200 POST /api/tree/load took 2ms 12:04:34.788 304 GET /api/script/startup took 1ms 12:04:35.168 200 POST /api/tree/load took 1ms 12:04:35.307 200 POST /api/tree/load took 1ms 12:04:35.428 200 POST /api/tree/load took 1ms 12:04:39.335 Generated CSRF token S8SVAWr1-AGLdKdNQA2Tjwa3Nqdp2DtOiODc with secret undefined 12:04:40.193 Slow 304 GET /api/tree took 14ms 12:04:40.198 304 GET /api/options took 1ms 12:04:40.199 304 GET /api/keyboard-shortcuts-for-notes took 0ms 12:04:40.202 304 GET /api/keyboard-actions took 2ms 12:04:40.224 304 GET /api/script/widgets took 1ms 12:04:40.644 200 POST /api/tree/load took 1ms 12:04:42.995 304 GET /api/script/startup took 2ms 12:04:43.085 200 POST /api/tree/load took 1ms 12:04:43.294 200 POST /api/tree/load took 1ms 12:04:43.496 200 POST /api/tree/load took 3ms 12:06:12.065 Generated CSRF token 9Dq2QuHM-PUtg0SBvPXMklarA3Ue4n94AoO8 with secret undefined 12:06:12.702 304 GET /api/options took 3ms 12:06:12.740 304 GET /api/keyboard-actions took 4ms 12:06:12.742 304 GET /api/keyboard-shortcuts-for-notes took 1ms 12:06:12.751 304 GET /api/tree took 8ms 12:06:12.798 304 GET /api/script/widgets took 8ms 12:06:13.131 200 POST /api/tree/load took 1ms 12:06:15.363 304 GET /api/script/startup took 1ms 12:06:15.485 200 POST /api/tree/load took 2ms 12:06:15.659 200 POST /api/tree/load took 1ms 12:06:15.862 200 POST /api/tree/load took 1ms 12:06:19.864 304 GET /api/notes/pSvkSHbA66SY took 1ms 12:06:21.119 Slow query took 22ms: SELECT note_revisions.*, LENGTH(note_revision_contents.content) AS contentLength FROM note_revisions JOIN note_revision_contents ON note_revisions.noteRevisionId = note_revision_contents.noteRevisionId WHERE noteId = ? ORDER BY utcDateCreated DESC 12:06:21.122 Slow 304 GET /api/notes/pSvkSHbA66SY/revisions took 25ms 12:06:21.143 Slow 304 GET /api/similar-notes/pSvkSHbA66SY took 149ms 12:06:22.350 200 POST /api/notes/pSvkSHbA66SY/link-map took 3ms 12:06:23.575 Slow 200 GET /api/quick-search/mongo took 83ms 12:06:23.657 200 POST /api/tree/load took 2ms 12:06:24.130 204 POST /api/recent-notes took 2ms 12:06:24.234 204 POST /api/recent-notes took 1ms 12:06:24.383 204 POST /api/recent-notes took 2ms 12:06:24.577 200 GET /api/notes/gb9D0BYKddym took 1ms 12:06:24.674 204 POST /api/recent-notes took 1ms 12:06:26.413 304 GET /api/notes/gb9D0BYKddym took 0ms 12:06:27.861 204 PUT /api/options took 3ms 12:06:27.866 304 GET /api/notes/gb9D0BYKddym took 1ms 12:06:27.868 200 GET /api/tree?subTreeNoteId=0gMTKbIZZm4k took 1ms 12:06:28.105 200 GET /api/tree?subTreeNoteId=7Sut29bUbNaq took 2ms 12:06:28.679 200 GET /api/tree?subTreeNoteId=Ur9vUkAjHBAc took 1ms 12:06:28.767 Slow 200 GET /api/similar-notes/gb9D0BYKddym took 33ms 12:06:28.772 200 GET /api/notes/gb9D0BYKddym/revisions took 4ms 12:06:28.841 200 POST /api/notes/gb9D0BYKddym/link-map took 2ms 12:06:28.875 204 PUT /api/branches/TPX1puLYSpMI/expanded/1 took 1ms 12:06:28.883 204 PUT /api/branches/9y3QhVsxRvhI/expanded/1 took 2ms 12:06:28.886 204 PUT /api/branches/Op2K153NxDRi/expanded/1 took 1ms 12:06:28.950 200 POST /api/tree/load took 1ms 12:06:31.319 200 GET /api/notes/NhDnPyrkyDjv took 1ms 12:06:31.381 204 PUT /api/options took 2ms 12:06:32.279 200 GET /api/notes/NhDnPyrkyDjv/revisions took 1ms 12:06:32.309 Slow 200 GET /api/similar-notes/NhDnPyrkyDjv took 27ms 12:06:32.312 200 POST /api/notes/NhDnPyrkyDjv/link-map took 1ms 12:06:32.401 200 POST /api/tree/load took 3ms 12:06:36.285 204 POST /api/recent-notes took 1ms 12:06:52.047 Slow 200 PUT /api/notes/NhDnPyrkyDjv took 16ms 12:06:52.600 Slow 304 GET /api/similar-notes/u2A04AOHpvch took 33ms 12:06:52.643 Slow 304 GET /api/similar-notes/1qL49OC7gh5R took 40ms 12:06:52.665 200 GET /api/notes/NhDnPyrkyDjv/revisions took 1ms 12:06:52.671 Slow 304 GET /api/similar-notes/Sbxh9yely5CU took 25ms 12:06:52.821 200 POST /api/tree/load took 2ms 12:06:52.825 200 POST /api/tree/load took 2ms 12:06:53.613 200 GET /api/notes/NhDnPyrkyDjv took 1ms 12:06:54.459 304 GET /api/notes/gb9D0BYKddym took 1ms 12:06:54.475 204 PUT /api/options took 2ms 12:06:55.502 Slow 304 GET /api/similar-notes/gb9D0BYKddym took 121ms 12:06:55.558 304 GET /api/notes/gb9D0BYKddym/revisions took 6ms 12:06:55.568 200 POST /api/notes/gb9D0BYKddym/link-map took 9ms 12:06:56.309 Slow 200 PUT /api/notes/gb9D0BYKddym took 22ms 12:06:56.404 200 GET /api/notes/gb9D0BYKddym took 1ms 12:06:56.410 200 GET /api/notes/gb9D0BYKddym/revisions took 1ms 12:06:58.628 200 GET /api/notes/Ur9vUkAjHBAc took 1ms 12:06:58.637 204 PUT /api/options took 3ms 12:06:59.607 200 GET /api/notes/Ur9vUkAjHBAc/revisions took 5ms 12:06:59.645 Slow 200 GET /api/similar-notes/Ur9vUkAjHBAc took 127ms 12:06:59.670 200 POST /api/notes/Ur9vUkAjHBAc/link-map took 8ms 12:07:00.489 304 GET /api/notes/NhDnPyrkyDjv took 1ms 12:07:00.610 304 GET /api/notes/gb9D0BYKddym took 2ms 12:07:01.145 Slow 200 PUT /api/notes/Ur9vUkAjHBAc took 12ms 12:07:01.275 200 GET /api/notes/Ur9vUkAjHBAc/revisions took 1ms 12:07:01.277 200 GET /api/notes/Ur9vUkAjHBAc took 1ms 12:07:03.500 204 POST /api/recent-notes took 1ms 12:07:04.340 200 PUT /api/notes/Ur9vUkAjHBAc took 7ms 12:07:04.459 200 GET /api/notes/Ur9vUkAjHBAc took 1ms 12:07:05.580 200 POST /api/delete-notes-preview took 2ms 12:07:06.033 Sending message to all clients: {"type":"taskProgressCount","taskId":"Lqa0460RHo","taskType":"delete-notes","progressCount":0} 12:07:06.036 Deleting note NhDnPyrkyDjv 12:07:06.037 Deleting note gb9D0BYKddym 12:07:06.037 Deleting note Ur9vUkAjHBAc 12:07:06.038 Sending message to all clients: {"type":"taskSucceeded","taskId":"Lqa0460RHo","taskType":"delete-notes"} 12:07:06.047 Slow 200 DELETE /api/branches/9y3QhVsxRvhI?taskId=Lqa0460RHo&last=true took 14ms 12:07:06.091 200 POST /api/tree/load took 2ms 12:07:06.325 200 POST /api/tree/load took 1ms 12:07:06.449 200 GET /api/notes/Ur9vUkAjHBAc took 1ms 12:07:06.561 304 GET /api/search/%23workspace took 3ms 12:07:06.570 200 POST /api/tree/load took 4ms 12:07:06.703 204 PUT /api/options took 3ms 12:07:06.829 200 GET /api/notes/E8SyWnf9mdsG took 1ms 12:07:07.659 204 PUT /api/options took 2ms 12:07:07.738 Slow 200 GET /api/quick-search/mongo took 78ms 12:07:07.782 Slow 200 GET /api/similar-notes/E8SyWnf9mdsG took 20ms 12:07:07.786 200 POST /api/notes/E8SyWnf9mdsG/link-map took 1ms 12:07:07.787 200 GET /api/notes/E8SyWnf9mdsG/revisions took 0ms 12:07:07.908 200 POST /api/tree/load took 1ms 12:07:10.947 200 GET /api/notes/HLGdofeYdp4J took 1ms 12:07:11.694 204 POST /api/recent-notes took 2ms 12:07:14.414 200 GET /api/notes/T76hdNZYt6MQ took 1ms 12:07:14.471 204 PUT /api/options took 3ms 12:07:15.343 200 GET /api/notes/T76hdNZYt6MQ/revisions took 5ms 12:07:15.378 Slow 200 GET /api/similar-notes/T76hdNZYt6MQ took 32ms 12:07:15.382 200 POST /api/notes/T76hdNZYt6MQ/link-map took 1ms 12:07:19.260 204 POST /api/recent-notes took 3ms 12:07:19.634 200 POST /api/tree/load took 1ms 12:07:19.804 200 GET /api/notes/b5r02dywKcks took 1ms 12:07:19.906 200 GET /api/notes/IUgqkEqHGm7H took 4ms 12:07:20.004 200 GET /api/notes/Os55rR7vX8f9 took 1ms 12:07:20.109 200 GET /api/notes/ZfPTaONphyAx took 1ms 12:07:21.867 Slow 304 GET /api/quick-search/mongo took 92ms 12:07:22.993 200 GET /api/notes/7Sut29bUbNaq took 1ms 12:07:23.037 204 PUT /api/options took 2ms 12:07:23.996 Slow 200 GET /api/similar-notes/7Sut29bUbNaq took 62ms 12:07:24.021 200 GET /api/notes/7Sut29bUbNaq/revisions took 2ms 12:07:24.023 200 POST /api/notes/7Sut29bUbNaq/link-map took 1ms 12:07:24.809 200 GET /api/notes/oW9DDcH56JY1 took 1ms 12:07:24.910 200 GET /api/notes/tOz7WoAeDipC took 1ms 12:07:25.015 200 GET /api/notes/VguJfpcPgMcP took 1ms 12:07:25.773 200 GET /api/notes/BnoObgdcpG6x took 0ms 12:07:25.981 304 GET /api/notes/E8SyWnf9mdsG took 1ms 12:07:26.148 200 GET /api/notes/RL3i61Al7Sjn took 3ms 12:07:27.900 204 POST /api/recent-notes took 1ms 12:07:28.425 304 GET /api/notes/RL3i61Al7Sjn took 1ms 12:07:28.506 204 PUT /api/options took 3ms 12:07:29.349 200 GET /api/notes/RL3i61Al7Sjn/revisions took 1ms 12:07:29.479 Slow 200 GET /api/similar-notes/RL3i61Al7Sjn took 111ms 12:07:29.494 200 POST /api/notes/RL3i61Al7Sjn/link-map took 7ms 12:07:30.301 Slow 304 GET /api/quick-search/mongo took 88ms 12:07:32.111 204 PUT /api/options took 2ms 12:07:32.113 304 GET /api/notes/T76hdNZYt6MQ took 1ms 12:07:32.762 Slow 304 GET /api/quick-search/mongo took 79ms 12:07:33.048 Slow 304 GET /api/similar-notes/T76hdNZYt6MQ took 45ms 12:07:33.055 304 GET /api/notes/T76hdNZYt6MQ/revisions took 2ms 12:07:33.057 200 POST /api/notes/T76hdNZYt6MQ/link-map took 1ms 12:07:34.018 200 GET /api/notes/sfYh2sYXoXl8 took 1ms 12:07:34.145 204 PUT /api/options took 3ms 12:07:35.305 Slow 304 GET /api/quick-search/mongo took 358ms 12:07:35.311 200 POST /api/notes/sfYh2sYXoXl8/link-map took 1ms 12:07:35.334 200 GET /api/notes/sfYh2sYXoXl8/revisions took 3ms 12:07:35.341 Slow 200 GET /api/similar-notes/sfYh2sYXoXl8 took 28ms 12:07:39.129 204 POST /api/recent-notes took 2ms 12:07:39.174 200 POST /api/tree/load took 1ms 12:07:39.704 200 GET /api/notes/2GxAj1G6GK1m took 1ms 12:07:40.034 200 GET /api/notes/fSKL9L1nK2b9 took 1ms 12:07:46.030 Slow 304 GET /api/quick-search/mongo took 82ms 12:07:49.951 204 PUT /api/options took 2ms 12:07:49.953 200 GET /api/notes/QU05gJllby6Q took 1ms 12:07:49.964 200 GET /api/tree?subTreeNoteId=q8BsIYz6vyP2 took 1ms 12:07:50.514 204 PUT /api/branches/Ay84gqulMITJ/expanded/1 took 2ms 12:07:50.948 Slow 200 GET /api/similar-notes/QU05gJllby6Q took 95ms 12:07:50.958 200 GET /api/notes/QU05gJllby6Q/revisions took 5ms 12:07:50.960 200 POST /api/notes/QU05gJllby6Q/link-map took 1ms 12:07:54.810 204 POST /api/recent-notes took 2ms 12:07:58.580 Slow 304 GET /api/quick-search/mongo took 74ms 12:07:58.977 304 GET /api/notes/QU05gJllby6Q took 1ms 12:07:59.109 304 GET /api/notes/HLGdofeYdp4J took 2ms 12:07:59.205 200 GET /api/notes/vXsD6WSgtNy7 took 1ms 12:08:00.408 200 GET /api/notes/p9df9AnkUr1W took 1ms 12:08:00.419 204 PUT /api/options took 3ms 12:08:00.430 200 GET /api/tree?subTreeNoteId=CtkSzkA3ePPl took 9ms 12:08:00.685 200 GET /api/tree?subTreeNoteId=WpmXaL9XVuM6 took 1ms 12:08:00.920 204 PUT /api/branches/zUqfNtQWzMpA/expanded/1 took 1ms 12:08:00.959 204 PUT /api/branches/bBqGHa1xcQdL/expanded/1 took 1ms 12:08:01.345 200 POST /api/notes/p9df9AnkUr1W/link-map took 2ms 12:08:01.349 200 GET /api/notes/p9df9AnkUr1W/revisions took 1ms 12:08:01.372 Slow 200 GET /api/similar-notes/p9df9AnkUr1W took 20ms 12:08:05.261 204 POST /api/recent-notes took 2ms 12:11:30.355 Slow 200 GET /api/quick-search/mongodb%20start took 76ms 12:11:30.939 304 GET /api/notes/vXsD6WSgtNy7 took 1ms 12:11:31.466 200 GET /api/tree?subTreeNoteId=qNQJxsnV0CGY took 2ms 12:11:31.482 204 PUT /api/options took 2ms 12:11:31.660 200 GET /api/tree?subTreeNoteId=7S5H30Q71Zqk took 2ms 12:11:31.865 204 PUT /api/branches/WzoAqarQquSZ/expanded/1 took 2ms 12:11:31.899 204 PUT /api/branches/OTqATw4ip2oZ/expanded/1 took 1ms 12:11:32.278 200 GET /api/notes/vXsD6WSgtNy7/revisions took 6ms 12:11:32.306 Slow 200 GET /api/similar-notes/vXsD6WSgtNy7 took 25ms 12:11:32.312 200 POST /api/notes/vXsD6WSgtNy7/link-map took 1ms 12:11:36.205 204 POST /api/recent-notes took 1ms 12:11:42.942 Slow 304 GET /api/quick-search/mongodb%20start took 79ms 12:11:47.227 Slow 200 GET /api/quick-search/mongo%20start took 70ms 12:11:49.674 304 GET /api/notes/QU05gJllby6Q took 2ms 12:11:49.740 204 PUT /api/options took 3ms 12:11:50.610 304 GET /api/notes/QU05gJllby6Q/revisions took 2ms 12:11:50.705 Slow 304 GET /api/similar-notes/QU05gJllby6Q took 92ms 12:11:50.728 200 POST /api/notes/QU05gJllby6Q/link-map took 5ms 12:11:54.590 204 POST /api/recent-notes took 2ms 12:12:01.337 Slow 200 GET /api/quick-search/mongo%20%E9%97%AE%E9%A2%98 took 80ms 12:12:02.626 Slow 200 GET /api/quick-search/mongo%E9%97%AE%E9%A2%98 took 73ms 12:12:03.847 Slow 304 GET /api/quick-search/mongo took 73ms 12:12:08.920 Slow 200 GET /api/quick-search/%E5%AE%9D%E5%A1%94 took 72ms 12:12:12.751 Slow 200 GET /api/quick-search/Mongo took 72ms 12:12:15.040 200 GET /api/notes/9PcqX8bWJwOX took 2ms 12:12:15.065 204 PUT /api/options took 8ms 12:12:16.055 Slow 200 GET /api/similar-notes/9PcqX8bWJwOX took 78ms 12:12:16.083 200 GET /api/notes/9PcqX8bWJwOX/revisions took 5ms 12:12:16.085 200 POST /api/notes/9PcqX8bWJwOX/link-map took 1ms 12:12:16.089 200 GET /api/tree?subTreeNoteId=Ugbxa1866mVt took 2ms 12:12:17.378 200 GET /api/tree?subTreeNoteId=HQeWGNhRtYLJ took 2ms 12:12:17.645 204 PUT /api/branches/Eh0RWUK2C94I/expanded/1 took 8ms 12:12:17.663 204 PUT /api/branches/lFIVJPvIj7tV/expanded/1 took 2ms 12:12:19.917 204 POST /api/recent-notes took 1ms 12:12:23.373 200 GET /api/tree?subTreeNoteId=AQrL513vLHt4 took 2ms 12:12:23.787 204 PUT /api/branches/BrJThPdgUT6t/expanded/1 took 1ms 12:12:29.079 200 GET /api/notes/Nsm6RphX9KJz took 1ms 12:12:29.119 204 PUT /api/options took 9ms 12:12:30.008 Slow 200 GET /api/similar-notes/Nsm6RphX9KJz took 25ms 12:12:30.012 200 GET /api/notes/Nsm6RphX9KJz/revisions took 1ms 12:12:30.133 200 GET /api/notes/211VnYQkk4sc took 1ms 12:12:30.195 204 PUT /api/options took 4ms 12:12:31.384 Slow 200 GET /api/similar-notes/211VnYQkk4sc took 22ms 12:12:31.387 200 GET /api/notes/211VnYQkk4sc/revisions took 1ms 12:12:31.407 200 POST /api/notes/211VnYQkk4sc/link-map took 1ms 12:12:35.062 204 POST /api/recent-notes took 2ms 12:12:39.973 Slow 304 GET /api/quick-search/Mongo took 83ms ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������12:29:06.148 DB size: 96473 KB 12:29:10.726 Note cache load took 154ms 12:29:10.727 App HTTP server starting up at port 8084 12:29:10.728 { "appVersion": "0.47.5", "dbVersion": 183, "syncVersion": 20, "buildDate": "2021-06-25T21:26:48+02:00", "buildRevision": "0a2807c0b3fb7809d1cd1be3a051d127db010b5e", "dataDirectory": "/root/trilium-data", "clipperProtocolVersion": "1.0" } 12:29:10.730 CPU model: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz, logical cores: 1 freq: 2499 Mhz 12:29:10.745 Listening on port 8084 12:34:03.222 DB size: 96473 KB 12:34:05.666 Note cache load took 81ms 12:34:05.669 App HTTP server starting up at port 8084 12:34:05.670 { "appVersion": "0.47.5", "dbVersion": 183, "syncVersion": 20, "buildDate": "2021-06-25T21:26:48+02:00", "buildRevision": "0a2807c0b3fb7809d1cd1be3a051d127db010b5e", "dataDirectory": "/root/trilium-data", "clipperProtocolVersion": "1.0" } 12:34:05.671 CPU model: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz, logical cores: 1 freq: 2499 Mhz 12:34:05.677 Listening on port 8084 12:34:05.981 Generated CSRF token YUtihGfW-RnJtD_-vf3EP_LyP_H0ST6W4TLk with secret undefined 12:34:07.812 304 GET /api/keyboard-shortcuts-for-notes took 2ms 12:34:07.818 200 GET /api/tree took 5ms 12:34:07.825 200 GET /api/options took 2ms 12:34:07.832 304 GET /api/keyboard-actions took 4ms 12:34:07.995 Slow 304 GET /api/script/widgets took 41ms 12:34:08.360 200 POST /api/tree/load took 2ms 12:34:08.751 200 GET /api/tree?subTreeNoteId=aWi66VMfPm5t took 2ms 12:34:10.048 200 GET /api/notes/LFlj1I0gO97o took 4ms 12:34:11.956 304 GET /api/script/startup took 7ms 12:34:12.182 Slow query took 220ms: SELECT note_revisions.*, LENGTH(note_revision_contents.content) AS contentLength FROM note_revisions JOIN note_revision_contents ON note_revisions.noteRevisionId = note_revision_contents.noteRevisionId WHERE noteId = ? ORDER BY utcDateCreated DESC 12:34:12.187 Slow 200 GET /api/notes/LFlj1I0gO97o/revisions took 226ms 12:34:12.405 Slow 200 GET /api/similar-notes/LFlj1I0gO97o took 217ms 12:34:12.538 200 POST /api/tree/load took 2ms 12:34:12.716 200 POST /api/tree/load took 3ms 12:34:13.192 200 POST /api/tree/load took 2ms 12:34:14.856 204 POST /api/recent-notes took 8ms 12:34:16.516 204 POST /api/recent-notes took 2ms 12:34:18.553 304 GET /api/search/%23workspace took 4ms 12:34:18.578 204 PUT /api/options took 4ms 12:34:19.272 200 GET /api/autocomplete?query=&activeNoteId=null took 3ms 12:34:24.616 Slow 200 GET /api/autocomplete?query=k&activeNoteId=null took 32ms 12:34:24.681 Slow 200 GET /api/autocomplete?query=ka&activeNoteId=null took 11ms 12:34:24.772 200 GET /api/autocomplete?query=kai&activeNoteId=null took 7ms 12:34:25.263 Slow 304 GET /api/autocomplete?query=kai&activeNoteId=null took 14ms 12:34:25.332 Slow 304 GET /api/autocomplete?query=ka&activeNoteId=null took 22ms 12:34:25.485 Slow 304 GET /api/autocomplete?query=k&activeNoteId=null took 26ms 12:34:25.573 304 GET /api/autocomplete?query=&activeNoteId=null took 2ms 12:34:25.684 Table counts: notes: 1223, note_revisions: 2721, branches: 1245, attributes: 414, api_tokens: 0 12:34:26.420 Slow query took 725ms: SELECT noteId FROM notes JOIN note_contents USING (noteId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL 12:34:26.445 Slow query took 25ms: SELECT note_revisions.noteRevisionId FROM note_revisions LEFT JOIN note_revision_contents USING (noteRevisionId) WHERE note_revision_contents.noteRevisionId IS NULL AND note_revisions.isProtected = 0 12:34:26.590 Slow query took 130ms: SELECT id, entityId FROM entity_changes LEFT JOIN notes ON entityId = noteId WHERE entity_changes.isErased = 0 AND entity_changes.entityName = 'notes' AND noteId IS NULL 12:34:26.663 All consistency checks passed (took 995ms) 12:34:26.700 Slow 200 GET /api/autocomplete?query=kaif&activeNoteId=null took 30ms 12:34:27.237 Slow 200 GET /api/autocomplete?query=%E5%BC%80%E5%8F%91&activeNoteId=null took 14ms 12:34:28.066 Slow 200 GET /api/autocomplete?query=%E5%BC%80&activeNoteId=null took 16ms 12:34:28.212 304 GET /api/autocomplete?query=&activeNoteId=null took 3ms 12:34:31.014 200 GET /api/autocomplete?query=%E6%A1%86%E6%9E%B6&activeNoteId=null took 6ms 12:34:35.132 304 GET /api/autocomplete?query=%E6%A1%86%E6%9E%B6&activeNoteId=null took 9ms 12:34:35.148 200 POST /api/tree/load took 4ms 12:34:35.528 200 GET /api/notes/ON6kS6G20Wyx took 1ms 12:34:35.537 204 PUT /api/options took 2ms 12:34:35.540 200 GET /api/tree?subTreeNoteId=CtkSzkA3ePPl took 2ms 12:34:35.821 204 PUT /api/branches/zUqfNtQWzMpA/expanded/1 took 2ms 12:34:36.939 Slow 200 GET /api/similar-notes/ON6kS6G20Wyx took 75ms 12:34:36.954 200 GET /api/notes/ON6kS6G20Wyx/revisions took 4ms 12:34:40.417 204 POST /api/recent-notes took 1ms 12:34:40.822 Slow 200 GET /api/quick-search/%E6%A1%86%E6%9E%B6 took 87ms 12:34:40.939 200 POST /api/tree/load took 3ms 12:34:46.453 Slow 200 GET /api/quick-search/%E4%BA%BA%E7%94%9F%E6%A1%86%E6%9E%B6 took 71ms 12:34:49.859 Slow 304 GET /api/quick-search/%E6%A1%86%E6%9E%B6 took 157ms 12:34:56.549 Slow 200 POST /api/search-note took 29ms 12:34:56.593 200 POST /api/tree/load took 1ms 12:34:56.725 200 POST /api/tree/load took 1ms 12:34:56.775 200 POST /api/tree/load took 1ms 12:34:56.841 200 POST /api/tree/load took 1ms 12:34:57.198 Slow 200 GET /api/similar-notes/2FfdNHWBEQxc took 128ms 12:34:57.230 200 POST /api/tree/load took 7ms 12:34:57.238 304 GET /api/notes/ON6kS6G20Wyx took 3ms 12:34:57.621 200 GET /api/notes/dLYY7lKt1lJR took 4ms 12:34:57.629 200 GET /api/tree?subTreeNoteId=lpRI1PKKm7t8 took 5ms 12:34:57.666 204 PUT /api/options took 3ms 12:34:57.869 200 POST /api/tree/load took 2ms 12:34:58.020 200 GET /api/tree?subTreeNoteId=Z846FuFbXQPm took 3ms 12:34:58.168 Slow 200 GET /api/tree?subTreeNoteId=B4bmtRB7hCX2 took 10ms 12:34:58.495 200 GET /api/notes/dLYY7lKt1lJR/revisions took 2ms 12:34:59.387 200 GET /api/tree?subTreeNoteId=sgfAl4Utdx2h took 3ms 12:35:00.271 200 GET /api/tree?subTreeNoteId=ro21R86hl8fz took 3ms 12:35:00.333 204 PUT /api/branches/zUqfNtQWzMpA/expanded/0 took 1ms 12:35:00.460 204 PUT /api/branches/JFgxsoVT6OLF/expanded/1 took 1ms 12:35:00.494 204 PUT /api/branches/1wAzThowkc6b/expanded/1 took 1ms 12:35:00.524 204 PUT /api/branches/0SIDyMwylT5c/expanded/1 took 1ms 12:35:00.585 204 PUT /api/branches/BsbvFgjDuI7w/expanded/1 took 1ms 12:35:00.693 204 PUT /api/branches/xJposKRBcSN4/expanded/1 took 1ms 12:35:02.519 204 POST /api/recent-notes took 1ms 12:35:02.894 204 PUT /api/branches/JFgxsoVT6OLF/expanded/0 took 1ms 12:35:05.020 204 PUT /api/branches/c7xkKUlR7CDe/expanded/0 took 1ms 12:35:06.600 204 PUT /api/branches/c7xkKUlR7CDe/expanded/1 took 2ms 12:35:07.441 204 PUT /api/branches/c7xkKUlR7CDe/expanded/0 took 1ms 12:35:10.871 200 GET /api/tree?subTreeNoteId=IKUyXwG1SOfU took 5ms 12:35:11.295 204 PUT /api/branches/XthTaCVPoW3g/expanded/1 took 1ms 12:35:12.289 204 PUT /api/branches/XthTaCVPoW3g/expanded/0 took 1ms 12:35:14.125 204 PUT /api/branches/c7xkKUlR7CDe/expanded/1 took 1ms 12:35:16.750 204 PUT /api/branches/9ucJbjOiI7J4/expanded/0 took 1ms 12:35:18.588 204 PUT /api/branches/wrHcK4WACiF8/expanded/0 took 2ms 12:35:26.771 JS Error: Encountered error Process exceeded time limit 30000: Error: Process exceeded time limit 30000 at Object.timeLimit (http://112.74.51.102:8084/app-dist/desktop.js:2:84964) at http://112.74.51.102:8084/app-dist/desktop.js:2:88419 at WebSocket.$ (http://112.74.51.102:8084/app-dist/desktop.js:2:91815), reloading frontend. Stack: Error at v (http://112.74.51.102:8084/app-dist/desktop.js:2:87788) at http://112.74.51.102:8084/app-dist/desktop.js:2:91166 12:35:26.820 Generated CSRF token UC8GVjIr-qxEFYPpREZjUVH0niLRb7q-MFv0 with secret undefined 12:35:27.732 JS Error: Encountered error Process exceeded time limit 30000: Error: Process exceeded time limit 30000 at Object.timeLimit (http://112.74.51.102:8084/app-dist/desktop.js:2:84964) at http://112.74.51.102:8084/app-dist/desktop.js:2:88419 at WebSocket.$ (http://112.74.51.102:8084/app-dist/desktop.js:2:91815), reloading frontend. Stack: Error at v (http://112.74.51.102:8084/app-dist/desktop.js:2:87788) at http://112.74.51.102:8084/app-dist/desktop.js:2:91166 12:35:27.820 Generated CSRF token juPVWIYA-1KoixXL4kHAuWF4mzjkDq8QFX3c with secret undefined 12:35:28.446 200 GET /api/options took 2ms 12:35:28.458 304 GET /api/keyboard-actions took 5ms 12:35:28.500 304 GET /api/keyboard-shortcuts-for-notes took 1ms 12:35:28.530 304 GET /api/script/widgets took 2ms 12:35:28.540 200 GET /api/tree took 6ms 12:35:28.936 200 POST /api/tree/load took 2ms 12:35:29.355 200 POST /api/tree/load took 1ms 12:35:29.457 Slow 304 GET /api/tree took 12ms 12:35:29.462 304 GET /api/keyboard-shortcuts-for-notes took 1ms 12:35:29.501 304 GET /api/script/widgets took 2ms 12:35:29.527 200 POST /api/tree/load took 2ms 12:35:29.631 200 POST /api/tree/load took 2ms 12:35:29.738 200 POST /api/tree/load took 3ms 12:35:30.457 304 GET /api/keyboard-actions took 3ms 12:35:30.462 304 GET /api/options took 2ms 12:35:30.823 200 POST /api/tree/load took 1ms 12:35:31.149 200 GET /api/tree?subTreeNoteId=lpRI1PKKm7t8 took 2ms 12:35:31.158 200 POST /api/tree/load took 2ms 12:35:31.161 304 GET /api/notes/dLYY7lKt1lJR took 1ms 12:35:31.440 200 POST /api/tree/load took 2ms 12:35:31.510 204 PUT /api/branches/JFgxsoVT6OLF/expanded/1 took 1ms 12:35:32.735 304 GET /api/script/startup took 3ms 12:35:33.386 200 POST /api/tree/load took 2ms 12:35:33.390 304 GET /api/notes/dLYY7lKt1lJR/revisions took 1ms 12:35:34.009 304 GET /api/notes/dLYY7lKt1lJR took 1ms 12:35:34.015 200 POST /api/tree/load took 2ms 12:35:34.033 200 GET /api/tree?subTreeNoteId=lpRI1PKKm7t8 took 3ms 12:35:34.814 304 GET /api/script/startup took 2ms 12:35:34.980 200 POST /api/tree/load took 2ms 12:35:35.109 200 POST /api/tree/load took 2ms 12:35:35.791 304 GET /api/notes/dLYY7lKt1lJR/revisions took 1ms 12:35:36.804 204 POST /api/recent-notes took 1ms 12:35:36.818 204 POST /api/recent-notes took 1ms 12:35:36.820 204 POST /api/recent-notes took 1ms 12:35:38.796 204 POST /api/recent-notes took 2ms 12:35:38.800 204 POST /api/recent-notes took 1ms 12:35:39.803 204 POST /api/recent-notes took 1ms 12:36:23.268 204 PUT /api/branches/JFgxsoVT6OLF/expanded/1 took 3ms 12:38:47.759 Generated CSRF token OD2iMg8B-b8hJH6DEgkthdpDWlzpyLMTqHqE with secret undefined 12:38:49.764 304 GET /api/options took 2ms 12:38:49.790 304 GET /api/keyboard-shortcuts-for-notes took 1ms 12:38:49.818 304 GET /api/keyboard-actions took 3ms 12:38:49.826 200 GET /api/tree took 6ms 12:38:50.866 304 GET /api/script/widgets took 2ms 12:38:51.968 200 POST /api/tree/load took 2ms 12:38:53.695 304 GET /api/notes/dLYY7lKt1lJR took 1ms 12:38:53.985 304 GET /api/script/startup took 1ms 12:38:54.212 200 POST /api/tree/load took 4ms 12:38:54.846 200 POST /api/tree/load took 2ms 12:38:54.849 304 GET /api/notes/dLYY7lKt1lJR/revisions took 1ms 12:38:58.864 204 POST /api/recent-notes took 2ms 12:38:58.867 204 POST /api/recent-notes took 1ms 12:38:58.870 204 POST /api/recent-notes took 2ms 12:39:05.921 Slow 304 GET /api/similar-notes/2FfdNHWBEQxc took 143ms 12:39:06.033 Slow 304 GET /api/similar-notes/LFlj1I0gO97o took 67ms 12:39:06.484 Slow 304 GET /api/similar-notes/LFlj1I0gO97o took 197ms 12:39:06.490 Slow 304 GET /api/similar-notes/2FfdNHWBEQxc took 110ms 12:39:06.951 Created backup at /root/trilium-data/backup/backup-daily.db 12:39:07.163 Slow 304 GET /api/similar-notes/LFlj1I0gO97o took 176ms 12:39:07.178 Slow 304 GET /api/similar-notes/2FfdNHWBEQxc took 141ms 12:39:07.965 Created backup at /root/trilium-data/backup/backup-weekly.db 12:39:08.537 Created backup at /root/trilium-data/backup/backup-monthly.db 12:41:57.078 200 GET /api/backend-log took 3ms 12:42:14.891 304 GET /api/options took 2ms 12:42:15.512 304 GET /api/options/user-themes took 2ms 12:42:15.516 304 GET /api/keyboard-actions took 3ms 12:44:19.845 Generated CSRF token x815f0m1-CdGlmcHloBR0CMmpKHhnGu_d8XU with secret undefined 12:44:20.856 304 GET /api/options took 1ms 12:44:20.863 304 GET /api/keyboard-actions took 5ms 12:44:20.889 304 GET /api/tree took 6ms 12:44:20.892 304 GET /api/keyboard-shortcuts-for-notes took 1ms 12:44:21.008 304 GET /api/script/widgets took 1ms 12:44:21.763 200 POST /api/tree/load took 4ms 12:44:23.498 304 GET /api/notes/dLYY7lKt1lJR took 1ms 12:44:23.625 304 GET /api/script/startup took 2ms 12:44:23.892 200 POST /api/tree/load took 2ms 12:44:24.090 200 POST /api/tree/load took 2ms 12:44:24.540 304 GET /api/notes/dLYY7lKt1lJR/revisions took 2ms 12:44:28.350 POST /api/recent-notes rejected with 401 Logged in session not found 12:44:33.669 Generated CSRF token WOmmwVNm-NdAc1unE1_jKf90Jymp8ctQpeTo with secret undefined 12:44:37.898 Slow 304 GET /api/tree took 15ms 12:44:37.903 304 GET /api/keyboard-shortcuts-for-notes took 3ms 12:44:37.910 304 GET /api/options took 3ms 12:44:37.920 304 GET /api/keyboard-actions took 3ms 12:44:38.066 304 GET /api/script/widgets took 1ms 12:44:38.480 200 POST /api/tree/load took 2ms 12:44:40.065 304 GET /api/notes/dLYY7lKt1lJR took 1ms 12:44:40.605 304 GET /api/script/startup took 1ms 12:44:41.026 200 POST /api/tree/load took 2ms 12:44:41.131 304 GET /api/notes/dLYY7lKt1lJR/revisions took 1ms 12:44:41.710 200 POST /api/tree/load took 2ms 12:44:44.811 204 POST /api/recent-notes took 1ms 12:44:44.814 204 POST /api/recent-notes took 1ms 12:44:44.892 204 POST /api/recent-notes took 2ms 12:44:46.869 Slow 200 GET /api/quick-search/%E6%A1%86%E6%9E%B6 took 90ms 12:44:47.556 200 POST /api/tree/load took 2ms 12:44:48.876 Slow 304 GET /api/quick-search/%E6%A1%86%E6%9E%B6 took 72ms 12:44:51.680 200 GET /api/notes/F67X7wnrvXmN took 2ms 12:44:56.779 200 GET /api/tree?subTreeNoteId=JXeODAj9E1bG took 2ms 12:44:57.824 204 PUT /api/branches/218HM20kILfP/expanded/1 took 2ms 12:45:00.258 200 GET /api/tree?subTreeNoteId=JxUv2VzVJvo9 took 1ms 12:45:00.778 204 PUT /api/branches/NC89v3vVeYdz/expanded/1 took 1ms 12:45:02.250 200 GET /api/notes/JxUv2VzVJvo9 took 2ms 12:45:02.299 204 PUT /api/options took 5ms 12:45:03.587 Slow 304 GET /api/similar-notes/JxUv2VzVJvo9 took 93ms 12:45:03.619 Slow 200 GET /api/notes/JxUv2VzVJvo9/revisions took 11ms 12:45:07.061 204 POST /api/recent-notes took 1ms 12:45:12.352 Slow 304 GET /api/quick-search/%E6%A1%86%E6%9E%B6 took 123ms 12:45:16.629 304 GET /api/notes/dLYY7lKt1lJR took 1ms 12:45:16.662 204 PUT /api/options took 2ms 12:45:17.572 304 GET /api/notes/dLYY7lKt1lJR/revisions took 2ms 12:45:20.782 200 POST /api/delete-notes-preview took 3ms 12:45:21.448 204 POST /api/recent-notes took 3ms 12:45:21.989 Sending message to all clients: {"type":"taskProgressCount","taskId":"TY1lVA309Z","taskType":"delete-notes","progressCount":0} 12:45:21.993 Deleting note dLYY7lKt1lJR 12:45:21.995 Sending message to all clients: {"type":"taskSucceeded","taskId":"TY1lVA309Z","taskType":"delete-notes"} 12:45:21.998 Slow 200 DELETE /api/branches/543KtNvzPJgG?taskId=TY1lVA309Z&last=true took 10ms 12:45:22.564 200 GET /api/notes/dLYY7lKt1lJR took 7ms 12:45:22.643 Slow 304 GET /api/similar-notes/LFlj1I0gO97o took 147ms 12:45:22.646 Slow 304 GET /api/similar-notes/2FfdNHWBEQxc took 79ms 12:45:22.661 204 PUT /api/options took 4ms 12:45:22.670 304 GET /api/search/%23workspace took 5ms 12:45:22.720 304 GET /api/notes/dLYY7lKt1lJR took 2ms 12:45:22.814 200 GET /api/notes/ro21R86hl8fz took 2ms 12:45:22.984 Slow 200 GET /api/edited-notes/2023-04-06 took 12ms 12:45:22.987 304 GET /api/notes/dLYY7lKt1lJR took 1ms 12:45:22.998 204 PUT /api/options took 6ms 12:45:23.009 200 GET /api/date-notes/notes-for-month/2023-04 took 4ms 12:45:23.015 304 GET /api/search/%23workspace took 4ms 12:45:23.027 204 PUT /api/options took 2ms 12:45:23.433 304 GET /api/notes/ro21R86hl8fz took 2ms 12:45:23.437 304 GET /api/edited-notes/2023-04-06 took 3ms 12:45:23.440 304 GET /api/date-notes/notes-for-month/2023-04 took 1ms 12:45:23.477 304 GET /api/search/%23workspace took 2ms 12:45:23.531 204 PUT /api/options took 6ms 12:45:23.590 304 GET /api/notes/ro21R86hl8fz took 3ms 12:45:23.597 304 GET /api/date-notes/notes-for-month/2023-04 took 4ms 12:45:23.606 304 GET /api/edited-notes/2023-04-06 took 6ms 12:45:23.915 200 GET /api/notes/ro21R86hl8fz/revisions took 7ms 12:45:23.938 Slow 200 GET /api/similar-notes/ro21R86hl8fz took 175ms 12:45:24.083 200 POST /api/tree/load took 4ms 12:45:24.348 Slow 200 GET /api/quick-search/%E6%A1%86%E6%9E%B6 took 84ms 12:45:24.701 204 PUT /api/options took 2ms 12:45:24.708 204 PUT /api/options took 1ms 12:45:24.734 304 GET /api/notes/ro21R86hl8fz/revisions took 1ms 12:45:24.739 Slow 304 GET /api/similar-notes/ro21R86hl8fz took 29ms 12:45:24.890 304 GET /api/notes/ro21R86hl8fz/revisions took 2ms 12:45:24.917 Slow 304 GET /api/similar-notes/ro21R86hl8fz took 25ms 12:45:25.449 200 POST /api/tree/load took 1ms 12:45:26.369 200 GET /api/tree?subTreeNoteId=CtkSzkA3ePPl took 2ms 12:45:26.376 304 GET /api/notes/ON6kS6G20Wyx took 1ms 12:45:26.381 204 PUT /api/options took 2ms 12:45:26.662 200 POST /api/tree/load took 4ms 12:45:26.667 200 POST /api/tree/load took 3ms 12:45:26.774 204 PUT /api/branches/zUqfNtQWzMpA/expanded/1 took 1ms 12:45:27.378 Slow 304 GET /api/notes/ON6kS6G20Wyx/revisions took 12ms 12:45:27.390 Slow 304 GET /api/similar-notes/ON6kS6G20Wyx took 81ms 12:45:31.254 204 POST /api/recent-notes took 2ms 12:45:44.909 204 POST /api/recent-notes took 1ms 12:45:44.912 204 POST /api/recent-notes took 1ms 12:46:55.925 200 GET /api/app-info took 3ms

Nobellcq commented 1 year ago

I suspect the sqlite data was damaged, the larger size db just generate (Table counts: notes: 1270, note_revisions: 2725, branches: 1292, attributes: 520, etapi_tokens: 0), and the one month ago db that smaller can geneate (Table counts: notes: 1669, note_revisions: 3603, branches: 1691, attributes: 635, etapi_tokens: 0). So How to recover these, any advice.

zadam commented 1 year ago

I don't see any sign of a damaged SQLite.

I check the trilium-data, the md5sum of document.db equals the md5sum of data in the backup, daily backup, weekly backup, and monthly backup all equals.

This happens when Trilium sees that there's no recent backup. Which corresponds to database being old.

Is it possible that before the restart, Trilium used a different location for the data (TRILIUM_DATA_DIR env. variable)? Perhaps ran under a different user?

Do you run trilium in docker? A somewhat common error is that people don't configure volume mapping and Trilium stores data inside the container which gets lost if the container is deleted.

Nobellcq commented 1 year ago

I don't see any sign of a damaged SQLite.

I check the trilium-data, the md5sum of document.db equals the md5sum of data in the backup, daily backup, weekly backup, and monthly backup all equals.

This happens when Trilium sees that there's no recent backup. Which corresponds to database being old.

Is it possible that before the restart, Trilium used a different location for the data (TRILIUM_DATA_DIR env. variable)? Perhaps ran under a different user?

Do you run trilium in docker? A somewhat common error is that people don't configure volume mapping and Trilium stores data inside the container which gets lost if the container is deleted.

I am using manual installation, run with ./trilium.sh And I'm running under the root user, no other users. I have a high probability that sqlite is damaged, I try to restore document.db with sqlite3 but the result is the same as the trilium loading result. As for the cause of the corruption, I guess it was a sudden restart, which caused some unexpected situations, which corrupted the sqlite file, but it was not reflected in the log. I've almost given up :( but thanks anyway If you have other options, that's the best.

More: After trying to restore with sqlite3, the file size has been reduced by more than 20 M. From 96M to 72M. During the recovery process, the following information was output (too much, I intercepted some), if you are proficient in sqlite

Error: near line 19053: UNIQUE constraint failed: note_revision_contents.rowid Error: near line 19383: UNIQUE constraint failed: options.rowid Error: near line 19533: UNIQUE constraint failed: attributes.rowid Error: near line 20020: UNIQUE constraint failed: recent_notes.rowid Error: near line 20021: UNIQUE constraint failed: recent_notes.rowid Error: near line 20024: index IDX_branches_noteId_parentNoteId already exists Error: near line 20025: index IDX_branches_parentNoteId already exists Error: near line 20026: index IDX_notes_title already exists Error: near line 20027: index IDX_notes_type already exists Error: near line 20028: index IDX_notes_dateCreated already exists Error: near line 20029: index IDX_notes_dateModified already exists Error: near line 20030: index IDX_notes_utcDateModified already exists Error: near line 20031: index IDX_notes_utcDateCreated already exists Error: near line 20032: index IDX_note_revisions_noteId already exists Error: near line 20033: index IDX_note_revisions_utcDateCreated already exists Error: near line 20034: index IDX_note_revisions_utcDateLastEdited already exists Error: near line 20035: index IDX_note_revisions_dateCreated already exists Error: near line 20036: index IDX_note_revisions_dateLastEdited already exists Error: near line 20037: index IDX_attributes_name_value already exists Error: near line 20039: index IDX_attributes_noteId_index already exists Error: near line 20041: index IDX_attributes_value_index already exists Error: near line 20043: index IDX_entityChanges_entityName_entityId already exists Error: near line 20047: index IDX_entity_changes_changeId already exists

Nobellcq commented 1 year ago

I was still using trilium a few minutes before the accident, the backup system should be working normally, is there any other situation that will cause the files in the backup system to be consistent?

zadam commented 1 year ago

SQLite should not get such catastrophically damaged even in case of a sudden power failure - it is built to be resistant against this. Usually a few last transactions (seconds, minutes maximum before the power failure) will get lost, but not months of data.

In practice I don't remember a case of SQLite file being damaged so much by a power failure. Such problems are almost always caused by some sync application (like Dropbox, Google Drive) mangling the file.

I was still using trilium a few minutes before the accident, the backup system should be working normally, is there any other situation that will cause the files in the backup system to be consistent?

That's actually very suspicious and leads me to believe this is not the directory which has been in use before. All backup files being equal means Trilium created all these backups after the restart because it did not back up for a month before. Which is either because it wasn't running at all, or it was writing the backup somewhere else.

Nriver commented 1 year ago

Try find /* -name document.db, see if there is another copy of your data.

And, how did you backup your database on github? If it's git, there should be historical versions.