{% extends "base.html" %} {% block title %}Backups - SQLite DBaaS{% endblock %} {% block content %}
cloud_sync
HuggingFace Setup
Remote backup configuration
{% for check in hf_diagnosis.checks %}
{% if '✅' in check.status %}check{% elif '❌' in check.status %}close{% else %}info{% endif %}
{{ check.name }}
{{ check.value }}
{% endfor %}
add_circle
Create Backup
Local snapshot or remote upload
folder
Local Snapshots
{{ backups.snapshot_dir }}
{% if backups.local_snapshots %}
{% for snapshot in backups.local_snapshots %} {% endfor %}
Filename Size Modified Actions
{{ snapshot.name }} {{ snapshot.size_mb }} MB {{ snapshot.modified }} download
{% else %}
folder_off
No snapshots yet
Create your first snapshot above
{% endif %}
layers
3-Layer Backup Strategy
1

Litestream — Real-time

Automatic replication every second. Max 1s data loss. Local file replica.

2

Python Backup — On-demand

Atomic snapshots using sqlite3.backup(). Gzip compressed. Consistent while DB is in use.

3

HF Bucket — Persistent

Remote storage on HuggingFace. 100GB free. Survives container restarts.

api
API Endpoints
For programmatic access
GET /admin/api/diagnostics - Check HF setup POST /admin/api/backup/test - Test backup creation POST /admin/api/backup/upload - Upload to HF Bucket
{% endblock %}