From 56c6b3f6731015098fb3e6c05de43f3bb1d3f94c Mon Sep 17 00:00:00 2001 From: Jens-Uwe Mager Date: Wed, 13 Dec 2023 11:06:06 -0500 Subject: [PATCH] cmd: Preserve LastModified date when exporting storage (#5968) --- cmd/storagefuncs.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/storagefuncs.go b/cmd/storagefuncs.go index 6a6daec76..60e25485d 100644 --- a/cmd/storagefuncs.go +++ b/cmd/storagefuncs.go @@ -200,9 +200,10 @@ func cmdExportStorage(fl Flags) (int, error) { } hdr := &tar.Header{ - Name: k, - Mode: 0o600, - Size: int64(len(v)), + Name: k, + Mode: 0o600, + Size: int64(len(v)), + ModTime: info.Modified, } if err = tw.WriteHeader(hdr); err != nil {