Getting started
This tutorial takes you from nothing to a real, verified backup that you can restore — in about ten minutes. Follow it top to bottom; each step is a command you run and the output you should see.
By the end you'll have created a backup, inspected it, confirmed its integrity, restored it, and know how to make it production-ready.
What you'll do
- Install the package into a Laravel app.
- Create your first backup.
- See what was stored.
- Verify the backup can be trusted.
- Restore it — safely.
- Make it production-ready: encrypt it, send it off-site, and run it on a schedule.
Before you start
You need an existing Laravel 12 or 13 application and PHP 8.3+. If you
back up a database, its command-line tools (for example mysqldump for MySQL)
must be installed. The full list is on the Installation
page — but for a first run against SQLite or files only, you need nothing extra.
1. Install the package
From your application's root, require the package and publish its config:
composer require nyoncode/laravel-backup-managerphp artisan vendor:publish --tag="backup-manager-config"That's it — Laravel registers the package automatically, and you now have a
config/backup-manager.php file. The defaults back up your whole application
(database + files) to local storage, which is perfect for this tutorial.
2. Create your first backup
Run the default backup:
php artisan backup:runYou'll see a summary of what was captured:
INFO Running backup for profile [default]…. Archive ............ default-2026-07-19-020000-a1b2c3.tar.gzMode ............... ArchiveSize ............... 4.72 MBDatabases .......... 1Files .............. 128Destinations ....... local INFO Backup completed successfully.You just created your first backup. It lives on the local disk under the
backups/ folder.
3. See what was stored
List the backups the package knows about:
php artisan backup:listEach backup is two files: the archive itself (a compressed .tar you can
optionally encrypt) and a *.manifest.json next to it. The manifest is a plain,
unencrypted record of what's inside — the environment, the checksum of the
archive, and a hash of every file — so a backup can be checked and trusted on its
own, even without this package.
4. Check it can be trusted
A backup is only worth having if it isn't corrupted. Verify the newest one against its manifest:
php artisan backup:verify INFO Verifying backup [default-2026-07-19-020000-a1b2c3]…. Archive checksum ... OKFiles ............. 128/128 verified INFO Backup is valid.5. Restore it
Restoring puts the backup's contents back. Try it:
php artisan backup:restoreThe command asks you to confirm, then verifies the archive before touching anything. By default it also takes a pre-restore snapshot and rolls everything back automatically if the restore fails — so a bad restore never leaves you worse off than before. You can restore just the database or just files; see Restore for the options.
Try restores on staging first. Restoring overwrites current data with the backup's data — that's the whole point, so run it where you mean it.
6. Make it production-ready
A local, unencrypted backup is a great start. Three changes turn it into something you'd trust in production:
- Encrypt it. Set an algorithm and a key so the archive is unreadable at rest. See Security & the manifest.
- Send it off-site. A backup on the same server as your app disappears with
the server. Add an S3 (or FTP/SFTP/…) disk to the profile's
destinationsand write to both at once. See Storage destinations. - Run it automatically. Turn on the built-in schedule so backups, cleanup and health checks happen without you. See Scheduling & monitoring.
For example, in config/backup-manager.php:
'profiles' => [ 'default' => [ // … 'destinations' => ['s3', 'local'], // off-site + a local copy ],],'encryption' => [ 'algorithm' => 'aes-256-gcm', 'key' => env('BACKUP_ENCRYPTION_KEY'), // 32 bytes, base64: accepted],'schedule' => ['enabled' => true],Where to go next
- Configuration — every option, explained section by section.
- Databases and Files — choose exactly what to capture.
- Retention — keep history under control so backups don't fill the disk.
- Pro & the UI dashboard — incremental backups, monitoring and a live web dashboard.