-
Notifications
You must be signed in to change notification settings - Fork 51
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
Call db:backup form route or controller? #38
Comments
try this |
The suggested code by @anton-ko does not work for me, I get the following error Worked when I've called as follows:
|
none of the solutions provided here work for me -- I cannot seem to set a filename, with or without hyphens. I also cannot set a path, though I'm not sure if the filename parameter is meant to do that. If I do use hyphens, I get the "filename" argument does not exist error. If I don't use hyphens, I don't get that error but it still doesn't work. I can use the no-parameter version of the db:backup command with success. |
@z0d14c If it helps, this is what my code looks like, and it is has been working for me sense November of last year (I make frequently backups). Artisan::call("db:backup", [
"--filename" => $filename,
"--gzip" => "",
"--local-path" => $fileLocation,
"--cleanup" => ""
]); |
I faced this problem too
|
This is not working for me, please help: $execValue = Artisan::call("db:backup", [ I am creating backups with schedule using but what I want to do is force the backup in some specific times. $schedule->command('db:backup --database=mysql --destination=dropbox --destinationPath=/db_ --timestamp="Y-m-d H:i:s" --compression=gzip')
|
I would like to call
php artisan db:backup theara.sql
with custom file name from route or controller like this:I do like this because i want to get file name after generate backup file.
And then i have problem when restore it
Artisan::call('db:restore, array('theara.sql'))
Pl help me.
The text was updated successfully, but these errors were encountered: