An Azure service that stores unstructured data in the cloud as blobs.
Hello @ **Sahil Jaiswal,
AzCopy always stamps the destination blob with “now” because Last-Modified is a service-managed, read-only property on blobs. Here’s the scoop:
- Can AzCopy preserve the source Last-Modified on a cross-account blob copy?
No. AzCopy v10’s sync and copy commands always write the current time into the blob’s Last-Modified header when they commit a new blob. The old --s2s-preserve-properties flag applied to Azure Files (SMB/NFS) but was never supported for Azure Blob Storage in v10.x.
- Is there an API or SDK to explicitly set/override Last-Modified on a blob?
Unfortunately, not. The Blob service Last-Modified is read-only—you can’t set or back-date it via REST, .NET/Java/Python SDKs, PowerShell, CLI, or ARM templates. It’s auto-assigned by Azure each time the blob is created or overwritten.
- Any roadmap to change that?
Last-Modified isn’t on the public roadmap for being user-settable. If you need to carry over the original timestamp, the common workaround is:
• Read the source blob’s Last-Modified in your script or code.
• Write it into custom metadata (for example, x-ms-meta-originalLastModified=2023-05-10T15:22:30Z).
• Copy or sync blobs normally. After the copy, you’ll have your original timestamp preserved as metadata you can query.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment"