Roll back the database and /data with a failed update

Before an update, coreapps dumps the app's database (pg_dump or
mariadb-dump, in the database's container) and makes a reflink copy of
/data (Cores' /federated is btrfs). A failed update restores both before
starting the old version; a failed dump refuses the update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 15:50:10 -07:00
co-authored by Claude Opus 5.5
parent 14311cee21
commit 77427f2f16
4 changed files with 149 additions and 25 deletions
+6 -4
View File
@@ -297,10 +297,12 @@ Common causes:
`coreapp logs`), listens on another port or on 127.0.0.1, or `health`
points at a path that fails or redirects to an error.
- "Rolled back": an update failed, so the Core put back the version that
ran before, with its settings, and undid needs the update added. The
failed version's log is printed above that line (`coreapp logs` now shows
the old version's). Its data and database aren't rolled back. When the
version wasn't raised, the image that failed is the one running again.
ran before, with its settings, its database and `/data` as they were
before the update (`/data` only where the Core's filesystem can copy it
instantly; the message says), and undid needs the update added. Whatever
the failed version wrote is gone. Its log is printed above that line
(`coreapp logs` now shows the old version's). When the version wasn't
raised, the image that failed is the one running again.
- `coreapp check` fails but deploy worked: a new certificate can take a
minute; it retries for two. It also tries the VM directly, which tells the
app apart from the way in.