feat: discover snapshots into Django records
Add a Django-native snapshot discovery service and management command that scans backup directories, reads snapshot metadata, and idempotently upserts SnapshotRecord rows. Expose it through the pobsync command wrapper, update admin/docs, and cover discovery behavior with tests.
This commit is contained in:
@@ -57,9 +57,10 @@ class BackupRunAdmin(admin.ModelAdmin):
|
||||
|
||||
@admin.register(SnapshotRecord)
|
||||
class SnapshotRecordAdmin(admin.ModelAdmin):
|
||||
list_display = ("host", "kind", "dirname", "status", "started_at")
|
||||
list_filter = ("kind", "status", "started_at")
|
||||
list_display = ("host", "kind", "dirname", "status", "started_at", "discovered_at")
|
||||
list_filter = ("kind", "status", "started_at", "discovered_at")
|
||||
search_fields = ("host__host", "dirname", "path")
|
||||
readonly_fields = ("discovered_at",)
|
||||
|
||||
|
||||
@admin.register(ScheduleConfig)
|
||||
|
||||
Reference in New Issue
Block a user