I\'m writing code in Laravel 5 to periodically backup a MySQL database. My code thus far looks like this:
$filename = \'database_backup_\'.date(\'G_a_m_d_y\
Looking at the documentation the only way is using method put
which needs file content. There is no method to copy file between 2 file systems so probably the solution you gave is at the moment the only one.
If you think about it, finally when copying file from local file system to s3, you need to have file content to put it in S3, so indeed it's not so wasteful in my opinion.