1
votes

I need to copy/sync a folder, containing numerous sub folders and files, from a local machine (Windows Server 2012) to our Azure Blob container. Some paths exceed 260chars.

I attempted to use AzCopy (https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy), but got an exception with a long file name.

What are the options for copying files from a local PC to an Azure Blob container, which have pretty long folder/file names? Something like RoboCopy, but then I'd need to map a folder to my blob storage, and I'm not sure that's possible.

1
Maybe you could check this similar question.Shui shengbao
Thanks @Walter-MSFT - problem is, the two solutions are not quite suitable. Reduce folder name length isn't an option as other systems use these paths. And using Azure Storage Explorer is an issue as I need to execute nightly syncs (command line) and only update changed files.Craig

1 Answers

2
votes

Azure Blob Storage doesn't have the concept of folders. There's just: container name + blob name (though a blob's container name can contain separator characters like \ which makes it appear like a path).

And a container's name cannot exceed 63 characters (and must be lowercase). There's no getting around that. If you're trying to store your local server's path as the container name, and that path exceeds 63 characters, it's not going to work.

Azure File Shares (which are backed by Azure Storage) don't have this limitation, as they support standard file I/O operations and directory structures. If you take this route, you should be able to copy your folder structure as-is. There are a few differences:

  • File shares may be mounted (as an smb share), allowing you to just copy your content over (e.g. xcopy)
  • You may make SDK/API calls to copy files (slightly different API)
  • A file share is limited to 5TB, with total 1000 IOPS across the share