{# settings/backups.html — Steward's own backups (#5673): a verdict, the bucket they go to (Fabled Archives over S3) and the daily hour, then the recent runs, each with its own check and Check and Restore buttons (#5823, #5817), and a file to check or restore. #} {% extends "base.html" %} {% from "_macros.html" import crumbs %} {% from "settings/_tabs.html" import settings_tabs %} {% block title %}Settings — Backups — Steward{% endblock %} {% block section_tabs %}{{ settings_tabs("backups") }}{% endblock %} {% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("Backups", "")]) }}{% endblock %} {% block content %} {% set tone = {"ok": "tone-ok", "warn": "tone-warn", "bad": "tone-crit", "off": "tone-dim"}[verdict.tone] %}

{{ verdict.text }} {%- if verdict.moment %} {{ verdict.moment|ago }}{% endif %}. {%- if verdict.failed %} {{ verdict.error }} {% if verdict.good %}The newest good backup was sent {{ verdict.good|ago }}.{% else %}No backup has been sent yet.{% endif %} {%- endif %}

{% if restore_failed %}

The restore of {{ restore_failed.name }} {%- if restore_failed.since %} {{ restore_failed.since|ago }}{% endif %} failed, and nothing changed: {{ restore_failed.error }}

{% endif %} {% if flash %}
{{ flash.message }}
{% endif %}
{{ csrf_field() }}

Bucket

Each backup is one file, steward-<time>.tar, for getting Steward running again: its settings, users, hosts, monitors, alert rules and dashboards, and its secret key. Logs and history are left out: the audit log, alert history, metrics and check results. Anyone holding a copy can read every password and key Steward keeps, so keep the bucket private.

The S3 address, without the bucket. Requests are path-style: endpoint/bucket/file.

{% if has_secret %} {% endif %}

An append-only key is enough: Steward only uploads and never deletes. How long backups are kept is the bucket's own setting.

Schedule

A day missed while Steward was down is made up when it is back; a failed backup is tried again an hour later. Watch it with an alert rule on "Steward itself", resource backup, metric "Newest backup's age".

{{ csrf_field() }}
{{ csrf_field() }}

Both use the saved settings.

Recent backups

{% if history %}
{% for r in history %} {% endfor %}
WhenOutcomeFileSizeTookStarted by
{{ r.at|when if r.at else "—" }} {% if r.ok %}Sent {%- if r.check %}
{%- if r.check.ok and not r.check.changes %}Checked: reads back whole{% else %}{{ r.check.summary }}{% endif %}
{% endif %} {%- else %}Failed
{{ r.error }}
{% endif %}
{{ r.name or "—" }} {{ r.size|bytes if r.ok else "—" }} {{ r.secs|duration }} {{ "the schedule" if r.by == "schedule" else r.by }} {% if r.ok and r.name %}
{{ csrf_field() }}
{{ csrf_field() }}
{% endif %}
{% else %}

None yet.

{% endif %}

Check compares a backup with what is in place: what a restore would bring back, change or remove, area by area. It changes nothing. Restore shows the same comparison and asks you to confirm before anything changes.

Check or restore a file

{{ csrf_field() }}

A steward-<time>.tar downloaded from the bucket, or made with steward backup.

{% endblock %}