Files
ProxmoxVE/ct
173cc421d8 Trilium: keep the installed version when an update download fails (#18592)
* Trilium: keep the installed version when an update download fails

update_script deleted /opt/trilium before fetch_and_deploy_gh_release, so a
failed download (GitHub answered 502 for the v0.107.0 archive) left the
container without Trilium, and every later update stopped at "No Trilium
Installation Found".

CLEAN_INSTALL=1 lets core clear the target only after the archive has
downloaded and extracted. If the deploy still fails, the service is started
again on the installed version and the pending marker makes the next update
retry. The install check now looks for trilium.service, so containers broken
by the old order recover with a plain update.

The "database" backup copied /opt/trilium/assets/db, which only holds files
shipped in the release; notes live in Trilium's data directory, which the
update never touches. Removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjCs8G7xWJ12fzC1g4v81E

* Trilium: back up the notes database before updating

With the service stopped and before the new release is deployed, the update
copies document.db (and a -wal file left by an unclean stop) to
<data dir>/backup/backup-before-update.db. The copy is kept after the update,
overwritten by the next one, and listed on Trilium's Backup page. If it cannot
be written, the update does not start and Trilium is restarted.

An install whose TRILIUM_DATA_DIR is inside /opt/trilium is refused before
anything is stopped, since CLEAN_INSTALL replaces that directory.

The install check accepts /opt/trilium again as well as trilium.service, so no
install that passed the old check fails the new one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjCs8G7xWJ12fzC1g4v81E

---------

Co-authored-by: s31teg <23174852+s31teg@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:11:29 +01:00
..
2026-11-13 08:55:56 +01:00
2026-11-13 09:19:12 +01:00
2026-11-01 21:21:56 +01:00
2026-10-10 09:10:51 +02:00
2026-10-03 08:19:10 +02:00
2026-10-30 22:06:11 +01:00
2026-10-01 23:21:35 +02:00
2026-11-13 08:59:30 +01:00
2026-11-13 09:15:32 +01:00
2026-10-19 19:22:08 +02:00
2026-10-26 09:07:06 +01:00
2026-10-10 09:11:09 +02:00
2026-10-30 22:05:13 +01:00
2026-11-08 14:50:13 +01:00
2026-11-13 09:07:26 +01:00
2026-11-13 12:30:02 +01:00
2026-11-13 09:11:37 +01:00
2026-10-22 13:50:33 +02:00
2026-11-13 09:21:35 +01:00
2026-10-28 07:24:22 +01:00
2026-10-03 08:19:10 +02:00
2026-10-03 08:19:10 +02:00
2026-10-03 08:19:10 +02:00
2026-10-16 21:45:39 +02:00
2026-10-25 19:47:32 +01:00
2026-10-25 13:10:08 +01:00
2026-11-13 10:22:30 +01:00
2026-11-07 21:00:38 +01:00
2026-11-13 09:31:52 +01:00
2026-10-03 08:19:10 +02:00
2026-10-09 08:31:48 +02:00
2026-10-01 23:23:26 +02:00
2026-10-03 08:19:10 +02:00
2026-10-03 08:19:10 +02:00
2026-11-13 10:23:20 +01:00
2026-10-03 08:19:10 +02:00
2026-10-26 10:08:20 +01:00
2026-10-26 09:18:22 +01:00
2026-11-11 21:39:28 +01:00
2026-11-13 10:23:50 +01:00
2026-10-03 16:58:20 +02:00
2026-10-03 08:19:10 +02:00
2026-11-13 10:26:49 +01:00
2026-10-17 15:50:25 +02:00
2026-11-13 14:47:44 +01:00
2026-11-13 10:27:25 +01:00
2026-10-19 19:20:35 +02:00
2026-11-13 10:28:06 +01:00
2026-11-13 12:28:15 +01:00
2026-10-16 21:44:38 +02:00
2026-10-03 08:19:10 +02:00
2026-10-03 08:19:10 +02:00
2026-11-12 09:54:10 +01:00
2026-10-03 08:19:10 +02:00
2026-10-06 10:48:36 +02:00
2026-11-01 21:18:19 +01:00
2026-10-30 22:06:33 +01:00
2026-10-03 08:19:10 +02:00
2026-10-03 08:19:10 +02:00
2026-09-30 19:40:34 +02:00
2026-11-13 12:28:35 +01:00
2026-11-13 10:41:19 +01:00
2026-10-26 08:48:57 +01:00
2026-10-26 09:09:36 +01:00
2026-10-03 08:19:10 +02:00
2026-10-03 08:19:10 +02:00
2026-10-03 08:19:10 +02:00
2026-10-25 13:10:27 +01:00
2026-11-13 10:57:58 +01:00
2026-11-03 09:08:34 +01:00
2026-11-13 10:51:23 +01:00
2026-10-09 08:27:27 +02:00
2026-10-31 21:46:03 +01:00
2026-11-13 12:40:55 +01:00
2026-10-26 17:48:05 +01:00
2026-10-12 14:02:50 +02:00
2026-11-13 10:46:58 +01:00
2026-10-10 22:49:16 +02:00
2026-10-03 08:19:10 +02:00
2026-10-17 15:50:13 +02:00
2026-10-26 09:17:02 +01:00