Can you elaborate on " backing up to an ftp server through a task schedule"
Spatie Backup and mysqldump
Hi. Im getting an error when backing up to an ftp server through a task schedule.
The error is ::
Exception message: The dump process failed with exitcode 127 : Command not found : sh: 1: /usr/bin/mysqldump: not found
Now i know its installed because, well I installed it and i can run it from /usr/bin/mysqldump and if i run the command to backup from ssh it also works fine. But when its scheduled it just keeps failing.
On my testing server which is an exact duplicate of the production server, it works perfectly!
Heres some of the code:::
Kernel.php
$schedule->command('backup:run --only-db')->everyThirtyMinutes()->environments(['production']); // set to 30min for testing...
config/database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
'dump' => [
'dump_binary_path' => '/usr/bin',
]
],
Any ideas. According to spatie its a server config issue but if I can run it via the command line on the server, surely it should work from the schedule...
Cheers
Please or to participate in this conversation.