-
-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel 5.4, Spatie backup v3/4, Homestead on Windows 10 - pg_dump'' is not recognized as an internal or external command, #526
Comments
I'm guessing this is caused because |
yeah, thank you very much! On my Debian 9 it works great. Cool package. P.S. Do not use Windows for development :D |
Laravel: v5.8
notice that I use \\ instead of \ or / The BUG part
`
these code was in mysql driver but there is not in pgsql driver. I add them and problem fixed. |
ERRORS
`$ php artisan backup:run
Starting backup...
[Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Too few arguments to function Spatie\DbDumper\DbDumper::excludeTables(), 0 passed in C:\Users\BonBon\Code\vendor\spatie\laravel-backup\src\Tasks\Backup\DbDumperFactory.php on line 102 and exactly 1 expected
BonBon@DESKTOP-DOK1CL5 MINGW64 ~/Code (master)
$ php artisan backup:run
Starting backup...
Dumping database grabgg...
Backup failed because The dump process failed with exitcode 1 : General error : ''pg_dump'' is not recognized as an internal or external command,
operable program or batch file.
.
#0 C:\Users\BonBon\Code\vendor\spatie\db-dumper\src\DbDumper.php(222): Spatie\DbDumper\Exceptions\DumpFailed::processDidNotEndSuccessfully(Object(Symfony\Component\Process\Process))
#1 C:\Users\BonBon\Code\vendor\spatie\db-dumper\src\Databases\PostgreSql.php(55): Spatie\DbDumper\DbDumper->checkIfDumpWasSuccessFul(Object(Symfony\Component\Process\Process), 'C:\Users\BonBon...')
#2 C:\Users\BonBon\Code\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(219): Spatie\DbDumper\Databases\PostgreSql->dumpToFile('C:\Users\BonBon...')
#3 [internal function]: Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup{closure}(Object(Spatie\DbDumper\Databases\PostgreSql), 0)
#4 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Support\Collection.php(766): array_map(Object(Closure), Array, Array)
#5 C:\Users\BonBon\Code\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(230): Illuminate\Support\Collection->map(Object(Closure))
#6 C:\Users\BonBon\Code\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(149): Spatie\Backup\Tasks\Backup\BackupJob->dumpDatabases()
#7 C:\Users\BonBon\Code\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(129): Spatie\Backup\Tasks\Backup\BackupJob->createBackupManifest()
#8 C:\Users\BonBon\Code\vendor\spatie\laravel-backup\src\Commands\BackupCommand.php(49): Spatie\Backup\Tasks\Backup\BackupJob->run()
#9 [internal function]: Spatie\Backup\Commands\BackupCommand->handle()
#10 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(29): call_user_func_array(Array, Array)
#11 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#12 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Container\Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Console\Command.php(182): Illuminate\Container\Container->call(Array)
#15 C:\Users\BonBon\Code\vendor\symfony\console\Command\Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#16 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Console\Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 C:\Users\BonBon\Code\vendor\spatie\laravel-backup\src\Commands\BaseCommand.php(22): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 C:\Users\BonBon\Code\vendor\symfony\console\Application.php(888): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\Users\BonBon\Code\vendor\symfony\console\Application.php(224): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\Co
nsoleOutput))
#20 C:\Users\BonBon\Code\vendor\symfony\console\Application.php(125): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 C:\Users\BonBon\Code\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 C:\Users\BonBon\Code\artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 {main}
Backup failed because: Expected response code 250 but got code "554", with message "554 Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings.
".
[Swift_TransportException]
Expected response code 250 but got code "554", with message "554 Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings.
"`
Configs
`<?php
return [
];
`
Database
'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', 'sslmode' => 'prefer', // 'dump' => [ // 'dump_binary_path' => '/path/to/the/binary', // only the path, so without
mysqldumpor
pg_dump// 'use_single_transaction', // 'timeout' => 60 * 5, // 5 minute timeout // 'exclude_tables' => [], // 'add_extra_option' => '--optionname=optionvalue', // ] ],
I have installed Vagrant Homestead x64 for Windows 10 Pro.
Did not installed any more, not binaries or else like this StackOverflow
Want to configure for every couple hours make PostgreSQL database backup, in case we need to restore it.
The text was updated successfully, but these errors were encountered: