From 12c2b14b6fc98788e1a03d624dba037a001a483d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 1 Nov 2021 19:06:23 +0100 Subject: [PATCH] Switch to TarZstd --- apps/snapshots.go | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/apps/snapshots.go b/apps/snapshots.go index 3421122..743262e 100644 --- a/apps/snapshots.go +++ b/apps/snapshots.go @@ -124,13 +124,15 @@ func (s *SnapshotProcessor) metadataForSnapshotKey(snapshotKey string) (Snapshot // Metadata about the snapshot are stored in extra object under metadata/ prefix. func (s *SnapshotProcessor) CreateSnapshot(appName string, labels []string) (string, error) { // Create an archive - archive := archiver.Zip{ - CompressionLevel: 6, - MkdirAll: true, - SelectiveCompression: true, - ContinueOnError: true, - OverwriteExisting: false, - ImplicitTopLevelFolder: false, + archive := archiver.TarZstd{ + Tar: &archiver.Tar{ + MkdirAll: true, + ContinueOnError: true, + OverwriteExisting: false, + ImplicitTopLevelFolder: false, + }, + // CompressionLevel: 6, + // SelectiveCompression: true, } snapshot := Snapshot{ @@ -201,13 +203,15 @@ func (s *SnapshotProcessor) RestoreSnapshot(key string, newAppName string) error return fmt.Errorf("getting the archive from S3 error: %v", err) } - archive := archiver.Zip{ - CompressionLevel: 6, - MkdirAll: true, - SelectiveCompression: true, - ContinueOnError: false, - OverwriteExisting: false, - ImplicitTopLevelFolder: false, + archive := archiver.TarZstd{ + Tar: &archiver.Tar{ + MkdirAll: true, + ContinueOnError: true, + OverwriteExisting: false, + ImplicitTopLevelFolder: false, + }, + // CompressionLevel: 6, + // SelectiveCompression: true, } err = archive.Unarchive(tmpSnapshotArchivePath, "./")