⭐ Found this useful? Install from Packagist · Give it a star on GitHub so more developers can find it.
Site Backup Bundle — Create an integral website backup (selected paths + optional DB dump + SHA-256 MANIFEST.json), restore it safely behind a loading page UI, and finish cold bootstrap with a setup wizard (DB, migrations, admin, sample data). Tested on Symfony 7.4, 8.0, and 8.1 · PHP 8.2+ (Symfony 8.x requires PHP 8.4+).
This bundle is FrankenPHP worker mode friendly.
- Integral backup — Configurable include paths, exclude patterns, optional
database_dump_command,.tar.gz+ sidecar metadata. - Integrity — Per-file SHA-256 in
MANIFEST.jsonplus archive SHA-256;verifybefore restore. - Safe restore — Validate → extract to staging → apply with protected paths → progress JSON;
var/site-backup/never overwritten mid-restore. - Loading page — While restore is active,
kernel.requestreturns HTTP 503 with a progress UI (polls/_site_backup/progress.json); panel stays reachable. - Setup wizard — Cold start / post-restore: bootstrap mode (guided vs full SQL), DB, migrations/schema, YAML tabs + checkers,
advance_mode, idempotent loaders, super-admin, optional sample data; durable progress (filesystem/doctrine/chain) — see docs/SETUP-WIZARD.md. - Admin panel — Create / verify / restore / delete under
/_site_backup(password gate + CSRF). - CLI —
create,list,verify,restore,setup,setup-status,setup-reset,hash-password.
composer require nowo-tech/site-backup-bundleWith Symfony Flex, the recipe registers the bundle and config. Without Flex, see docs/INSTALLATION.md.
# config/routes.yaml
nowo_site_backup:
resource: '@NowoSiteBackupBundle/Resources/config/routes.yaml'- PHP
>=8.2(<8.6); Symfony 8.0 and 8.1 require PHP 8.4+ - Symfony 7.4, 8.0, or 8.1 (minimum supported minors; also works on Symfony 7.0–7.3 via
composer.jsonconstraints) taravailable on the host/container for archive create/extract- Twig for the restore page, panel, and setup wizard templates
nowo_site_backup:
enabled: true
backup:
include_paths: [config, public, templates, src, composer.json, composer.lock]
database_dump_command: '%env(default::SITE_BACKUP_DUMP_CMD)%'
panel:
path_prefix: '/_site_backup'
security:
password_protection: true
password_hash: '%env(SITE_BACKUP_PASSWORD_HASH)%'
setup:
admin_provisioner: App\Setup\AdminUserProvisionerphp bin/console nowo:site-backup:create -l "pre-deploy"
php bin/console nowo:site-backup:verify <id>
php bin/console nowo:site-backup:restore <id> -yOpen /_site_backup to manage backups from the UI. During restore, visitors see the loading page; the panel and progress endpoint keep working. For cold DB / post-restore, open /_setup (see docs/SETUP-WIZARD.md).
See docs/USAGE.md.
| Demo | Symfony | PHP | Default port |
|---|---|---|---|
demo/symfony8 |
8.1 | 8.5 | 8056 |
Runs FrankenPHP + Caddy (FRANKENPHP_MODE=worker by default). See docs/DEMO-FRANKENPHP.md.
make -C demo help
make -C demo up-symfony8make up
make install
make test
make cs-check
make phpstan
make release-check- Installation
- Configuration
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
- Tests: PHPUnit (PHP)
- PHP: 99.1% Lines (gate ≥ 99% via
make coverage-check) - Residual OS/defensive branches: see docs/COVERAGE.md
MIT · Nowo.tech
