Repository navigation
Control Panel: one-shot backup choices when the backup drive is not mounted - #30
Merged
Merged
Conversation
…ounted The browser upgrade ran `vesselstackctl backup --require-mounted` with no terminal, so an unmounted backup drive always failed the upgrade with no way to recover from the panel. Before an upgrade or folder update the panel now runs a backup preflight and, when the drive is not mounted, lets the owner choose for that one run: mount the fstab entry, mount a listed USB drive by UUID, back up to the system disk once (/var/backups/vesselstack), change the backup folder, or install without a backup (explicit confirmation). - vesselstackctl: backup --system-disk-once, backup-drive list --json, backup-drive mount --fstab|--uuid (nodev,nosuid,noexec, UUID verified after mount, never writes /etc/fstab), update --backup-choice for the panel. - Choices are validated in the panel and again in the worker, never persisted, and blocked by VESSELSTACK_BACKUP_ALLOW_UNMOUNTED=false (file or env). - Terminal menu choice [4] now writes to /var/backups/vesselstack so the unmounted drive folder stays empty. - Default (drive mounted) path is unchanged. - README, docs and CHANGELOG updated. Linux-only shell tests not yet run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tar -t | grep -q under pipefail fails when grep matches early in a listing longer than one pipe write; which entry comes first depends on the filesystem's directory order, so CI failed on the Prometheus marker check. Read the listing into a variable first. Product backup behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Control Panel upgrade ran
vesselstackctl backup --require-mountedwith no terminal attached. An unmounted backup drive always failed the upgrade ("backup location not mounted"), with no way to mount it, pick another location or skip from the panel.Change
Before Back up & install or Update from folder, the panel checks the backup drive (
GET /api/backup-preflight). If the drive is mounted, nothing changes. If it isn't, a dialog offers, for that one run only:/etc/fstabentry/var/backups/vesselstackScript changes:
vesselstackctl backup --system-disk-oncevesselstackctl backup-drive list --jsonvesselstackctl backup-drive mount --fstab|--uuid:nodev,nosuid,noexec/etc/fstabvesselstackctl update --backup-choice=system-disk-once|skip, used by the panel and the installer and left out of--help/var/backups/vesselstack, so the unmounted drive folder stays empty.Safety:
vesselstack.envor reused.VESSELSTACK_BACKUP_ALLOW_UNMOUNTED=false, in the env file or the process environment, blocks system-disk-once and skip.README, docs/CONTROL_PANEL.md, docs/UPDATING.md, docs/CONTROL_PANEL_TESTING.md and CHANGELOG (Unreleased) are updated.
Known limitation
The upgrade that delivers this still runs the installed (old) worker. For that one upgrade, mount the drive by hand or update from a terminal.
Testing
python3 -m unittest discover -s tests -p 'test_*.py': 1162 OK, 17 skipped (macOS)node tests/test_control_panel_ui.cjspython3 scripts/check-public-tree.py,tests/test-distribution.sh,bash -n/shellcheck -xsudo tests/test-lifecycle.shandsudo tests/test-get-vesselstack.sh(Linux only; new cases written without being run)findmnt); see docs/CONTROL_PANEL_TESTING.md🤖 Generated with Claude Code