larkinwhitaker / laravel-db-backup

Laravel 5 Package for easily backing up and restoring databases with command line tools.
http://keystrokecreative.com/
15 stars 17 forks source link

Not possible to upload dump to S3 #1

Open bjora857 opened 9 years ago

bjora857 commented 9 years ago

When running: php artisan db:backup --upload-s3 my-bucket

I get the following error message " [BadMethodCallException] Unknown method: get. "

Commands/BackupCommand#123 It works fine if I change $s3 = AWS::get('s3'); to $s3 = AWS::createClient('s3');

Audesi commented 8 years ago

I'm getting this same issue. The above 'createClient' change is working for me.

simplenotezy commented 8 years ago

Fixed it in my fork: https://github.com/larkinwhitaker/laravel-db-backup/pull/4

paulycloud commented 8 years ago

Hi. This issue is still present in the package as of 7/22. Please update

1

protected function uploadS3() { $bucket = $this->option('upload-s3'); $s3 = AWS::get('s3'); $s3->putObject([ 'Bucket' => $bucket, 'Key' => $this->getS3DumpsPath() . '/' . $this->fileName, 'SourceFile' => $this->filePath, ]); }