mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-02 13:15:17 +09:00
Folds the legacy BackupService database/files capabilities into the unified BackupPolicyService so one policy/run system performs every backup kind. - _resolve_target() now handles database (connection descriptor from target_meta + target_subtype engine), files (path list), and rejects server (not yet implemented) with a clear message. - _execute_backup() routes database → BackupService.backup_database and files → BackupService.backup_files, building consistent run metadata (kind=full, includes, primary_archive). - Restore: _restore_database (symmetric with restore_database) and _restore_files (safe extract into a restores/ staging dir, never blind overwrite of a basename-only path-list archive); run_restore_job dispatches by target_type. Note: remote-copy upload still applies to dir-based runs (app/WP); single-file database/files runs are local-only for now (documented follow-up). Verified: 8 new executor tests (BackupService mocked) + B1 + existing backup-protection suite pass (26 passed, 2 skipped). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>