You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current implementation we pass around files: write a database backup to a directory, tar the backup directory contents, encrypt the tar and then upload. This requires a lot of disk space because we write everything to dedicated files.
To optimize this and also make the code a bit easier to understand (file path handling is not particularly beautiful), we could try utilizing streams, i.e. the io.Reader and io.Writer interface.
Our archiver library seems to offer a Compressor and Decompressor interface, which allows passing streams. If this does not work out for us, we could also try to compress using go std lib (+ pierrec/lz4 if we want to maintain lz4 compression support).
Then we could pipe the compressed backup into the encryption layer. AES encryption is also be possible with streams.
The backup providers also have no issues to handle streams for upload and download.
Only the databases cannot be enabled to pass streams as they depend on their own database tooling and os/exec. So, for databases the file-path interface has to be maintained, I assume. Please correct me if you think I am wrong.
The text was updated successfully, but these errors were encountered:
In the current implementation we pass around files: write a database backup to a directory, tar the backup directory contents, encrypt the tar and then upload. This requires a lot of disk space because we write everything to dedicated files.
To optimize this and also make the code a bit easier to understand (file path handling is not particularly beautiful), we could try utilizing streams, i.e. the
io.Reader
andio.Writer
interface.Our archiver library seems to offer a
Compressor
andDecompressor
interface, which allows passing streams. If this does not work out for us, we could also try to compress using go std lib (+ pierrec/lz4 if we want to maintain lz4 compression support).Then we could pipe the compressed backup into the encryption layer. AES encryption is also be possible with streams.
The backup providers also have no issues to handle streams for upload and download.
Only the databases cannot be enabled to pass streams as they depend on their own database tooling and
os/exec
. So, for databases the file-path interface has to be maintained, I assume. Please correct me if you think I am wrong.The text was updated successfully, but these errors were encountered: