FC-3h + FC-3k: backup first-class + admin destructive actions #10
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cuts together two roadmap stages built up on dev since v26.05.24.3 (FC-3i).
FC-3h — Backup as first-class service
Promotes backup out of the migration tooling into a permanent FC feature, split into independent DB and image backup components.
Backend:
BackupRunmodel + alembic 0017 (composite + partial-tag indexes)backup_*knobs onimport_settings+ alembic 0018 (nightly-enabled, hour, keep-N per kind)backend/app/services/backup_service.py— pg_dump (DB) + tar+zstd (images) + restore + unlinkmaintenancequeue:backup_db_task,backup_images_task,restore_db_task,restore_images_task,prune_backups,backup_db_nightly(all with autoretry + soft/hard time limits)/api/system/backup/*blueprint (9 endpoints) with typed-token confirmation for restore + deletebackup+rollbackfrommigrate.py_VALID_KINDS; deletedservices/migrators/backup.py+rollback.pyFrontend:
useBackupStoreBackupConfirmModal.vuetyped-token modalBackupCard.vue+BackupRunsTable.vue(combined card, DB + Images sub-sections)MaintenancePanel.vueabove LegacyMigrationCardFC-3k — Admin destructive actions
Five first-class admin actions, surviving FC-3j: delete-artist-cascade, prune-unused-tags, delete-single-tag, merge-tag, bulk-delete-images.
Backend:
cleanup_service.py— projections + mutations + file-unlink primitive (lifted frommigrators/cleanup.py)maintenancequeue:delete_artist_cascade_task(30/40 min limits),bulk_delete_images_task(15/20 min)/api/admin/*with graduated confirmation friction (Tier A single-click after preview / Tier B yes/no with count / Tier C typed-token)TagService.merge()as-is for tag-merge endpointFrontend:
BackupConfirmModalrenamed/relocated tomodal/DestructiveConfirmModal.vue(addedtier+projectedCountsprops; BackupCard wire-compatible)useAdminStorewithpollTaskUntilDonetailing FC-3i's activity dashboardArtistDangerZone.vueslotted at bottom ofArtistViewBulkEditorPanel.vue"Delete selected" with browser-side sha8 sha256 token matching serverTagCard.vuedots-menu with Merge picker + Tier-B delete modalTagMaintenanceCard.vue(prune-unused preview-then-commit) slotted intoMaintenancePanelTest coverage
test_backup_service.py,test_tasks_backup.py,test_api_system_backup.pytest_cleanup_service.py,test_tasks_admin.py,test_api_admin.pyInheritance
Both stages inherit FC-3i's
task_runlifecycle (recovery sweep, daily prune, soft/hard time limits, duration tracking) for the long-running Celery tasks. No new lifecycle plumbing required.What's not in this PR
🤖 Generated with Claude Code