JsonTenantBackupRestorer
in package
implements
TenantBackupRestorerInterface
FinalYes
Validates and restores KMP JSON logical archives inside a tenant scope.
Table of Contents
Interfaces
Properties
- $backupServiceFactory : callable(): BackupService
- $migrationRunner : callable(): void
- $tenantConnections : TenantConnectionManager
Methods
- __construct() : mixed
- restore() : array<string, mixed>
- Restore a decrypted tenant backup into the target tenant database.
- validate() : void
- Validate a decrypted tenant backup and its target without mutating data.
- backupService() : BackupService
- readArchive() : string
Properties
$backupServiceFactory
private
callable(): BackupService
$backupServiceFactory
$migrationRunner
private
callable(): void
$migrationRunner
$tenantConnections read-only
private
TenantConnectionManager
$tenantConnections
Methods
__construct()
public
__construct(TenantConnectionManager $tenantConnections, callable $migrationRunner[, callable|null $backupServiceFactory = null ]) : mixed
Parameters
- $tenantConnections : TenantConnectionManager
- $migrationRunner : callable
- $backupServiceFactory : callable|null = null
restore()
Restore a decrypted tenant backup into the target tenant database.
public
restore(TenantMetadata $targetTenant, SensitiveString $databasePassword, string $backupPath[, callable|null $progressReporter = null ]) : array<string, mixed>
Parameters
- $targetTenant : TenantMetadata
- $databasePassword : SensitiveString
- $backupPath : string
- $progressReporter : callable|null = null
Return values
array<string, mixed> —Restore statistics
validate()
Validate a decrypted tenant backup and its target without mutating data.
public
validate(TenantMetadata $targetTenant, string $backupPath) : void
Parameters
- $targetTenant : TenantMetadata
- $backupPath : string
backupService()
private
backupService() : BackupService
Return values
BackupServicereadArchive()
private
readArchive(string $backupPath) : string
Parameters
- $backupPath : string