|
8 | 8 | | be modified directly. |
9 | 9 | */ |
10 | 10 |
|
| 11 | + |
| 12 | +// This is used by the mysql dump options in spatie backup |
| 13 | +$dump_options = [ |
| 14 | + 'dump_binary_path' => env('DB_DUMP_PATH', '/usr/local/bin'), // only the path, so without 'mysqldump' |
| 15 | + 'use_single_transaction' => false, |
| 16 | + 'timeout' => 60 * 5, // 5 minute timeout |
| 17 | + //'exclude_tables' => ['table1', 'table2'], |
| 18 | + //'add_extra_option' => '--optionname=optionvalue', |
| 19 | +]; |
| 20 | + |
| 21 | +// Some versions of mysql do not support the --skip-ssl option and will fail if it is |
| 22 | +if (env('DB_DUMP_SKIP_SSL') == 'true') { |
| 23 | + $dump_options['skip_ssl'] = true; |
| 24 | +} |
| 25 | + |
| 26 | + |
11 | 27 | return [ |
12 | 28 |
|
13 | 29 | /* |
|
79 | 95 | 'strict' => false, |
80 | 96 | 'engine' => 'InnoDB', |
81 | 97 | 'unix_socket' => env('DB_SOCKET', ''), |
82 | | - 'dump' => [ |
83 | | - 'dump_binary_path' => env('DB_DUMP_PATH', '/usr/local/bin'), // only the path, so without 'mysqldump' |
84 | | - 'skip_ssl' => env('DB_DUMP_SKIP_SSL', false), // turn off SSL if not available |
85 | | - 'use_single_transaction' => false, |
86 | | - 'timeout' => 60 * 5, // 5 minute timeout |
87 | | - //'exclude_tables' => ['table1', 'table2'], |
88 | | - //'add_extra_option' => '--optionname=optionvalue', |
89 | | - ], |
90 | | - |
| 98 | + 'dump' => $dump_options, |
91 | 99 | 'dump_command_timeout' => 60 * 5, // 5 minute timeout |
92 | 100 | 'dump_using_single_transaction' => true, // perform dump using a single transaction |
93 | 101 | 'options' => (env('DB_SSL')) ? ((env('DB_SSL_IS_PAAS')) ? [ |
|
0 commit comments