@Mahasiva, Ravi (CSW) Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
Which version on Azcopy are you using?
If you are still having issues preserving the last modified time of the files, you may want to check the file system on the VM to make sure that it supports last modified time, and check the destination container in the Azure Storage account .
Looking at the "azcopy copy" and "azcopy sync" commands, they support using wildcard patterns to filter files based on the names/paths of files. The wildcard patterns normally can be used to filter the files which have the similar format of name/path.
Since the names of your files have the same format and the latest filename is dynamically generated with the date-time, it is hard to filter the last file version based on the filename
You might try to use the "azcopy list" to check whether it can return the created date (or latest modified date) of each backup file, then try to compare the dates between file versions to get the latest file version.
To copy files changed before or after the AzCopy job has started, AzCopy provides date and time in the job log in ISO8601 format (search for 'ISO 8601 START TIME' in the job log) that can be used with the --include-after
and --include-before
flags, see examples below. This is helpful for incremental copies.
Upload files that were modified after a date and time and Download files that were modified after a date and time is available in this article
Additional information: You can try robocopy: (you need to use the /COPY and /DCOPY options to preserve the timestamps. Good discussion on this can be found on this thread.)
Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.