Skip to content
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

Backup failed with exit code 1 #83

Closed
lino10 opened this issue Mar 11, 2016 · 7 comments
Closed

Backup failed with exit code 1 #83

lino10 opened this issue Mar 11, 2016 · 7 comments

Comments

@lino10
Copy link

lino10 commented Mar 11, 2016

Hi, I just tried laravel-backup but it always failed to backup.

Here's the error message

Starting backup...
Dumping database testlaravel...
Backup failed because The dump process failed with exitcode 1 : General error.
Backup completed!

I think maybe because I gave the APP_URL some random name? Do I need a working url to put it there? I don't see any example in the documentation how APP_URL should looks like.

There's an empty file in storage/laravel-backups/temp with the database name(testlaravel.sql) and there's no error about the laravel-backup generated in the log file.

Manually calling mysqldump in php works.

Laravel 5.2.22
laravel-backup 3.0.5
homestead 0.4.2

@freekmurze
Copy link
Member

Is mysqldump installed in the default location? Are you calling backup:run from the command line?

@lino10
Copy link
Author

lino10 commented Mar 14, 2016

Yes, I called the command from php artisan. I tried with --only-db option but it also failed.
I don't know about the location, but it's supposed to be at default location if the homestead did not move it.

Anyway, I've created my own script to backup(using artisan command too) and already uninstalled laravel-backup, so I cannot help with debugging.

@dubems
Copy link

dubems commented Dec 5, 2016

am having the same issue. php artisan backup:run from the command line throws the error below

Starting backup...
Dumping database chamb
Backup failed because The dump process failed with exitcode 1 : General error.
Access is denied.

@NewbieCoder99
Copy link

image
Helo, i try backup, i found error,

@mostafacs-star
Copy link

mostafacs-star commented Aug 19, 2018

I also encounter in this type of error

@tobias-kuendig
Copy link

Same error here, this ticket should be reopened. Even if this is a configuration error the error message can be improved.

Starting backup...
Dumping database projectname...
Backup failed because The dump process failed with exitcode 1 : General error : .
#0 C:\Program Files (x86)\projectname\api\vendor\spatie\db-dumper\src\DbDumper.php(235): Spatie\DbDumper\Exceptions\DumpFailed::processDidNotEndSuccessfully(Object(Symfony\Component\Process\Process))
#1 C:\Program Files (x86)\projectname\api\vendor\spatie\db-dumper\src\Databases\MySql.php(142): Spatie\DbDumper\DbDumper->checkIfDumpWasSuccessFul(Object(Symfony\Component\Process\Process), 'C:\\Program File...')
#2 C:\Program Files (x86)\projectname\api\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(240): Spatie\DbDumper\Databases\MySql->dumpToFile('C:\\Program File...')
#3 [internal function]: Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup\{closure}(Object(Spatie\DbDumper\Databases\MySql), 'mysql')
#4 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Support\Collection.php(932): array_map(Object(Closure), Array, Array)
#5 C:\Program Files (x86)\projectname\api\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(243): Illuminate\Support\Collection->map(Object(Closure))
#6 C:\Program Files (x86)\projectname\api\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(165): Spatie\Backup\Tasks\Backup\BackupJob->dumpDatabases()
#7 C:\Program Files (x86)\projectname\api\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(141): Spatie\Backup\Tasks\Backup\BackupJob->createBackupManifest()
#8 C:\Program Files (x86)\projectname\api\vendor\spatie\laravel-backup\src\Commands\BackupCommand.php(52): Spatie\Backup\Tasks\Backup\BackupJob->run()
#9 [internal function]: Spatie\Backup\Commands\BackupCommand->handle()
#10 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(29): call_user_func_array(Array, Array)
#11 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#12 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Container\Container.php(564): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Console\Command.php(184): Illuminate\Container\Container->call(Array)
#15 C:\Program Files (x86)\projectname\api\vendor\symfony\console\Command\Command.php(251): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#16 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Console\Command.php(171): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 C:\Program Files (x86)\projectname\api\vendor\spatie\laravel-backup\src\Commands\BaseCommand.php(16): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 C:\Program Files (x86)\projectname\api\vendor\symfony\console\Application.php(886): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\Program Files (x86)\projectname\api\vendor\symfony\console\Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 C:\Program Files (x86)\projectname\api\vendor\symfony\console\Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Console\Application.php(89): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 C:\Program Files (x86)\projectname\api\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(122): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 C:\Program Files (x86)\projectname\api\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 {main}
Backup failed because: The dump process failed with exitcode 1 : General error : .

@tobias-kuendig
Copy link

tobias-kuendig commented Sep 4, 2018

It looks like this commit to db-dumper caused the problem:

spatie/db-dumper@d114fb8

The gzip executable is not available on Windows.

spatie/db-dumper@d114fb8#diff-ef96e9262b9ecfcf31e59d4b11ac335fR254

Setting gzip_database_dump to false solved the problem for me.

Also, I had to upgrade to the latest version. This was also a problem:
spatie/db-dumper@6a2698e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants