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

Storage destinations

A destination is an ordinary Laravel filesystem disk. Because the package writes through Laravel's filesystem, any disk driver works with no package-specific code: Local, S3-compatible object storage, FTP, SFTP, Azure Blob, Backblaze B2, WebDAV, and anything else with a Flysystem adapter.

Selecting destinations

1'profiles' => [
2 'nightly' => [
3 'destinations' => ['s3', 'local'], // written to BOTH
4 'path' => 'backups', // sub-directory on each disk
5 ],
6],

A backup is streamed to every listed disk. The archive is uploaded with a stream, so large backups do not need to fit in memory.

Example disks

Define these in config/filesystems.php as usual, then reference them by name.

S3 / S3-compatible (MinIO, DigitalOcean Spaces, …)

1's3' => [
2 'driver' => 's3',
3 'key' => env('AWS_ACCESS_KEY_ID'),
4 'secret' => env('AWS_SECRET_ACCESS_KEY'),
5 'region' => env('AWS_DEFAULT_REGION'),
6 'bucket' => env('AWS_BUCKET'),
7 'endpoint' => env('AWS_ENDPOINT'), // for S3-compatible providers
8],

Requires composer require league/flysystem-aws-s3-v3.

SFTP

1'sftp' => [
2 'driver' => 'sftp',
3 'host' => env('SFTP_HOST'),
4 'username' => env('SFTP_USERNAME'),
5 'privateKey' => env('SFTP_PRIVATE_KEY'),
6 'root' => '/backups',
7],

Requires composer require league/flysystem-sftp-v3.

Backblaze B2 / WebDAV / Azure Blob

Install the matching Flysystem adapter and register the disk in config/filesystems.php. No changes are needed in Backup Manager — it just uses the disk name.

What is stored

For each backup, two objects are written under path:

1backups/nightly-2026-07-16-020000.tar.gz.enc ← the archive
2backups/nightly-2026-07-16-020000.manifest.json ← the manifest sidecar

The manifest is stored unencrypted next to the archive so you can inspect it and verify the archive checksum without downloading or decrypting the archive. It never contains secrets — only which algorithms were used.

Listing and deleting

php artisan backup:list reads the sidecars to list what's stored, and php artisan backup:clean deletes archives (and their sidecars) per the retention policy. Both operate through the BackupRepository contract, so they work identically on every disk.