Comments (3)
Why not replace all your custom Sync drivers with Flysystem: https://github.com/thephpleague/flysystem
Supports AWS, Dropbox, (S)FTP, Copy, Rackspace, Local etc. Also supports streams, so you just create an adapter and use Flysystem the same way for all.
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
$client = S3Client::factory([
'credentials' => [
'key' => $this->key,
'secret' => $this->secret,
],
'region' => $this->region,
'version' => 'latest',
]);
$adapter = new AwsS3Adapter($client, $this->bucket);
$filesystem = new Filesystem($adapter);
$fh = fopen($sourcePath, 'r');
$filesystem->putStream($targetPath, $fh);
from phpbu.
I thought about that too, would make things a lot easier.
I hasitaded so far to keep the dependencies and the PHAR file as small as possible. But maybe it's time to do it the "easy" way.
from phpbu.
For now I postponed the migration to Flysystem
and added support for "pure" AWS sdk version 3.
I think I will add a generic Flysystem
Sync in the future so you can handle all file systems supported by Flysystem
with one Sync implementation.
from phpbu.
Related Issues (20)
- Feature Request: Add support for mydumper for exporting Databases. HOT 4
- Create .gz files, but using `pigz` instead of `gzip`?
- Wrong Backup Path doesn't generate error HOT 1
- Upload via SFTP fails probably when file is to big HOT 2
- Are you going to make a new release soon ?
- Feature request: clean up when tar fails due to not enough space on disk HOT 1
- backblazeb2 S3 errors and bad reporting HOT 6
- Retry Uploads when one multipart failed HOT 3
- Call to undefined function JmesPath\mb_strlen() HOT 5
- Debug not allowed HOT 1
- CLI no restore guide HOT 5
- Add option to tar+ssh on a different host - Feature Request
- Add support for `zstd`
- PHP 8.1 generates a lot of warnings HOT 1
- Add --no-tablespaces for mysqldump
- FTP stepwise cleanup not working
- Incremental Backup TAR Compression Restore
- How to tar exclude relative to source directory? HOT 1
- Error backuping a big tar.gz to s3 HOT 1
- Yandex disk cleanup
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpbu.