nyoncode/laravel-backup-manager

nyoncode/laravel-backup-manager

Powerful and extensible backup manager for Laravel applications: databases, files, encryption, integrity manifests and multi-destination storage.

0
Packagist stažení
0
Verzí
1.1.1
Aktuální verze
Závislosti
php ^8.3 ext-json * ext-openssl * illuminate/bus ^12.0|^13.0 illuminate/console ^12.0|^13.0 illuminate/contracts ^12.0|^13.0 illuminate/database ^12.0|^13.0 illuminate/filesystem ^12.0|^13.0 illuminate/queue ^12.0|^13.0 illuminate/support ^12.0|^13.0 nyoncode/laravel-package-toolkit ^2.1.1 symfony/finder ^7.0 symfony/process ^7.0

Installation

Backup Manager installs like any other Laravel package: require it with Composer, publish the config file, and you can run your first backup right away. This page walks you through the requirements and those first steps.

Requirements

Before you start, check that your environment covers the essentials:

Requirement Version
PHP 8.3+
Laravel 12.x / 13.x
Extensions ext-openssl, ext-json (bundled)
Optional ext-bz2 (bzip2), zstd binary (zstd compression)

Database backups run the database vendor's own command-line tools, so you only need the ones for the databases you actually use:

Driver Binary needed
MySQL / MariaDB mysqldump, mysql (restore)
PostgreSQL pg_dump, psql (restore)
SQLite none (file copy)

Install

1composer require nyoncode/laravel-backup-manager

Laravel auto-discovers the service provider, so there's nothing to register by hand. Next, publish the configuration file so you can adjust it to your needs:

1php artisan vendor:publish --tag="backup-manager-config"

This creates config/backup-manager.php — the single file where every option lives.

Operation history (optional)

Backup Manager can record every run in your database, which is handy for auditing or for a dashboard later. This step is optional; to enable it, publish and run the migration:

1php artisan vendor:publish --tag="backup-manager-migrations"
2php artisan migrate

This creates a backup_history table. If you skip this, operations are still recorded in the log; set monitoring.store_history to false to disable database history explicitly.

Verify

Confirm everything is wired up by creating a backup and then listing what was stored:

1php artisan backup:run
2php artisan backup:list

If mysqldump/pg_dump are not on your PATH, set explicit paths under the binaries config key — see Configuration.

Environment variables

Prefer not to edit the config file directly? Most settings can be driven straight from your .env. These are the ones you'll reach for most often:

1BACKUP_PROFILE=default
2BACKUP_COMPRESSION=gzip
3BACKUP_ENCRYPTION=none # aes-256-cbc | aes-256-gcm
4BACKUP_ENCRYPTION_KEY= # base64:... (32 bytes) when encryption is on
5BACKUP_RETENTION=gfs # gfs | simple
6BACKUP_SCHEDULE=false
7BACKUP_QUEUE=false

See Configuration for the full list.