Maurice
0aa5b36661
fix(backup): back up and restore through an injected database port
...
Backup, restore and the demo reset each handled the SQLite file
themselves: backup.impl closed and reinitialized the connection, built
MaintenanceRepository with new, and assumed the database was
data/travel.db. That tied the whole chain to one local file and hid two
bugs.
They now go through DATABASE_BACKUP, a port declared in the shared
database kernel (snapshot, verify, keep a copy before a restore, replace).
SqliteDatabaseBackup implements it with what the code did before:
VACUUM INTO for a consistent copy, and a close, copy, sidecar drop,
rename and reopen through DatabaseLifecycle for a restore. BackupService
injects it and hands it to backup.impl. The demo reset and the baseline
save use the same port; the first baseline is saved by DemoResetJob once
the app is up, because the boot-time seed runs before anything can be
injected. Another engine can plug in a logical dump behind the port.
Fixes on the way:
- The backup and the restore ignored TREK_DB_FILE. The backup looked for
data/travel.db and, with the database elsewhere, silently left it out
of the archive; the restore wrote data/travel.db and never replaced
the live database. Both now use DatabaseLifecycle.file, the path the
connection runs on, and the pre-restore copy sits next to it.
- A failed VACUUM INTO fell back to archiving the live WAL-mode file
without a word, the torn copy the snapshot exists to prevent. The
backup now fails: nothing is archived or committed, the existing
backups are untouched, a partial snapshot is removed, and the log says
why. A missing database file and a failed checkpoint are logged too.
2026-10-08 18:38:28 +02:00
..
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-08 18:38:28 +02:00
2026-10-08 13:04:38 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 14:11:55 +02:00
2026-10-06 19:27:30 +02:00
2026-08-07 19:58:12 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-27 23:26:42 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 18:38:28 +02:00
2026-10-08 18:38:28 +02:00
2026-06-16 22:22:45 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:16:26 +02:00
2026-07-25 15:12:38 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 22:43:09 +02:00
2026-08-17 14:48:23 +02:00
2026-09-15 21:36:34 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-07-27 22:34:41 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-07 15:14:14 +02:00
2026-10-08 18:38:28 +02:00
2026-08-22 11:33:55 +02:00
2026-10-07 16:03:19 +02:00
2026-10-08 18:38:28 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 22:56:35 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-12 14:14:37 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:47:53 +02:00
2026-09-19 21:01:45 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-25 19:26:38 +02:00
2026-06-16 22:22:45 +02:00
2026-09-01 17:18:10 +02:00
2026-10-07 17:12:26 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-14 23:00:57 +02:00
2026-10-06 19:27:30 +02:00
2026-09-14 23:00:57 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-08-07 18:42:53 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-22 11:33:55 +02:00
2026-08-11 16:42:49 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-16 11:08:07 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-01 17:18:10 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:04:38 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:04:38 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:04:38 +02:00
2026-08-20 15:43:27 +02:00
2026-10-06 19:27:30 +02:00
2026-09-03 10:47:08 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-15 16:42:27 +02:00
2026-08-15 16:42:27 +02:00
2026-09-12 18:02:57 +02:00
2026-08-15 16:42:27 +02:00
2026-08-15 16:42:27 +02:00
2026-09-07 18:36:54 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-07 18:36:54 +02:00
2026-10-06 19:27:30 +02:00
2026-09-07 14:05:33 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-07 18:36:54 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:04:38 +02:00
2026-10-06 19:27:30 +02:00
2026-09-26 11:22:20 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:02:57 +02:00
2026-09-04 12:15:53 +02:00
2026-09-04 12:15:53 +02:00
2026-10-07 16:45:21 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 17:55:25 +02:00
2026-08-15 16:42:27 +02:00
2026-09-22 13:30:12 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-10 17:08:54 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-10 12:24:15 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:04:38 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-07-30 17:07:12 +02:00
2026-08-12 17:43:22 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-23 11:59:12 +02:00
2026-10-07 22:40:12 +00:00
2026-08-10 19:54:46 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:02:57 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-12 11:23:09 +02:00
2026-09-20 13:54:31 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-12 12:24:33 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-30 23:00:12 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-02 21:06:42 +02:00
2026-09-09 10:11:36 +02:00
2026-10-08 18:38:28 +02:00
2026-08-25 19:26:38 +02:00
2026-10-08 13:04:38 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-07 20:54:10 +02:00
2026-10-07 20:54:10 +02:00
2026-10-06 22:43:09 +02:00
2026-10-07 20:54:10 +02:00
2026-10-07 20:54:10 +02:00
2026-08-01 12:45:35 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-23 22:35:01 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 18:38:28 +02:00
2026-10-07 16:11:41 +02:00
2026-10-08 18:38:28 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 18:38:28 +02:00
2026-10-08 13:02:58 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:59:52 +02:00
2026-08-23 11:59:12 +02:00
2026-08-15 16:42:27 +02:00
2026-08-18 22:24:29 +02:00
2026-10-06 19:27:30 +02:00
2026-09-24 14:05:42 +02:00
2026-10-06 22:43:09 +02:00
2026-08-11 09:58:37 +02:00
2026-06-16 22:22:45 +02:00