-
-
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
Backup to S3 using Laravel 5 system doesn't appear to work #34
Comments
I can't reproduce this. Could you give me the entire debugtrace? |
How do I do that in the Terminal? |
You could catch the exception in the code of your application Route::any('/', function() {
try {
Storage::disk('website-backups')->put('help.txt', 'help.txt');
if(Storage::disk('website-backups')->exists('help.txt'))
return "Assert true";
return "Assert this shizzle failed";
}
catch(Exception $e)
{
echo $e->getMessage().'----'.$e->getTraceAsString();
}
}); |
Sorry, yes when I run the code above in routes.php it works fine. The issue is when I run backup from the command line and I get the following error:
Within filesystems.php, my disk is setup as below:
When I add 'eu-west-1' as my region, I can still run the code in routes.php fine however I get this error when I run backup from the command line:
|
Maybe there's something wrong with your environment detection when using the CLI. Can you check on the command line (with |
It's most odd. Using tinker I can see the config's are being read correctly and my environment variables are being substituted in at the right places etc and my environment is set at local as per my I've tried changing my bucket permissions on AWS so that everyone can upload to it and still the same issue remains. Are your filesystem configs any different to mine? |
I'm using the latest version of the package and backing up to s3 works fine ~ php artisan backup:run --only-db
Start backing up
Database dumped
Start zipping 1 files...
Zip created!
Start uploading backup to s3-filesystem...
Backup stored on s3-filesystem in file "backups/20150506233035.zip"
Backup successfully completed In 's3' => [
'driver' => 's3',
'key' => env('S3_KEY'),
'secret' => env('S3_SECRET'),
'region' => 'eu-west-1',
'bucket' => env('S3_BUCKET')
], I'm really puzzeled why it isn't working at your end. Are you sure you created the bucket on AWS in the region you specified in your config file? |
Finally...It seems that the region was correct but I changed my path config in Really bizarre, seems like AWS didn't like putting files in the root of the bucket in this instance. Cheers for your help Freekmurze! Oh and keep up the great posts on murze.be by the way! |
No problem! I'm glad you could solve this issue. |
Trying to backup my site to Amazon S3 doesn't appear to work and throws this error:
Yet, when I run the following code in my application:
I assert true, that a file called 'help.txt' was created.
The text was updated successfully, but these errors were encountered: