spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.61k stars 758 forks source link

Error while updating "Undefined array key "database_dump_filename_base" #1831

Closed unnathianalytics closed 2 weeks ago

unnathianalytics commented 1 month ago

Getting this error :

"Undefined array key "database_dump_filename_base" at vendor\spatie\laravel-backup\src\Config\BackupConfig.php:40" Please help Laravel version 11.20 PHP 8.3

vesper8 commented 4 weeks ago

You have to add


        /*
         * If specified, the database dumped file name will contain a timestamp (e.g.: 'Y-m-d-H-i-s').
         */
        'database_dump_file_timestamp_format' => null,

        /*
         * The base of the dump filename, either 'database' or 'connection'
         *
         * If 'database' (default), the dumped filename will contain the database name.
         * If 'connection', the dumped filename will contain the connection name.
         */
        'database_dump_filename_base' => 'database',

To your config file

nikitabuida commented 4 weeks ago

Well there are plenty of new keys in config so it is better to copy everything from latest version into your backup.php config file.

JulianLlanten8 commented 2 weeks ago

In my case I was using Spatie Multitenancy, and I just had to switch. 'database_dump_filename_base' => 'connection'.

super easy 🐣♥️.