DrPreflightCommand
extends Command
in package
Non-destructive disaster-recovery prerequisite report for operators.
Table of Contents
Methods
- defaultName() : string
- execute() : int
- buildOptionParser() : ConsoleOptionParser
- buildReport() : array<string, mixed>
- Build a diagnostics-safe DR preflight report.
- freshnessHours() : int
- Parse the positive backup freshness threshold.
- jobStatus() : array<string, mixed>
- platformBackupStatus() : array<string, mixed>
- printHumanReport() : void
- tenantBackupStatus() : array<string, mixed>
- validatedTenantSlug() : string
- Validate tenant slug before using it in lookup queries.
- wormAuditConfig() : array<string, mixed>
Methods
defaultName()
public
static defaultName() : string
Tags
Return values
stringexecute()
public
execute(Arguments $args, ConsoleIo $io) : int
Parameters
- $args : Arguments
- $io : ConsoleIo
Tags
Return values
intbuildOptionParser()
protected
buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
- $parser : ConsoleOptionParser
Tags
Return values
ConsoleOptionParserbuildReport()
Build a diagnostics-safe DR preflight report.
private
buildReport(int $freshnessHours, string|null $tenantSlug) : array<string, mixed>
Parameters
- $freshnessHours : int
-
Backup freshness threshold
- $tenantSlug : string|null
-
Optional tenant slug
Return values
array<string, mixed>freshnessHours()
Parse the positive backup freshness threshold.
private
freshnessHours(string $value) : int
Parameters
- $value : string
-
Raw option value
Return values
intjobStatus()
private
jobStatus(Connection $connection) : array<string, mixed>
Parameters
- $connection : Connection
Return values
array<string, mixed>platformBackupStatus()
private
platformBackupStatus(Connection $connection, string $cutoff) : array<string, mixed>
Parameters
- $connection : Connection
- $cutoff : string
Return values
array<string, mixed>printHumanReport()
private
printHumanReport(ConsoleIo $io, array<string, mixed> $report) : void
Parameters
- $io : ConsoleIo
- $report : array<string, mixed>
tenantBackupStatus()
private
tenantBackupStatus(Connection $connection, string $cutoff, string|null $tenantSlug) : array<string, mixed>
Parameters
- $connection : Connection
- $cutoff : string
- $tenantSlug : string|null
Return values
array<string, mixed>validatedTenantSlug()
Validate tenant slug before using it in lookup queries.
private
validatedTenantSlug(string $slug) : string
Parameters
- $slug : string
-
Tenant slug
Return values
stringwormAuditConfig()
private
wormAuditConfig() : array<string, mixed>