backup_revision

Model for resource revision backup metadata, including revision list/title retrieval and revision retention settings.

Revision reads require admin access and edit permission on the live resource or its deleted ACL snapshot. Restoration additionally checks insert permission in the selected category and content group. Missing category/content-group references require explicit choices; local followups are suggestions only. Missing creator/modifier references are followed to a live resource or cleared.

restore_options also reports media.original and media.preview as none, local, remote, missing, or unknown. This advisory pre-flight check uses the same medium-version selection as restore, only for the explicitly selected resource. It reads local files and remote registry metadata without downloading or contacting storage servers. Remote registration is not a guarantee of delivery; files may also change between confirmation and restore. Warnings do not block restoration or change how dependent resources are restored.

Revisions store URI aliases as backup_uri_aliases metadata, separate from resource properties. Deletion revisions are saved before aliases are cascade-deleted. Recovery and rollback add the archived aliases without removing current aliases or taking aliases assigned to another resource. Older revisions without alias metadata leave the current aliases unchanged.

The deleted overview queries only rsc_gone, never serialized revision bodies. Its ACL migration runs in resumable keyset batches; unmigrated entries remain hidden until their metadata is available.

Available Model API Paths

MethodPath patternDescription
get/can_view/+id/...Whether the caller may read this resource’s revisions.
get/restore_options/+revision_id/...Authorized historical reference labels, followup suggestions, and a read-only media recovery pre-flight check.
get/list/+id/...Return revision history entries for resource +id as associative rows, newest-first where applicable.
get/title/+id/...Return title for +id: current resource title when it exists, otherwise archived revision title (saved resource update permission).
get/retention_months/...Return mod_backup.revision_retention_months (months to keep revision backups).
get/user_retention_days/...Return retention period in days for backups tied to active user resources (backup_config:user_retention_days/1).
get/deleted_user_retention_days/...Return retention period in days for backups tied to deleted user resources (backup_config:deleted_user_retention_days/1).

/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.

Edit on GitHub