Quick "restic dump" question

With restic dump -a zip, is the dump file actually compressed, or is it just “stored” like a tarball? If it’s just “stored”, is there any way to use compression? I mostly want this for Windows users, when I dump their data from my repository either into OneDrive or an external drive for them. For Mac / Linux it’s easy enough to just pipe the output to zstd or xz.

Judging from the code, data should just be “stored”. But you might want to just dump some data and check the used compression method. It should be easy to patch though:

diff --git a/internal/dump/zip.go b/internal/dump/zip.go
index e5ef5c95b..b4340d909 100644
--- a/internal/dump/zip.go
+++ b/internal/dump/zip.go
@@ -37,6 +37,7 @@ func (d *Dumper) dumpNodeZip(ctx context.Context, node *restic.Node, zw *zip.Wri
                Name:               filepath.ToSlash(relPath),
                UncompressedSize64: node.Size,
                Modified:           node.ModTime,
+               Method:             zip.Deflate,
        }
        header.SetMode(node.Mode)
 
1 Like

Awesome, thanks! I checked with 7-zip on a Windows box and it did indeed report a compression ratio of 100%.