{% extends "base.html" %} {% block title %}Backups · NEXXVU{% endblock %} {% block content %} {% macro tip(label, text) %}{{ text }}{% endmacro %}

Settings › Platform

Backups {{ fresh_tag("settings:backups") }}

Where each ecosystem's backups are kept: its own folder on your backup storage (MikroTik RDS).

All settings
{% include "_settings_navigation.html" %}

Backups

{% if notice %}
{{ notice }}
{% endif %} {% if error %}{% endif %} {% if backup_job %}{% with job=backup_job %}{% include "_backup_job.html" %}{% endwith %}{% endif %}

Backup storage {{ tip("backup storage", "Each ecosystem gets its own folder and SMB share on the RDS. Only that share's SMB user can open it (Proxmox and you, by hand); the Portal writes into it with its own key-only file account, which may only sign in from this Portal. Nothing else on the RDS is touched.") }}

{% if storages %}
{% for b in storages %}{% endfor %}
EcosystemStorageFolder and shareSpaceLast checkActions
{{ b.ecosystem_name or b.ecosystem_id }} {{ b.asset_name or b.host }}
{{ b.host }}
{{ b.directory }}
\\{{ b.host }}\{{ b.share }} · SMB user {{ b.smb_user }}
{% if b.total_bytes %}{{ ((b.free_bytes or 0) / 1073741824)|round|int }} GB free of {{ (b.total_bytes / 1073741824)|round|int }} GB{% else %}{% endif %}
limit {{ b.quota_gb }} GB
{% if b.state == 'verified' %}Working{% elif b.state == 'failed' %}Failed{% else %}Set up{% endif %}
{{ (b.checked_at or '')[:16]|replace('T', ' ') }}
{% if admin %}
Actions ▾
{% endif %}
{% else %}

No backup storage connected yet.

{% endif %}

Backup password {{ fresh_tag("settings:backup-password") }} {{ fresh_tag("settings:backup-password-nexxkey") }} {{ tip("the backup password", "One password for this Portal's encrypted MikroTik backups, made by NEXXVU and kept in NEXXKEY: an administrator sees it again with Show while NEXXKEY is unlocked with a passkey (every view is in the NEXXKEY log). You need it to restore an encrypted .backup on a router. Encrypting stays your choice for each backup and rule.") }}

{% set pw_value = new_password or shown_password %} {% if pw_value %}
The backup password (not kept on this page; see it again any time with Show):
{{ pw_value }}
{% endif %} {% if backup_password %}

Made {{ (backup_password.created_at or '')|replace('T', ' ')|replace('Z', ' UTC') }} {% if password_in_nexxkey %}· in NEXXKEY{% else %}· not in NEXXKEY yet (set up NEXXKEY: it is saved there on the next visit){% endif %}

{% if admin and password_in_nexxkey and not pw_value %}
needs NEXXKEY unlocked
{% endif %} {% else %} {% if admin and nexxkey_active %}
{% elif admin %}

NEXXKEY needed Set up NEXXKEY first: the backup password is kept there.

{% endif %} {% endif %}

Backup rules {{ fresh_tag("settings:backup-rules") }} {{ tip("backup rules", "Back up an ecosystem's MikroTik routers and Proxmox VMs (a node in a rule = all its VMs) by themselves - every day, week or month at a time you choose - and clean up old backups by each rule's own choice: keep the last N, delete older than N days, or keep 14 daily, 8 weekly and 12 monthly. Clean-up only deletes that rule's backups (never ones made by hand), and the newest always stays.") }}

{% if rules %}
{% for r in rules %}{% endfor %}
RuleDevicesWhenClean-upLast runActions
{{ r.name }}
{{ r.ecosystem_name or r.ecosystem_id }}{% if not r.enabled %} · paused{% endif %}
{{ r.devices|length }}
{{ 'encrypted' if r.encrypted else 'not encrypted' }}{{ ' + export' if r.export }}
{{ r.when }}{% if r.next_run %}
next {{ r.next_run[:16]|replace('T', ' ') }} UTC{% endif %}
{{ r.keep_label }} {% if r.last_run_at %}{% if r.last_failed %}Failed{% else %}OK{% endif %} {{ r.last_run_at[:16]|replace('T', ' ') }} UTC
{{ r.last_result }}{% else %}{% endif %}
{% if admin %}
Actions ▾
{% for action, label in (('run', 'Run now'), ('pause' if r.enabled else 'resume', 'Pause' if r.enabled else 'Resume'), ('delete', 'Delete the rule')) %}
{% endfor %}
{% endif %}
{% else %}{% endif %} {% if admin %}
Add a rule {% set rf = rule_form or {} %}
Routers and Proxmox nodes {% for c in rule_candidates %} {% else %}{% endfor %}
{% endif %}

Inventory {{ fresh_tag("backups:inventory-progress") }} {{ tip("the inventory", "Every device with backups on the backup storage: how many files and how much space, its newest backup set, and whether its last backup succeeded. Open a device to download or delete its files.") }}

{% macro mb(n) %}{% if n >= 1073741824 %}{{ (n / 1073741824)|round(1) }} GB{% elif n >= 1048576 %}{{ (n / 1048576)|round(1) }} MB{% elif n >= 1024 %}{{ (n / 1024)|round|int }} KB{% else %}{{ n }} B{% endif %}{% endmacro %} {% if backup_overview %}
{% for d in backup_overview %}{% endfor %}
DeviceLast backupNewest set (UTC)FilesSpaceActions
{{ d.name }} {% if d.last %}{% if d.last.state == 'done' %}OK{% elif d.last.state == 'failed' %}Failed{% else %}Not run{% endif %} {{ (d.last.finished_at or '')[:16]|replace('T', ' ') }}{% if d.last.state != 'done' and d.last.message %}
{{ d.last.message[:200] }}{% endif %}{% else %}{% endif %}
{% if d.newest_at %}{{ d.newest_at[:16]|replace('T', ' ') }}
{% for f in d.newest %}✓ {{ 'rsc' if f.kind == 'export' else f.kind }}{% if f.kind == 'backup' %} · {{ 'encrypted' if f.encrypted else 'not encrypted' }}{% endif %} {% endfor %}{% else %}{% endif %}
{{ d.files }} {{ mb(d.bytes) }}
Actions ▾
{% else %}{% endif %} {% if backup_jobs %}
Recent runs {{ backup_jobs|length }}
{% for j in backup_jobs %}{% endfor %}
Started (UTC)RunResultActions
{{ j.started_at[:16]|replace('T', ' ') }} {{ j.title }} {% if j.state == 'running' %}Running{% elif j.state == 'done' %}OK{% else %}{{ 'Interrupted' if j.state == 'interrupted' else 'Failed' }}{% endif %} {{ j.done }} of {{ j.total }} Show
{% endif %}
{% if admin %}

Connect an ecosystem to backup storage {{ fresh_tag("settings:backups-connect") }} {{ fresh_tag("backups:clear-messages") }} {{ fresh_tag("backups:sensitive-right") }} {{ fresh_tag("backups:write-right") }}

{% if not candidates %}

First add your RDS: Inventory › Add device, MikroTik over SSH, with the role Backup Storage.

{% else %}
{% if preview %}

The configuration NEXXVU applies {{ tip("the configuration", "One block: if the share, SMB user or account name already exists and is not NEXXVU's, the block stops before anything changes. Secrets are shown as ********.") }}

{{ preview.lines|join('\n') }}
{% for k in ('asset_id', 'ecosystem_id', 'disk', 'quota_gb') %}{% endfor %}

Used once and then discarded; never stored.

{% endif %} {% endif %}
{% endif %}
{% endblock %} {% block scripts %}{% endblock %}