badpixxel/paddock-backups

Paddock - Backups Extension

Maintainers

Package info

gitlab.com/paddock-project/paddock-backups

Type:bundle

pkg:composer/badpixxel/paddock-backups

Transparency log

Statistics

Installs: 67

Dependents: 1

Suggesters: 0

Stars: 0

4.0.0 2026-07-20 16:55 UTC

This package is auto-updated.

Last update: 2026-07-20 14:58:10 UTC


README

Paddock extension for data backups management: define backup operations (source → locations) in YAML, execute & restore them from the console, and monitor their status with a Paddock track.

Requirements

  • PHP 8.1+ with ext-zip
  • badpixxel/paddock-core & badpixxel/paddock-system ^5.0 (Symfony 5.4 → 8.x)
  • rdiff-backup binary for incremental rdiff locations (optional)
VersionPHPPaddock CoreStatus
5.x^8.1^5.0Active
4.x^7.44.xMaintenance

Installation

composer require badpixxel/paddock-backups

Configuration

Backup locations (destinations) are defined by the PADDOCK_BACKUP environment variable, as ;-separated DSNs:

# One Zip Location & one Plain Files Location
PADDOCK_BACKUP="zip://localhost/var/backups;file://localhost/mnt/nas/backups"
SchemeLocation Type
file://Plain files copy (mirror)
zip://Zip archive
rdiff://Incremental rdiff-backup

Backup operations (sources) are defined in your Paddock configuration:

backups:

    my-website:
        description:    "Website Files Backup"
        source:         "file://localhost/var/www/my-website"

tracks:

    backups-status:
        collector:      "backup-status"
        description:    "Check Backups Status"
        rules:
            my-website:     { ne: true, eq: "Ok" }

Console Commands

CommandDescription
paddock:backupExecute backup operations
paddock:restoreRestore a backup
paddock:backup:statusDisplay status of all backup operations
paddock:backup:sourcesList available backup sources types
paddock:backup:locationsList available backup locations types
# Execute a single operation, without interaction
php bin/paddock paddock:backup --operation=my-website -n

The backup-status collector exposes each operation status (Ok / errors) so your monitoring (i.e NRPE) gets alerted when backups fail.

Development & Tests

All checks run identically in CI and locally: the GitLab pipeline executes the exact same commands as the docker containers (one per Symfony version, 5.4 → 8.x). The integration test executes a complete local backup operation (files source → zip location) through the real console commands:

# Start all containers & run everything (composer, quality, tests)
make verify

# Run PhpUnit tests in all containers
make test

# Quality suites (GrumPHP: lint, code style, PhpStan)
php vendor/bin/grumphp run --testsuite=travis
php vendor/bin/grumphp run --testsuite=csfixer
php vendor/bin/grumphp run --testsuite=phpstan

# PhpUnit testsuites
vendor/bin/phpunit --testsuite=integration

License

Paddock is released under the MIT License.