Azure-storage-azcopy: Empty Folders

Created on 28 Aug 2019  路  8Comments  路  Source: Azure/azure-storage-azcopy

I need to migrate an entire environment to a BLOB with folders and files, and with azcopy I found no way to copy empty folders in any other way?

Syntax: azcopy sync or copy "/local/path" "blob.blabla" --recursive=true

All 8 comments

Hi @freeza1990, thanks for reaching out!

Yes, the tool indeed intentionally ignores the empty folders. Do you have a use case where they'd be useful to keep?

To clarify, Blob is an object storage, therefore there's no concept of directories. The blob names can contain / which can serve as virtual directories, but they are not real entities.

yes, I need to migrate all files and have folders that are empty and we saw that with "sync" did not copy the folders. and did not find any parameters to copy them. we are migrating from linux to blob. can you help me? I will be grateful thank you.

Hi @freeza1990, as I've clarified, directories are not supported natively on Blob Storage. However, there are tools (I suggest using blobfuse) that map directories into blobs with a specific metadata value.

I understand, is there any tutorial on how to use blobfuse? with him I can synchronize everything?

Yes @freeza1990, here is the tutorial.

As I understand the blob there is no virtual directory without files, I'm right right? So you can't even copy the empty folders.

@freeza1990 indeed, that's why blobfuse represents folders with a blob that contains special metadata (is_hdi_folder=true I believe). So the next time you sync down the container into another machine, the tool will show empty folders correctly.

Was this page helpful?
0 / 5 - 0 ratings