-
-
Notifications
You must be signed in to change notification settings - Fork 761
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
In version 2: Could not create backup of db L5.0 #37
Comments
Things you can check:
If you can't find any issues, run the command with the -vvv flag to get more detail on the exception. Though I haven't tested it out the package should work perfectly with L5.1 As soon as that version is available, I'll check it to make sure. |
can you cite an example for paths because i am getting the same issue. |
There are paths configured in the config file by default |
i have tried in my local machine with path mentioned,I am not sure where the 'backups' folder should reside. |
Hi Freekmurze, I set up to S3 in a new different app using server pilot and run: php5.6-sp artisan backup:run I also tried in both 5.1 and 5.0 so is another problem |
You could try putting a file on S3 with the configured Filesystem Storage::disk('nameOfYourConfiguredFilesystem')->put('file.txt', 'Contents'); |
Hi Freek, thanks for your response, but I don't think the problem is in S3, because when I choose local it doesn't work, could the problem be the app is using serverpilot? I try the Storage to S3 and it didn't worked, I change the key and it work, tried again the backup and still same problem (Could not create backup of db) Thanks |
ok, is not server pilot because I test in my local server using mamp and same error with both (local and S3) |
Are you sure mysqldump is installed on your system? Could you try running it manually to see if it creates a dump of your db? |
I was facing this same issue, however only on a windows deployment. In development on my mac it ran fine. I had to set the default path for mysqldump in the config to "C:/Program Files/MySQL/MySQL Server 5.6/bin/" and then it worked. |
Ive just ran into this on another windows server and the above solution does not work for it. I've verified that mysqldump does work on the system |
I recently had the same issue. (OS X, MAMP) It turned out that my mysqldump path was incorrect. In my case a full path to the binary was provided. I replaced it with the path to the directory. |
I too have same issue. Could any one help me? |
@RSNKumar could you try @ilkermutlu 's solution? |
@anhtuank7c thanks! 👍 |
i can't get it running either.
Standard Filesystem settings, directory backups created, Laravel 5.1, ubuntu 14.04, also added it with ::class etc.. everything like it should. Any ideas? |
Yep, exactly the same issue with Laravel 5.1, Debian, Standard config, created the backup directory, mysqldump is in the default location but I added it to the config as well just in case I put a |
anhtuank7c thanks 👍 |
I second this because I'm seeing this as well. Had it happen on a first setup, then after migrating the server it's happening again, and it takes hours of debugging because the error message and trace isn't really clear. Now, back to figuring it out… |
Ooh. Seems the culprit is hhvm. Should not get the uri for stream_get_meta_data. A workaround should be feasible. |
I am having the same problem, and I am not using hhvm:
|
In my case problem was with temporary config file for mysqldump (one generated with tmpfile() in dump method). When you defined host in Laravel config file as eg. "localhost:8889" (with port) this causing the problem.
This is working for me:
|
is there any way to call the same artisan command from laravel controller?? when called from controller it gives error "could not backup db" :( |
@starship11 If you configured the package correctly you can use this code in your project to perform a backup. \Artisan::call('backup:run'); |
I received the same error message, but in my case it was 100% my own fault.
Not sure if my issue was related to the ones you folks are experiencing, but maybe this helps. |
@DerJacques Thanks for taking the time to post your solution 👍 |
Start backing up Why is it using root user and not the user specified in config file. |
Did you save your credentials in the config file? |
PDO::FETCH_CLASS, /* |-------------------------------------------------------------------------- | Default Database Connection Name |-------------------------------------------------------------------------- | | Here you may specify which of the database connections below you wish | to use as your default connection for all database work. Of course | you may use many connections at once using the Database library. | */ 'default' => 'mysql', /* |-------------------------------------------------------------------------- | Database Connections |-------------------------------------------------------------------------- | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is | supported by Laravel is shown below to make development simple. | | | All database work in Laravel is done through the PHP PDO facilities | so make sure you have the driver for your particular database of | choice installed on your machine before you begin development. | */ 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', 'database' => storage_path('database.sqlite'), 'prefix' => '', ], 'mysql' => [ 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'thejanso_anand', 'username' => 'thejanso_anand', 'password' => 'wewewew', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, ], 'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', ], 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', ], ], /* |-------------------------------------------------------------------------- | Migration Repository Table |-------------------------------------------------------------------------- | | This table keeps track of all the migrations that have already run for | your application. Using this information, we can determine which of | the migrations on disk haven't actually been run in the database. | */ 'migrations' => 'migrations', /* |-------------------------------------------------------------------------- | Redis Databases |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also | provides a richer set of commands than a typical key-value systems | such as APC or Memcached. Laravel makes it easy to dig right in. | */ 'redis' => [ 'cluster' => false, 'default' => [ 'host' => '127.0.0.1', 'port' => 6379, 'database' => 0, ], ], ``` ]; |
do I need to make any changes. Regards, On 26 January 2016 at 04:49, Freek Van der Herten notifications@github.com
|
Do you have any other database config-files? Make sure that your Laravel database connection works fine otherwise. The error you experience does not necessarily seem to be related to this package. |
Hi, Regards, On 26 January 2016 at 05:34, Manuel Thomsen notifications@github.com
|
I am using hhvm, guess that is causing the issue. Any workaround or solution available yet. |
Hi guys I'm having a problem with the backup of database. When I run the artisan command on CLI, the database backup works perfectly, but I need run the backup command inside a Controller, and then, I receive error "Could not create backup of db". How I can proceed? God Bless |
@devLopez If it can run on the cli, it should work in the controller as well. Does your application is alle to connect to the database inside the controller? Could you show the code that you're using to run the backup command? |
@freekmurze, down, I took a print screen of my source code. I've created a controller only for manage my backup actions. God Bless |
Seems good. Are you sure it works on the cli? From a package standpoint there's no difference in calling it from cli or calling the command from your controller. I the problem is caused by something specific to your setup. |
Works very well, take a look |
Is the process that handles your web requests allowed to execute external programs like |
Oh men, you got me!!! I don't know, how I can see it? |
I'm not familiar with running php on windows. |
I'm thinking, backups generated manually can be a bad thing. God Bless you men, thanks |
Backup will fail if the port is included/inlined with the host, e.g
|
I'm going to close this for now. If you have any more troubles with v2 of this package, try upgrading to v3 |
Ok men |
thanks for v3 |
Hi freekmurze, sorry to bother you but Im getting this same errors in the local and digital ocean servers with the S3 and local settings, can you please tell me what can be wrong? mysqldump is install
appreciate any help, thanks and cool package can it be automatic with the new options in L5.1?
Start backing up
Determining which files should be backed up...
[ErrorException]
Invalid argument supplied for foreach()
Start backing up
[Exception]
Could not create backup of db
The text was updated successfully, but these errors were encountered: