Switch to TarZstd
This commit is contained in:
parent
f65702b416
commit
12c2b14b6f
@ -124,13 +124,15 @@ func (s *SnapshotProcessor) metadataForSnapshotKey(snapshotKey string) (Snapshot
|
|||||||
// Metadata about the snapshot are stored in extra object under metadata/ prefix.
|
// Metadata about the snapshot are stored in extra object under metadata/ prefix.
|
||||||
func (s *SnapshotProcessor) CreateSnapshot(appName string, labels []string) (string, error) {
|
func (s *SnapshotProcessor) CreateSnapshot(appName string, labels []string) (string, error) {
|
||||||
// Create an archive
|
// Create an archive
|
||||||
archive := archiver.Zip{
|
archive := archiver.TarZstd{
|
||||||
CompressionLevel: 6,
|
Tar: &archiver.Tar{
|
||||||
MkdirAll: true,
|
MkdirAll: true,
|
||||||
SelectiveCompression: true,
|
ContinueOnError: true,
|
||||||
ContinueOnError: true,
|
OverwriteExisting: false,
|
||||||
OverwriteExisting: false,
|
ImplicitTopLevelFolder: false,
|
||||||
ImplicitTopLevelFolder: false,
|
},
|
||||||
|
// CompressionLevel: 6,
|
||||||
|
// SelectiveCompression: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
snapshot := Snapshot{
|
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)
|
return fmt.Errorf("getting the archive from S3 error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
archive := archiver.Zip{
|
archive := archiver.TarZstd{
|
||||||
CompressionLevel: 6,
|
Tar: &archiver.Tar{
|
||||||
MkdirAll: true,
|
MkdirAll: true,
|
||||||
SelectiveCompression: true,
|
ContinueOnError: true,
|
||||||
ContinueOnError: false,
|
OverwriteExisting: false,
|
||||||
OverwriteExisting: false,
|
ImplicitTopLevelFolder: false,
|
||||||
ImplicitTopLevelFolder: false,
|
},
|
||||||
|
// CompressionLevel: 6,
|
||||||
|
// SelectiveCompression: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = archive.Unarchive(tmpSnapshotArchivePath, "./")
|
err = archive.Unarchive(tmpSnapshotArchivePath, "./")
|
||||||
|
Loading…
Reference in New Issue
Block a user