Skip to content

Installation

phil/backup

Requirements

RequirementWhy
PHP 8.5 or laterReadonly classes, typed constants, new without parentheses
ext-sodiumThe secret stream that encrypts backups, and the constant-time base64 of keys

The client tools of the database must be installed where the backups run:

PlatformBackupRestoreSystem package, for example
SQLitesqlite3sqlite3sqlite3
MySQLmysqldumpmysqlmysql-client
MariaDBmariadb-dump, or mysqldumpmariadb, or mysqlmariadb-client
PostgreSQLpg_dumppg_restorepostgresql-client, of the server's major version or later

Installing

composer require phil/backup

It is a library, not a bundle: there is nothing to register. phil/backup-bundle builds every object below from a Symfony configuration; elsewhere, build a Backups once with its client, directory, cipher, media and rotation, and a CommandRunner that runs processes — see extension-points.md.