MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

BackupSets

MMO\admin\helpers · 1 symbole · générée le 30 Nov 2026

class

BackupSets

BackupSets.php:17

A site's backup sets: what one backup made of it at one time, every part named after the site and that time in its backups/ -- each database's dump ({site}-{Ymd-His}-{database}.mongo, ...sql.gz, ...-json.tar.gz: the repository's own name), its shared files ({site}-{Ymd-His}-files.tar.gz) and its configuration ({site}-{Ymd-His}-config.tar.gz). An encrypted copy (.age) is what leaves the server; the plain one stays, which a restore reads.

class MMO\admin\helpers\BackupSets
Espace de noms
MMO\admin\helpers
$sets = BackupSets::Of('alcon', ['alcon-20261112-170000-files.tar.gz', 'alcon-20261112-170000-oviepro.mongo']); $sets['20261112-170000']['parts']; // ['files' => 'alcon-...-files.tar.gz', 'databases' => ['alcon-...-oviepro.mongo']] BackupSets::Latest($sets, ['files'])['stamp']; // '20261112-170000'

Index

PARTSwhat a set is made of
STAMPa set's time in its parts' names
Latest($sets, $parts) static
Name($target, $at, $part) static
Of($target, $files) staticA site's sets, from the files of its backups/: the newest first.
Parts($parts) static
Stamp($at) static
Time($stamp) static

Constantes2

PARTS

what a set is made of

const PARTS = ['databases', 'files', 'config']

STAMP

a set's time in its parts' names

const STAMP = 'Ymd-His'

Méthodes6

Latest($sets, $parts)

staticBackupSets.php:64
static function Latest(array $sets, array $parts): ?array
$setsarrayOf
$partsarraywhat it must hold: databases, files, config
retournenull | arraythe newest set holding every part asked, null when none does

Name($target, $at, $part)

staticBackupSets.php:34
static function Name(string $target, int $at, string $part): string
$targetstring
$atint
$partstring
retournestringthe archive of a site's shared files (files) or configuration (config) of the set made at $at

Of($target, $files)

staticBackupSets.php:44

A site's sets, from the files of its backups/: the newest first.

static function Of(string $target, array $files): array
$targetstringthe site's name
$filesarrayfile names (no folder)
retournearrayarray{stamp: string, at: int, parts: array{databases?: list<string>, files?: string, config?: string}}> by stamp

Parts($parts)

staticBackupSets.php:76
static function Parts(array|string|null $parts): array
$partsarray | string | nulldatabases,files or a list; null or empty: all of them
retournearraythe parts asked, checked
lèvefor one that is none