laravel-backup
laravel-backup copied to clipboard
excludeTables documentation wrong?
Per config/backup.php:
* The content of the database dump may be customized for each connection
* by adding a 'dump' key to the connection settings in config/database.php.
* E.g.
* 'mysql' => [
* ...
* 'dump' => [
* 'excludeTables' => [
* 'table_to_exclude_from_backup',
* 'another_table_to_exclude'
* ]
* ],
* ],
I have this:
'databases' => [
'mysql' => [
'dump' => [
'excludeTables' => [ 'sessions' ]
]
]
],
But get this upon running:
Argument 1 passed to Spatie\Backup\Tasks\Backup\BackupJobFactory::Spatie\Backup\Tasks\Backup\{closure}() must be of the type string, array given, called in /var/www/production/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php on line 742
Not sure what is off there?
I had a feeling I read something wrong and just noticed it's config/database.php, not config/backup.php. I didn't expect it to be in a separate file. Why not keep it all contained within the backup config?
This is not a bug https://github.com/spatie/laravel-backup/blob/1aa4394e8dd619a2a2cbd480240148ace5f643f4/config/backup.php#L57 https://github.com/spatie/laravel-backup/issues/1368#issuecomment-959925953 https://github.com/spatie/laravel-backup/issues/1446#issuecomment-1013183295
I know, but isn't it strange that all the backup settings are in config/backup.php, except for this one thing, which is in config/database.php? As evidenced by #1368 and #1446.
Because it the best, not need to know why
@futzlarson it uses another laravel package for mysql dump, that package uses default laravel database configs, there is no way to send third party configs to that package as default
Close this and read other issues or discussions before opening a new one