Search code examples
azureazure-storageazcopy

AZCopy - using /XO parameter from filesystem to blob storage?


My goal is to copy from the filesystem to blob storage, skipping any files that are newer or equal on blob storage. From the documentation, this appears to be possible by using the /XO parameter.

/XO

Excludes an older source resource. The resource will not be copied if the last modified time of the source is the same or older than destination.

However, this does not appear to work for me. Is it because the source is a local filesystem and not another storage account?

I've run the following command to test.

AzCopy /Source:"D:\files" /Dest:https://myaccount.blob.core.windows.net/files /destkey:** /L /S /XO /V:files.txt

Solution

  • The command above works. I had moved the source files via FTP, thus rewriting the last modified date, making the filesystem files appear newer.