From bef650757d225fc8b275465b1f39afc119183c85 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 1 Apr 2025 21:25:35 +0100 Subject: [PATCH] Fixes #16610, regression in #16543 Signed-off-by: snipe --- config/database.php | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/config/database.php b/config/database.php index 39b40c1ae..fd7ff6aa0 100755 --- a/config/database.php +++ b/config/database.php @@ -8,6 +8,22 @@ | be modified directly. */ + +// This is used by the mysql dump options in spatie backup +$dump_options = [ + 'dump_binary_path' => env('DB_DUMP_PATH', '/usr/local/bin'), // only the path, so without 'mysqldump' + 'use_single_transaction' => false, + 'timeout' => 60 * 5, // 5 minute timeout + //'exclude_tables' => ['table1', 'table2'], + //'add_extra_option' => '--optionname=optionvalue', +]; + +// Some versions of mysql do not support the --skip-ssl option and will fail if it is +if (env('DB_DUMP_SKIP_SSL') == 'true') { + $dump_options['skip_ssl'] = true; +} + + return [ /* @@ -79,15 +95,7 @@ return [ 'strict' => false, 'engine' => 'InnoDB', 'unix_socket' => env('DB_SOCKET', ''), - 'dump' => [ - 'dump_binary_path' => env('DB_DUMP_PATH', '/usr/local/bin'), // only the path, so without 'mysqldump' - 'skip_ssl' => env('DB_DUMP_SKIP_SSL', false), // turn off SSL if not available - 'use_single_transaction' => false, - 'timeout' => 60 * 5, // 5 minute timeout - //'exclude_tables' => ['table1', 'table2'], - //'add_extra_option' => '--optionname=optionvalue', - ], - + 'dump' => $dump_options, 'dump_command_timeout' => 60 * 5, // 5 minute timeout 'dump_using_single_transaction' => true, // perform dump using a single transaction 'options' => (env('DB_SSL')) ? ((env('DB_SSL_IS_PAAS')) ? [