Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blobs that contain a <no name> folder are not removed by sync --delete-destination true #1888

Closed
skyaddict opened this issue Sep 6, 2022 · 4 comments

Comments

@skyaddict
Copy link

Which version of the AzCopy was used?

Note: The version is visible when running AzCopy without any argument

AzCopy 10.16.0

Which platform are you using? (ex: Windows, Mac, Linux)

Windows

What command did you run?

Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.

azcopy.exe sync $fromstorageaccount $tostorageaccount --recersive --delete-destination $true

What problem was encountered?

When blobs created with a folder exist in the destination that needs to be deleted the delete command removes the \

image

this blob name:
container\foo\bar.txt
becomes:
container\foo\bar.txt

and the delete fails with Code: BlobNotFound

How can we reproduce the problem in the simplest way?

create a blob with a folder in a destination account and sync from an empty account to this destination account using the --delete-destination true

Have you found a mitigation/solution?

no

@adreed-msft
Copy link
Member

If your folder is a stub file (like that which ADLSG2 uses where it's an empty file in place of the folder with the metadata hdi_isfolder=true), our enumerators will actually skip over it with the default settings. We unfortunately don't have the same flag exposed for sync, but you could potentially remove it with azcopy rm as that removes stubs by default.

@skyaddict
Copy link
Author

we have some files that were being written with an empty folder name. It is interesting the file discovery sees them but when sync tries to remove it then throws the error. It seems to me it should be consistent.

@gapra-msft
Copy link
Member

Hi @skyaddict

I attempted to reproduce this issue but was unsuccessful. Could you please clarify exactly how the storage account (source and destination) should be configured?

In my repro, I created a source and destination container. I left the source empty and created a file in a virtual directory in the destination

So the destination looked like this

myfolder/myfile

Note: there is no virtual directory stub in place of myfolder in my repro, so there is no real blob there.

@adreed-msft
Copy link
Member

--delete-destination for folders in Sync has been implemented & is targeting 10.19.0. #2147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants