Restoring old Trilium backup

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.9.1
What app is this about: Trilium

Describe your issue

I need to restore old database, but I have difficulties. I’m using this guide Backup · zadam/trilium Wiki · GitHub, so I replace old db with new one, but then I get this error App db version is 228, while db version is 194. Migration needed.
I did try to install old version, but then I got same error.
I have idea also, why it doesn’t work: When I remove the app from cli, it actually doesn’t remove all the files. So every time replace db with new one, I get same error because actually it is same old version.
Now I will try to find version that accepts that db version and hard remove the app and reinstall the old version.
But this is not the easy way. Is there any other way to do this?

Share relevant logs or error messages

Dec 26 22:12:41 node[149477]: App db version is 228, while db version is 194. Migration needed.
Dec 26 22:12:41 node[149477]: ERROR: Direct migration from your current version is not supported. Please upgrade to the latest v0.60.4 first and only then to this version.
Dec 26 22:12:41 systemd[1]: trilium.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 22:12:41 systemd[1]: trilium.service: Failed with result ‘exit-code’.
Dec 26 22:12:41 systemd[1]: trilium.service: Scheduled restart job, restart counter is at 5.
Dec 26 22:12:41 systemd[1]: Stopped trilium.service - Trilium: notes server.
Dec 26 22:12:41 systemd[1]: trilium.service: Start request repeated too quickly.
Dec 26 22:12:41 systemd[1]: trilium.service: Failed with result ‘exit-code’.
Dec 26 22:12:41 systemd[1]: Failed to start trilium.service - Trilium: notes server.

Manage find that migration 194 was made in version 50. So I installed 50 version and replaced the database and it worked! I didn’t get all the media files back, but I get all the text back.
Next trying to update the new version…

Ok, can’t update from 50 ->63, because errors, many of them. Back to start.
How about upgrade version by version with command:
yunohost app upgrade trilium -u https://github.com/YunoHost-Apps/trilium_ynh/tree/*version*
Didn’t work, when I tried to update from 50 to 52, but then when I tried to update 50-> 55 it worked.
Continue testing

1 Like

Ha, made it!
Had to do this update from 59.2–>60.4
sudo yunohost app upgrade trilium -u https://github.com/orhtej2/trilium_ynh/tree/node_18_0_60_4 (from here)
and after that just cli update and it worked. Finally!

PS. why if trilium application backup dosent have home folder? When I do manual back, then the home folder is on there.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.