TenantSelfServiceBackupService
in package
Tenant-facing view of the platform-managed backup system.
Tenant admins can list their managed backups, see the effective global backup policy, request an on-demand backup, and fetch backup rows for download — but scheduling, retention, and restore remain platform-owned.
Table of Contents
Constants
- MIN_INTERVAL_MINUTES : mixed = 60
- Minimum minutes between tenant-initiated backups.
Properties
- $enqueuer : PlatformAdminJobEnqueuer|null
- $platformConnection : Connection
Methods
- __construct() : mixed
- Constructor.
- claimRecoveryKeyExport() : bool
- Claim the one-time recovery-key export for a backup.
- getBackupForDownload() : array<string, mixed>
- Fetch a backup row for download, asserting tenant ownership.
- listManagedBackups() : array<int, array<string, mixed>>
- requestBackup() : array<string, mixed>
- Queue an on-demand managed backup for the tenant.
- status() : array<string, mixed>
- Read-only backup status for the tenant: latest backup + effective policy.
- tenantRow() : array<string, mixed>
- The tenant's platform registry row (needed for recovery-key export).
Constants
MIN_INTERVAL_MINUTES
Minimum minutes between tenant-initiated backups.
public
mixed
MIN_INTERVAL_MINUTES
= 60
Properties
$enqueuer read-only
private
PlatformAdminJobEnqueuer|null
$enqueuer
= null
$platformConnection read-only
private
Connection
$platformConnection
Methods
__construct()
Constructor.
public
__construct(Connection $platformConnection[, PlatformAdminJobEnqueuer|null $enqueuer = null ]) : mixed
Parameters
- $platformConnection : Connection
- $enqueuer : PlatformAdminJobEnqueuer|null = null
claimRecoveryKeyExport()
Claim the one-time recovery-key export for a backup.
public
claimRecoveryKeyExport(string $backupId, string $exportedBy) : bool
Returns false when the key was already exported (the claim is atomic, so concurrent requests cannot both succeed).
Parameters
- $backupId : string
- $exportedBy : string
Return values
boolgetBackupForDownload()
Fetch a backup row for download, asserting tenant ownership.
public
getBackupForDownload(string $tenantId, string $backupId) : array<string, mixed>
Parameters
- $tenantId : string
- $backupId : string
Return values
array<string, mixed>listManagedBackups()
public
listManagedBackups(string $tenantId[, int $limit = 25 ]) : array<int, array<string, mixed>>
Parameters
- $tenantId : string
- $limit : int = 25
Return values
array<int, array<string, mixed>>requestBackup()
Queue an on-demand managed backup for the tenant.
public
requestBackup(string $tenantId, string $slug, string|null $actorMemberId) : array<string, mixed>
Parameters
- $tenantId : string
- $slug : string
- $actorMemberId : string|null
Return values
array<string, mixed> —The queued platform_jobs row
status()
Read-only backup status for the tenant: latest backup + effective policy.
public
status(string $tenantId) : array<string, mixed>
Parameters
- $tenantId : string
Return values
array<string, mixed>tenantRow()
The tenant's platform registry row (needed for recovery-key export).
public
tenantRow(string $tenantId) : array<string, mixed>
Parameters
- $tenantId : string