Welcome Guest, Not a member yet? Register   Sign In
using write_file()
#1

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)


[font=Courier New]$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);
[/font]


 
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?
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB