#5818 "First-run setup: Restore from a backup, by upload": beside creating the first admin, setup offers "Or restore from a backup". Only while no user exists; the upload is checked (a newer backup or one whose key can't open its secrets is refused and not kept), then restored with no safety backup (nothing to keep), and Steward restarts into the backup's users. #5819 "Docs and CI": backups.md leads with restoring from Settings → Backups and from setup; `steward restore --in-place` does the same-schema restore from the shell, and CI's image check now uses it with a real pg_restore: a changed setting comes back and the audit log stays. Also exempts errors/restoring.html from the breadcrumb guard, as with the other whole-app error pages: it replaces every page while a restore runs, so there is nowhere to trail back to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{# auth/setup.html — first-run setup: create the first admin, or restore a
|
||||
backup instead (#5818). Only shown while no user exists. #}
|
||||
{% extends "base.html" %}
|
||||
{% block title %}First-Run Setup — Steward{% endblock %}
|
||||
{% block content %}
|
||||
@@ -32,5 +34,19 @@
|
||||
<button type="submit" class="btn">Create Admin Account</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{# Or come back from a backup (#5818): its users, settings and key. #}
|
||||
<div class="card" style="margin-top:1.25rem;">
|
||||
<h2 class="section-title" style="margin-bottom:0.5rem;">Or restore from a backup</h2>
|
||||
<p class="field-hint" style="margin-bottom:1rem;">Moving Steward, or bringing it back? Upload a
|
||||
<code>steward-<time>.tar</code> instead of creating an account: its users, settings, hosts,
|
||||
monitors and key come back, and you sign in as one of its users.</p>
|
||||
{% if restore_error %}<p class="tone-crit" style="margin-bottom:0.75rem;">{{ restore_error }}</p>{% endif %}
|
||||
<form method="post" action="/setup/restore" enctype="multipart/form-data"
|
||||
style="display:flex;gap:0.75rem;flex-wrap:wrap;align-items:center;">{{ csrf_field() }}
|
||||
<input type="file" name="file" accept=".tar" required>
|
||||
<button type="submit" class="btn btn-ghost">Restore</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user