pubvana/backups

Backup and restore for Pubvana CMS (database + files)

Maintainers

Package info

github.com/Pubvana-CMS/backups

Homepage

Type:flightphp-plugin

pkg:composer/pubvana/backups

Statistics

Installs: 2

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.2 2026-05-16 03:14 UTC

This package is auto-updated.

Last update: 2026-05-16 03:15:32 UTC


README

Stable? Not Quite Yet License PHP Version Monthly Downloads Total Downloads GitHub Issues Contributors Latest Release Contributions Welcome

Pubvana Backups

I noticed folks downloading some of these packages. I'm super grateful, Thank You! I would like to let folks know until this notice disappears I'm doing a lot of breaking changes without worrying about them. Once versions are up around 0.5.x things should settle down.

Backup and restore module for Pubvana CMS.

Requirements

Installation

composer require pubvana/backups

Enable in app/config/config.php:

'plugins' => [
    'pubvana/backups' => [
        'enabled'  => true,
        'priority' => 50,
    ],
],

Features

  • Full-site zip backups (configurable directories + database dump)
  • Restore from any backup with automatic pre/post-rollback snapshots
  • Retention policy (configurable max backups, default 15)
  • Protected config files never overwritten during restore
  • Dual-mode database operations (mysqldump/mysql CLI with pure PHP fallback)
  • File-based progress reporting for admin UI polling
  • Background execution via runway CLI with synchronous fallback
  • Path traversal validation on zip extraction

Flight School config

This package uses Flight School's return-array config format. src/Config/Config.php returns the package defaults as an array, Flight School stores that array under pubvana.backups on $app.

Service

Mapped as $app->backups(). Provides:

  • Create - full-site zip (configurable dirs + database dump), with progress callback
  • Restore - backup current state, extract, restore files + DB, backup restored state
  • List/Delete/Download - manage stored backups
  • Retention - automatically removes oldest backups beyond the configured limit

Config

Key Default Description
backup_path PROJECT_ROOT . '/backups' Directory where backup zips are stored
max_backups 15 Maximum backups to keep
backup_dirs ['app', 'public', 'vendor', 'themes'] Directories included in the backup
protected_configs ['app/config/config.php', 'app/config/config_sample.php'] Files never overwritten during restore

CLI Commands

php runway backups:create
php runway backups:create --trigger pre-update --user admin
php runway backups:restore 2026-05-15_221300-full.zip
php runway backups:restore 2026-05-15_221300-full.zip --user admin

License

MIT