1 Commits
Author SHA1 Message Date
Juan DenisandClaude Opus 4.8 45e83e9a09 refactor(unify): §8 Phase B5 — generic backup-policy CRUD for every target
Completes the §8 API consolidation: one admin surface drives a BackupPolicy for
ANY target — application, wordpress_site, database, files, server — by
(target_type, target_id):

  GET/PUT  /api/v1/backups/policies/<type>/<id>          (PUT accepts
           target_subtype + target_meta to describe database/files targets)
  POST     /api/v1/backups/policies/<type>/<id>/run
  GET      /api/v1/backups/policies/<type>/<id>/runs
  POST     .../runs/<run_id>/restore  |  /verify
  DELETE   .../runs/<run_id>

This is the only way to drive the database/files/server targets (which have no
per-resource page). The grant-aware per-resource mounts
(/apps/:id/backup-policy, /wordpress/sites/:id/backup-policy) are unchanged.

Deferred to §7 (WordPress-as-app): surfacing WP DatabaseSnapshot under
/apps/:id/db-snapshots, and the frontend Backups.jsx rewrite, both of which
depend on the app↔site unification.

Verified: 5 new tests; full backup/snapshot suite green (63 passed, 2 skipped).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 14:27:08 -04:00