{% extends "pobsync_backend/base.html" %} {% block title %}Retention plan | {{ host.host }}{% endblock %} {% block content %}
Kind
{{ plan.kind }}
Keep
{{ plan.keep|length }}
Would Delete
{{ plan.delete|length }}
Scheduled Limit
{{ scheduled_prune_limit|default:"none" }}
Incomplete
{{ plan.incomplete|length }}
{% if scheduled_prune_exceeded %}

Scheduled Prune Limit

This plan would delete {{ plan.delete|length }} snapshot(s), which exceeds the scheduled prune limit of {{ scheduled_prune_limit }}. Scheduled pruning will refuse to apply this plan until the limit or retention selection is adjusted.

{% endif %} {% if plan.incomplete %}

Incomplete Snapshots

{{ plan.incomplete|length }} incomplete snapshot(s) exist for this host. Retention does not delete incomplete snapshots automatically because they can indicate an interrupted backup that should be inspected first.

{{ incomplete_unreviewed_count }} still need review. After inspection, mark them reviewed and use the dedicated cleanup form below to delete only incomplete snapshot directories and their tracking records. Successful scheduled and manual snapshots are not touched by this cleanup.

{% endif %}

Policy

Daily: {{ plan.retention.daily }}
Weekly: {{ plan.retention.weekly }}
Monthly: {{ plan.retention.monthly }}
Yearly: {{ plan.retention.yearly }}
Protect bases: {{ protect_bases|yesno:"yes,no" }}
{% if protect_bases %} Base snapshots referenced by kept snapshots are also kept and marked with a base-of reason. {% else %} Base snapshots are only kept when they match the regular retention policy. {% endif %}
{% if schedule %}
Schedule pruning: {{ schedule.prune|yesno:"enabled,disabled" }}
Schedule max delete: {{ schedule.prune_max_delete }}
{% endif %}

Would Delete

{% for snapshot in plan.delete %} {% empty %} {% endfor %}
Kind Dirname Started Status Reason Path
{{ snapshot.kind }} {{ snapshot.dirname }} {{ snapshot.dt }} {{ snapshot.status|default:"" }} {{ snapshot.reason }} {{ snapshot.path }}
Retention would not delete snapshots for this selection.
{% if plan.delete %}

Apply Retention

This permanently deletes the snapshot directories listed in Would Delete. Confirm the host and delete count before applying the plan.

{% csrf_token %} {{ apply_form.non_field_errors }} {{ apply_form.kind.as_hidden }}
{{ apply_form.max_delete.errors }} {{ apply_form.max_delete }}
Must be at least {{ plan.delete|length }} for the snapshots shown in Would Delete.
{{ apply_form.protect_bases.errors }} {{ apply_form.protect_bases }}
{{ apply_form.confirm_host.errors }} {{ apply_form.confirm_host }}
{{ apply_form.confirm_host.help_text }}
{{ apply_form.confirm_delete_count.errors }} {{ apply_form.confirm_delete_count }}
{{ apply_form.confirm_delete_count.help_text }}
Cancel
{% endif %}

Keep Reasons

{% for snapshot in plan.keep_items %} {% empty %} {% endfor %}
Kind Dirname Started Status Reasons
{{ snapshot.kind }} {{ snapshot.dirname }} {{ snapshot.dt }} {{ snapshot.status|default:"" }} {{ snapshot.reason }}
No snapshots matched this retention selection.
{% if plan.incomplete %}

Incomplete Snapshots

{% for snapshot in plan.incomplete %} {% endfor %}
Dirname Started Status Review Reason Path
{{ snapshot.dirname }} {{ snapshot.dt }} {{ snapshot.status|default:"" }} {% if snapshot.reviewed %} reviewed {{ snapshot.reviewed_by|default:"unknown" }} {% else %} needs review {% endif %} {{ snapshot.reason }} {{ snapshot.path }}

Cleanup Incomplete Snapshots

{% if incomplete_unreviewed_count %}

Cleanup is blocked until all incomplete snapshots are reviewed. This extra step makes it explicit that the interrupted backup was inspected before deletion.

{% csrf_token %}
{% else %}

This deletes only reviewed incomplete snapshot directories and their tracking records. Successful manual and scheduled snapshots are not touched.

{% csrf_token %} {{ incomplete_cleanup_form.non_field_errors }}
{{ incomplete_cleanup_form.max_delete.errors }} {{ incomplete_cleanup_form.max_delete }}
{{ incomplete_cleanup_form.max_delete.help_text }}
{{ incomplete_cleanup_form.confirm_host.errors }} {{ incomplete_cleanup_form.confirm_host }}
{{ incomplete_cleanup_form.confirm_host.help_text }}
{{ incomplete_cleanup_form.confirm_delete_count.errors }} {{ incomplete_cleanup_form.confirm_delete_count }}
{{ incomplete_cleanup_form.confirm_delete_count.help_text }}
Cancel
{% endif %}
{% endif %} {% endblock %}