{% extends "base.html" %}
{% block title %}Backups{% endblock %}
{% block content %}
<div class="card p-4 mb-4"><h2>🛡️ Database Backups</h2><p>Automatic daily backup saves <b>orders.db</b> by date. Manual backup also available.</p><a href="{{ url_for('backups', create=1) }}" class="btn btn-success">Create Backup Now</a></div>
<div class="card p-4"><table class="table table-striped"><thead><tr><th>File</th><th>Size</th><th>Modified</th><th>Download</th></tr></thead><tbody>{% for b in backups %}<tr><td>{{ b.name }}</td><td>{{ (b.size/1024)|round(1) }} KB</td><td>{{ b.modified }}</td><td><a class="btn btn-sm btn-primary" href="{{ url_for('download_backup', filename=b.name) }}">Download</a></td></tr>{% else %}<tr><td colspan="4" class="text-center text-muted">No backups yet</td></tr>{% endfor %}</tbody></table></div>
{% endblock %}
