using write_file() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: using write_file() (/showthread.php?tid=72225) |
using write_file() - richb201 - 11-24-2018 I am using write_file to to write out a backup of my sql tables once/week: $backup = $this->dbutil->backup($prefs); write_file('/opt/bitnami/mysql/tmp/mybackup.gz', $backup) $source = '/opt/bitnami/mysql/tmp/mybackup.gz'; // Where the files will be transferred to $dest = 's3://substantiator-mysql-backup'; // Create a default transfer object $manager = new \Aws\S3\Transfer($client, $source, $dest); This seems to write out a long string of data to the file named above. The problem is that when i try uploading this to Amazon I get an error that the function can't find /opt/bitnami/mysql/tmp/mybackup.gz . I checked the permissions of that file and I see it is: 660. Is the problem in the way the backup was created? Or perhaps the permissions on the /tmp directory? |