Configuration
Every option lives in config/backup-manager.php. This page walks through it
section by section. The defaults are sensible, so you can leave most of the file
untouched and change only what you need.
Profiles
A profile is a self-contained backup definition — what to back up and
where to send it. You can define as many as you like; the default key decides
which one runs when you don't name one explicitly.
1'default' => env('BACKUP_PROFILE', 'default'), 2 3'profiles' => [ 4 'default' => [ 5 'name' => env('APP_NAME', 'Laravel'), 6 'type' => 'full', // full | database | files 7 'databases' => [ 8 'connections' => [], // [] = the default connection 9 'exclude_tables' => [],10 'schema_only_tables' => [],11 ],12 'files' => [13 'include' => [base_path()],14 'exclude' => [base_path('vendor'), base_path('node_modules'), base_path('.git')],15 'follow_symlinks' => false,16 'include_hidden' => true,17 ],18 'destinations' => ['local'], // Laravel disk names19 'path' => 'backups', // sub-directory on each disk20 'retention' => null, // null = use shared retention21 ],22],
Add as many profiles as you need, for example a small frequent database backup and a full nightly one:
1'profiles' => [2 'database' => ['type' => 'database', 'destinations' => ['s3']],3 'nightly' => ['type' => 'full', 'destinations' => ['s3', 'local']],4],
Run a specific profile with php artisan backup:run --profile=nightly.
Compression
1'compression' => [2 'algorithm' => env('BACKUP_COMPRESSION', 'gzip'), // none | gzip | bzip2 | zstd3 'level' => (int) env('BACKUP_COMPRESSION_LEVEL', 6),4],
gzip and bzip2 are pure-PHP and always available. zstd requires the zstd
binary. See Files.
Encryption
1'encryption' => [2 'algorithm' => env('BACKUP_ENCRYPTION', 'none'), // none | aes-256-cbc | aes-256-gcm3 'key' => env('BACKUP_ENCRYPTION_KEY'), // 32 bytes, base64: accepted4],
See Security for details and trade-offs.
Integrity
Each backup is checksummed so you can later prove it wasn't corrupted; it can optionally be signed as well (signing is a Pro feature):
1'integrity' => [2 'checksum' => env('BACKUP_CHECKSUM', 'sha256'), // sha256 | sha5123 'signing' => [4 'enabled' => (bool) env('BACKUP_SIGNING', false),5 'key' => env('BACKUP_SIGNING_KEY'), // defaults to the encryption key6 ],7],
Retention
1'retention' => [2 'strategy' => env('BACKUP_RETENTION', 'gfs'), // gfs | simple3 'gfs' => ['keep_daily' => 7, 'keep_weekly' => 4, 'keep_monthly' => 6, 'keep_yearly' => 2],4 'simple' => ['keep_latest' => 10],5 'max_age_days' => 365,6 'max_storage_megabytes' => null,7],
See Retention.
Queue
Run backups in the background through Laravel's queue, instead of blocking the console command or request that started them:
1'queue' => [2 'enabled' => (bool) env('BACKUP_QUEUE', false),3 'connection' => env('BACKUP_QUEUE_CONNECTION'),4 'queue' => env('BACKUP_QUEUE_NAME', 'backups'),5 'timeout' => (int) env('BACKUP_QUEUE_TIMEOUT', 3600),6],
Scheduling
1'schedule' => [2 'enabled' => (bool) env('BACKUP_SCHEDULE', false),3 'backup' => '0 2 * * *',4 'cleanup' => '0 4 * * *',5 'monitor' => '0 6 * * *',6],
When enabled, the package registers these commands with the Laravel Scheduler automatically. See Scheduling & monitoring.
Monitoring & notifications
Control the health check and who hears about it when a backup fails or a destination starts to look unhealthy:
1'monitoring' => [ 2 'max_backup_age_hours' => 25, 3 'store_history' => true, 4 'notifications' => [ 5 'enabled' => true, 6 'on' => ['failure', 'unhealthy'], // success | failure | unhealthy 7 'mail' => ['to' => []], 8 'slack' => ['webhook_url' => env('BACKUP_NOTIFY_SLACK')], 9 ],10],
Binaries
Leave null to auto-discover from PATH, or set absolute paths:
1'binaries' => [2 'mysqldump' => env('BACKUP_MYSQLDUMP_PATH'),3 'mysql' => env('BACKUP_MYSQL_PATH'),4 'pg_dump' => env('BACKUP_PGDUMP_PATH'),5 'psql' => env('BACKUP_PSQL_PATH'),6 'zstd' => env('BACKUP_ZSTD_PATH'),7],
Timeouts & workspace
1'timeout' => ['database' => 3600, 'process' => 3600], // seconds; null = unlimited2'working_directory' => storage_path('app/backup-manager/temp'),
The working directory must have enough free space for the largest backup while it is assembled, compressed and encrypted before upload.