Switch to TarZstd

This commit is contained in:
Adam Štrauch 2021-11-01 19:06:23 +01:00
parent f65702b416
commit 12c2b14b6f
Signed by: cx
GPG Key ID: 018304FFA8988F8D

View File

@ -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,
archive := archiver.TarZstd{
Tar: &archiver.Tar{
MkdirAll: true,
SelectiveCompression: 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,
archive := archiver.TarZstd{
Tar: &archiver.Tar{
MkdirAll: true,
SelectiveCompression: true,
ContinueOnError: false,
ContinueOnError: true,
OverwriteExisting: false,
ImplicitTopLevelFolder: false,
},
// CompressionLevel: 6,
// SelectiveCompression: true,
}
err = archive.Unarchive(tmpSnapshotArchivePath, "./")