question

TimPaul-4052 avatar image
0 Votes"
TimPaul-4052 asked TimPaul-4052 answered

Excluding folders with azcopy sync not working

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

deherman-MSFT avatar image
0 Votes"
deherman-MSFT answered

@TimPaul-4052 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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TimPaul-4052 avatar image
0 Votes"
TimPaul-4052 answered

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



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.