Preserving original Last-Modified timestamp when copying blobs between storage accounts using azcopy sync

Sahil Jaiswal 40 Reputation points
2026-03-05T04:20:20.68+00:00

Hi Team,

Description:

When using azcopy sync (v10.31.1) or azcopy copy to copy blobs from one Azure Storage account to another, the Last-Modified timestamp on the destination blob is reset to the time of the copy.

Questions:

  1. Is there any way to preserve the original source blob's Last-Modified on the destination blob during a cross-account copy?
  2. Is there any Azure API or SDK method to explicitly set/override the Last-Modified property on a blob?
  3. If neither is possible, is this on any roadmap?

We need to determine the original modification time of source blobs after they've been copied to a different storage account.

What we've tried:

  • azcopy syncLast-Modified is reset
  • azcopy copy — same behaviour
  • --s2s-preserve-properties — deprecated/removed in v10.31.1; not sure if they preserve Last-Modified in older versions

Thank you.

Azure Blob Storage
Azure Blob Storage

An Azure service that stores unstructured data in the cloud as blobs.

0 comments No comments

Answer accepted by question author
Ravi Varma Mudduluru 12,540 Reputation points Microsoft External Staff Moderator
2026-03-06T00:50:24.2666667+00:00

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:

  1. 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.

User's image

  • 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"

Was this answer helpful?

0 comments No comments

Answer accepted by question author
Pradeep Kommaraju 1,170 Reputation points Microsoft Employee Moderator
2026-03-05T05:46:37.46+00:00

Hi Sahil ,

Thanks for reaching out to Microsoft Q and A Forums ,

Can AzCopy preserve the original Last-Modified timestamp during a cross-account copy?
No. Last-Modified is a system-managed property in Azure Blob Storage and is always reset to the time of the write or copy operation.

Can any Azure API or SDK explicitly set or override Last-Modified?
No. There is no API or SDK that allows setting or overriding the Last-Modified property. It is read-only and controlled by the service.

Is this on any roadmap?
There is no roadmap item indicating support for preserving or manually setting Last-Modified.

One Possible workaround

Run a script to:

  1. Enumerate all source blobs
  2. Export blob name and Last-Modified to CSV or JSON
  3. Store the file in durable storage (Table, SQL, Cosmos DB, etc.)
  4. Perform AzCopy
  5. Use the exported data whenever the original timestamp is required

Please don't forget to Accept the answer if this was helpful or do get back if you have follow up questions on the same

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.