diff --git a/app/templates/admin/backup.html b/app/templates/admin/backup.html new file mode 100644 index 0000000..961e74d --- /dev/null +++ b/app/templates/admin/backup.html @@ -0,0 +1,395 @@ +{% extends "base.html" %} + +{% block title %}Backup & Restore - Admin{% endblock %} + +{% block content %} +
+
+

Backup & Restore

+

Everything needed to rebuild this library elsewhere: database rows, PDFs, images, covers, thumbnails and extra files.

+
+ + Back to Dashboard + +
+ + +
+
+
+
+
Uploaded files
+

{{ upload_file_count }}

+ {{ uploads_human }} +
+
+
+
+
+
+
Stored backups
+

{{ backups|length }}

+ {{ backup_total_human }} +
+
+
+
+
+
+
Missing files
+

{{ missing|length }}

+ referenced but not on disk +
+
+
+
+
+
+
Orphaned files
+

{{ orphaned|length }}

+ on disk, no record +
+
+
+
+ +
+
+
Database: {{ dialect }}{% if sqlite_path %} — {{ sqlite_path }}{% endif %}
+
Uploads folder: {{ uploads_root }}
+
Backup folder: {{ backup_folder }}{% if keep %} — keeping the newest {{ keep }}{% endif %}
+
+
+ +{% if missing %} +
+
{{ missing|length }} file(s) referenced in the database are missing from disk
+

These records will survive the migration but their file will be gone. Worth fixing before you cut over.

+
+ Show paths + +
+
+{% endif %} + + +
+
+
Create a backup
+
+
+
+
+ + +
Appended to the filename so you can find it later.
+
+
+ +
+
+ +
+
+
0%
+
+
Starting…
+
+ +
+
+
+ + +
+
+
Stored backups
+ + Refresh + +
+
+ {% if backups %} +
+ + + + + + + + + + + + {% for entry in backups %} + {% set m = entry.manifest or {} %} + + + + + + + + + {% endfor %} + +
ArchiveCreatedSizeContentsActions
+ {{ entry.filename }} + {% if not entry.valid %} + unknown format + {% endif %} + {% if m.created_by %}
by {{ m.created_by }}
{% endif %} +
{{ entry.modified.strftime('%Y-%m-%d %H:%M') }}{{ entry.size_human }} + {% if m.counts %} + {{ m.counts.sets }} sets · + {{ m.counts.instructions }} instructions · + {{ m.counts.extra_files }} extra +
+ {{ m.uploads.file_count }} files, {{ m.uploads.total_human }} +
+ {% else %} + — + {% endif %} +
+ + + + + {% if entry.valid %} + + {% endif %} +
+ +
+
+
+ {% else %} +
+ + No backups yet. +
+ {% endif %} +
+
+ + +
+
+
Moving to Docker
+
+
+
    +
  1. Create a backup here and download the .zip.
  2. +
  3. Copy it into the new instance's backup folder (or bind-mount it).
  4. +
  5. On the new instance run: +
    flask backup verify lim-backup-....zip
    +flask backup restore lim-backup-....zip --mode fresh
    +
  6. +
  7. Log in with your existing credentials — password hashes come across intact.
  8. +
+

+ Stored paths are rewritten to forward slashes during restore, so a Windows-made + backup lands correctly on Linux. See docs/BACKUP_AND_MIGRATION.md. +

+
+
+ +

Created by: Jess Rogerson (yelling commands at Claude.AI)

+ + + +{% endblock %} + +{% block extra_js %} + +{% endblock %}