Documentation

pm_Hook_Backup_Domain
in package
implements pm_Hook_Backup

Hook for backing up and restoring domains

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 domain
restore()  : mixed
Define logic on restore domain

Methods

backup()

Define the content to be stored

public backup(pm_Domain $domain) : array<string|int, mixed>
[
    string, // Serialized config related to this domain
    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
    array,  // Array of relative paths inside webspace root is marked as 'mine' content by the extension .
               These paths will be completely overwritten during restore.
               If the extension is absent on the server, this paths will not be restored.
]
Parameters
$domain : pm_Domain

The domain that is backuped

Return values
array<string|int, mixed>

postBackup()

Define the logic after backing up a domain

public postBackup(pm_Domain $domain) : mixed
Parameters
$domain : pm_Domain

The domain that is backuped

Return values
mixed

restore()

Define logic on restore domain

public restore(pm_Domain $domain, string $pleskVersion, string $extVersion, string $config, string $contentDir) : mixed
Parameters
$domain : pm_Domain

The domain 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 domain

$contentDir : string

Directory with content related to restoring domain

Return values
mixed

Search results