{% extends "admin/_layout.html" %} {% from "_macros.html" import icon %} {% set section = "backups" %} {# Backups (api/admin_backups.py, services/backup.py): one archive per backup, both databases, the uploads and a manifest. A restore is checked and staged here, and put in place at the next start -- never under the running service. #} {% block title %}{{ t("Backups") }} - {{ brand.name }}{% endblock %} {% block heading %}{{ t("Backups") }}{% endblock %} {% block admin_content %}

{{ t("A backup is one file: both databases, the uploaded files, and a manifest with every file's size and checksum. Taken while the instance runs, without stopping anything.") }}

{% if saved %}
{{ icon("check", "icon--sm") }} {{ saved }}
{% endif %} {% if error %}
{{ icon("warning", "alert__icon") }} {{ error }}
{% endif %} {% if pending %}
{{ icon("refresh", "icon--sm") }} {{ t("A restore is waiting: the backup of %(when)s (LLeMbas %(version)s). It is put in place when the service restarts; the data it replaces is kept in a pre-restore folder.", when=pending.created_at, version=pending.app_version) }}
{% endif %}

{{ t("Back up now") }}

{{ t("With one, the secret key goes into the backup, encrypted, and a restore on another machine can read the stored keys. Empty uses the schedule's passphrase, if one is set.") }}

{{ tm("Backups go to %(dir)s (set by LEMBAS_BACKUP_DIR).", dir=directory) }}

{% if ephemeral_key %}

{{ t("This instance runs on a temporary secret key, so no backup carries one.") }}

{% endif %}

{{ t("Backups") }} {{ archives|length }}

{% if not archives %}

{{ t("None yet.") }}

{% else %} {% endif %}

{{ t("Restore") }}

{{ t("The backup is checked first: its manifest, every file's checksum, both databases' integrity, and that it is from this major version. Then it waits until the service restarts, and the data it replaces is moved aside, not deleted.") }}

{# Not saved in place: an upload can be large, and a plain post shows the browser's own progress while it goes. #}

{{ t("When the backup carries its secret key, the stored keys are re-encrypted for this instance. Without it, they open only if this instance's secret key is the one the backup was taken under.") }}

{{ t("Schedule") }}

{% if values.last_day %}{{ t("Last run: %(day)s.", day=values.last_day) }}{% endif %}{% if values.last_error %} {{ t("It failed: %(error)s", error=values.last_error) }}{% endif %}

{{ t("In the server's time.") }}

{{ t("The newest backup of each of the last this many days.") }}

{{ t("And the newest of each of the last this many weeks. Both 0 keeps every backup.") }}

{{ t("Scheduled backups carry the secret key under this passphrase. Empty leaves it out. Keep the passphrase somewhere other than this server.") }}

{% endblock %}