KMP PHP API Reference

BackupCommand extends Command
in package

CLI backup management: create and restore passphrase-encrypted .kmpbackup files.

Dev/seed tooling, not production scheduling: production tenant backups are platform-managed (tenant-backup-fleet schedule + tenant backup command). This command is retained for the Azure nightly-seed flow (docker/reset-and-seed.sh, deploy/azure/seed/bake-seed.sh) and ad-hoc single-database work.

Usage: BACKUP_ENCRYPTION_KEY="my-secret-key" bin/cake backup create BACKUP_ENCRYPTION_KEY="my-secret-key" bin/cake backup restore kmp-backup-20260220-120000.kmpbackup

Table of Contents

Methods

defaultName()  : string
Get the default command name.
execute()  : int|null
Execute the command.
buildOptionParser()  : ConsoleOptionParser
Configure the command option parser.
doCreate()  : int
Do create.
doRestore()  : int
Do restore.
formatBytes()  : string
Format bytes.

Methods

defaultName()

Get the default command name.

public static defaultName() : string
Return values
string

execute()

Execute the command.

public execute(Arguments $args, ConsoleIo $io) : int|null
Parameters
$args : Arguments
$io : ConsoleIo
Return values
int|null

buildOptionParser()

Configure the command option parser.

protected buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
$parser : ConsoleOptionParser
Return values
ConsoleOptionParser

doCreate()

Do create.

private doCreate(string $key, ConsoleIo $io) : int
Parameters
$key : string
$io : ConsoleIo
Return values
int

doRestore()

Do restore.

private doRestore(string $key, Arguments $args, ConsoleIo $io) : int
Parameters
$key : string
$args : Arguments
$io : ConsoleIo
Return values
int

formatBytes()

Format bytes.

private formatBytes(int $bytes) : string
Parameters
$bytes : int
Return values
string
On this page

Search results