Documentation

pm_Hook_Backup_Client
in package
implements pm_Hook_Backup

Hook for backing up and restoring clients

Tags
since
17.0

Interfaces, Classes and Traits

pm_Hook_Backup
Interface for backup and restore hooks

Table of Contents

backup()  : array<string|int, mixed>
Define the content to be stored
postBackup()  : mixed
Define the logic after backing up a client
restore()  : mixed
Define the logic on restoring a client

Methods

backup()

Define the content to be stored

public backup(pm_Client $client) : array<string|int, mixed>
[
    string, // Serialized config related to this client
    array,  // Array of relative paths inside extension's 'var' directory that will be include in backup
    array,  // Array of relative paths inside extension's 'var' directory that will be exclude from backup
]
Parameters
$client : pm_Client

The client that is backuped

Return values
array<string|int, mixed>

postBackup()

Define the logic after backing up a client

public postBackup(pm_Client $client) : mixed
Parameters
$client : pm_Client

The client that is backuped

Return values
mixed

restore()

Define the logic on restoring a client

public restore(pm_Client $client, string $pleskVersion, string $extVersion, string $config, string $contentDir) : mixed
Parameters
$client : pm_Client

The client that is restored

$pleskVersion : string

Version of Plesk when backup was created

$extVersion : string

Version of extension when backup was created

$config : string

Stored config related to restoring client

$contentDir : string

Directory with content related to restoring client

Return values
mixed

Search results