mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 09:26:03 +00:00
A backup target is a dir or NFS storage pool the administrator makes on the hosts and registers on the new Backup targets page (Backups in the menu, superusers only). Each compute's pool is kept with its UUID, so a pool replaced by another of the same name is refused. A second compute's pool is accepted only when it is the same directory as the target's first (the exclusive-create check migrations use). The target page shows each pool's space and warns when the target is inside another pool's directory, as its backups would share that storage's failures. The storage pages refuse to delete a target's pool, and a volume of a backup (page and API): backups are deleted from the Backups pages.
44 lines
1.8 KiB
HTML
44 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
||
{% load i18n %}
|
||
{% load bootstrap_icons %}
|
||
{% load django_bootstrap5 %}
|
||
|
||
{% block title %}{% trans "Backup targets" %}{% endblock %}
|
||
|
||
{% block page_heading %}{% trans "Backup targets" %}{% endblock page_heading %}
|
||
|
||
{% block content %}
|
||
<p class="text-body-secondary">{% blocktrans %}A backup target is a directory or NFS storage pool made on the hosts. Use storage apart from the VMs' disks: a target on the same storage is lost with it.{% endblocktrans %}</p>
|
||
|
||
{% if targets %}
|
||
<div class="table-responsive mb-4">
|
||
<table class="table table-hover align-middle">
|
||
<thead>
|
||
<tr><th>{% trans "Name" %}</th><th>{% trans "Storage pools" %}</th><th class="text-end">{% trans "Backups" %}</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for target in targets %}
|
||
<tr>
|
||
<td><a href="{% url 'vmbackups:target' target.id %}">{{ target.name }}</a></td>
|
||
<td>{% for row in target.pools.all %}<span class="badge text-bg-light border me-1">{{ row.compute.name }}: {{ row.pool }}</span>{% empty %}–{% endfor %}</td>
|
||
<td class="text-end">{{ target.backup_count }}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{% else %}
|
||
<div class="alert alert-info">{% trans "No backup target yet." %}</div>
|
||
{% endif %}
|
||
|
||
<div class="card" style="max-width: 40rem;">
|
||
<div class="card-header fw-semibold">{% trans "Add a backup target" %}</div>
|
||
<div class="card-body">
|
||
<form method="post">
|
||
{% csrf_token %}
|
||
{% bootstrap_form form %}
|
||
<button type="submit" class="btn btn-primary">{% bs_icon 'plus' %} {% trans "Add" %}</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
{% endblock %}
|