mysql-operator icon indicating copy to clipboard operation
mysql-operator copied to clipboard

Backups should not be written to disk temporarily

Open prydie opened this issue 7 years ago • 3 comments

Currently, the mysqldump backup provider writes the backup to the local filesystem and then opens the file and returns that as the io.Reader for the object storage client.

https://github.com/oracle/mysql-operator/blob/2a251f7c0886a8302a63f59a34858047ea88127f/pkg/backup/executor/mysqldump/provider.go#L88-L108

We should upload directly to object storage without writing to disk.

prydie avatar Jun 18 '18 14:06 prydie

@prydie like to contribute if possible, my thought is to use an io.Pipe mechanism to redirect the output of mysqldump to s3 storage store, does this direction look good to you?

Simon-Li avatar Aug 15 '18 04:08 Simon-Li

@Simon-Li Awesome! I started a branch using io.Pipe but didn't manage to get it working before getting diverted. It might be a helpful starting point though: https://github.com/oracle/mysql-operator/commit/badf54e9918974af461bde4ccb856e420f23713c.

prydie avatar Aug 15 '18 09:08 prydie

@prydie ha~, great, will do!

Simon-Li avatar Aug 15 '18 15:08 Simon-Li