This commit is contained in:
2026-02-13 17:30:39 +01:00
parent 20e90ec240
commit fb9bb2fc82
7 changed files with 149 additions and 16 deletions

View File

@@ -134,9 +134,11 @@ func (c *Client) streamToS3(snapshot *zfs.Dataset, uploadURL, storageKey string)
gzWriter := gzip.NewWriter(pw)
go func() {
defer pw.Close()
defer gzWriter.Close()
// Copy zfs output to gzip writer
io.Copy(gzWriter, zfsOut)
// Close gzip writer first to flush footer, then close pipe
gzWriter.Close()
pw.Close()
}()
reader = pr