Skip to content

Add persist-data boot probe to warn when data may not survive a restart#2396

Open
dsagal wants to merge 1 commit into
mainfrom
persist-probe
Open

Add persist-data boot probe to warn when data may not survive a restart#2396
dsagal wants to merge 1 commit into
mainfrom
persist-probe

Conversation

@dsagal

@dsagal dsagal commented Jun 15, 2026

Copy link
Copy Markdown
Member

Context

Detects the common self-host mistake of running the Docker image without a volume mounted at /persist, where documents and the home DB live on the container's ephemeral filesystem and are lost on restart.

Proposed solution

We use a few heuristics:

  • We take GRIST_DATA_DIR set to the docker default is a sign of running in a container with ephemeral root.
  • We take GRIST_DATA_DIR as ephemeral if it's on the same mount as the ephemeral root, or if it's a RAM filesystem.
  • Using external document storage and Postgress count as durable.

This check is surfaced as Quick Setup warning banner in the "Backups" page, and a boot probe check in the Admin Panel.

Related issues

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this is not relevant here
  • 🙋 no, because I need help

This seems hard to test, it's about detecting what environment we are running in. Open to testing suggestions.

Screenshots / Screencasts

Screenshot 2026-06-15 at 10 14 43

Detects the common self-host mistake of running the Docker image without a
volume mounted at /persist, where documents and the home DB live on the
container's ephemeral filesystem and are lost on restart.

We use a few heuristics:
- We take GRIST_DATA_DIR set to the docker default is a sign of running in a container with ephemeral root.
- We take GRIST_DATA_DIR as ephemeral if it's on the same mount as the ephemeral root, or if it's a RAM filesystem.
- Using external document storage and Postgress count as durable.

This check is surfaced as Quick Setup warning banner in the "Backups"
page, and a boot probe check in the Admin Panel.
@paulfitz paulfitz self-requested a review June 22, 2026 15:38

@paulfitz paulfitz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @dsagal !

@paulfitz

Copy link
Copy Markdown
Member

@dsagal looks like some conflicts has accumulated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants