Excluding folders with azcopy sync not working

Tim Paul 1 Reputation point
2021-10-29T03:04:32.227+00:00

Hello,

I originally posted this on Git but I think that was the wrong place. Perhaps this is the right place?

I'm running azcopy 10.10.0 on Windows 10.0.19043.1288. I am syncing files and directories from a QNAP NAS using:

azcopy sync "Y:\Documents\Organisational Change" "https://ocazurenas.blob.core.windows.net/ocazurenas/Organisational Change" --exclude-path="Y:\Documents\Organisational Change\Culture@Recently-Snapshot";"Y:\Documents\Organisational Change\Culture\Books@Recently-Snapshot"

however, the @Recently-Snapshot folders are still being synced so I am assuming I have the syntax wrong . Or am I missing something else or is the command just not working? The @Recently-Snapshot directories are hidden so I've tried excluding them using attributes but, again, I couldn't get that command to work either.

I'd really appreciate assistance, please. Thank you.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,425 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. deherman-MSFT 33,216 Reputation points Microsoft Employee
    2021-10-29T19:16:08.803+00:00

    @Tim Paul I believe the issue you facing is mentioned in this GitHub issue. Try using the relative path like so:

    azcopy sync "Y:\Documents\Organisational Change" "https://ocazurenas.blob.core.windows.net/ocazurenas/Organisational Change" --exclude-path="Culture@Recently-Snapshot;Culture\Books@Recently-Snapshot"  
    

    Hope this helps. Let me know if you are still facing issues or have further questions.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  2. Tim Paul 1 Reputation point
    2021-10-29T23:47:33.487+00:00

    Thanks for the note and suggestion @deherman-MSFT , however that doesn't seem to work either I'm afraid.

    Below are two selected lines from the log file. The first shows the command and the second shows a file (I've masked the name of the file with xxx) from the excluded directory being transfered.

    2021/10/29 21:28:26 Job-Command sync Y:\Documents\Organisational Change https://ocazurenas.blob.core.windows.net/ocazurenas/Organisational%20Change --exclude-path=Culture@Recently-Snapshot;Culture\Books@Recently-Snapshot  
     
    
    2021/10/29 21:28:26 INFO: [P#0-T#16] Starting transfer: Source "%5C%5C?\\Y:\\Documents\\Organisational Change\\Culture\\@Recently-Snapshot\\GMT+10_2021-10-14_0100\\Books\\xxxxxx.pdf" Destination "https://ocazurenas.blob.core.windows.net/ocazurenas/Organisational%20Change/Culture/@Recently-Snapshot/GMT+10_2021-10-14_0100/Books/x%x%20x%20x%20x%20-%20x%20x%20x%2C%20x%2C%20x%20x.pdf". Specified chunk size 8388608  
    

    Your thoughts?

    Cheers

    0 comments No comments