{% extends 'base.html' %} {% block title %}Maintenance{% endblock %} {% block content %}

Database Maintenance

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %} {% endwith %}

Perform common database maintenance tasks here.


Database Statistics

{% if table_stats %} {% for table, row_count in table_stats.items() %}
{{ table }}

Number of rows: {{ row_count }}

{% endfor %} {% else %}

Could not retrieve database statistics.

{% endif %}

Clear Authentication Logs

Permanently remove all authentication logs from the database. This action cannot be undone.


Database Backup

Create a backup of the current database. The backup will be saved as a SQL file.

Warning: Database backups can be very large if you do not clear the authentication logs first.


Database Restore

Restore the database from a previously created SQL backup file. This will overwrite the current database.

{% endblock %}