How can we improve Azure Storage?

Rename blobs without needing to copy them

Copying blobs in order to rename them is a heavy operation, especially when the blob is big, or when you need to change many files, such as when changing a directory name.

559 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Ido F. shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    Our apologies for not updating this ask earlier. Renaming Blobs is on our backlog, but is unlikely to be released in the coming year. Today, you can use the “Copy Blob” API as a workaround.

    Using the Azure Files service you can address Azure Storage like a network share using the SMB2.1 protocol.  This enables usage of normal Windows API’s to rename files and directories.  You can get started with the Files service by visiting https://docs.microsoft.com/en-us/azure/storage/storage-dotnet-how-to-use-files.

    For any further questions, or to discuss your specific scenario, send us an email at azurestoragefeedback@microsoft.com.

    15 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Christopher Warrington commented  ·   ·  Flag as inappropriate

        I would like to be able to rename blobs so I can have them in a different namespace while they are being created/uploaded to. Then, after they are finalized, they can be renamed to their "published" location. Couple this with per-blob expiration and implement atomic rename-and-reset-TTL, then blob upload error recovery becomes trivial: start uploading to a temporary blob with a short TTL, when done, rename-and-reset-TTL to the final name. If anything goes wrong, the partial blob will just go away automatically.

      • Zeke Victor commented  ·   ·  Flag as inappropriate

        It's too bad this can't be prioritized. For a folder containing many, many files, a rename not only requires COPY + DELETE but must also be done on an individual file basis instead of at the folder level.

      • Lawrence Smith commented  ·   ·  Flag as inappropriate

        Not only is this a forced copy/delete operation, it's not even being done server side. Doing it through Azure Storage Explorer, I can see that I'm egressing/rewriting every file back to the machine that started the folder rename. At least let it be server side!?

      • Haastastic commented  ·   ·  Flag as inappropriate

        It seems pretty clear that there is no plan to allow Blob renaming. What would be nice is the architectural reason why.

      • Mayank Patel commented  ·   ·  Flag as inappropriate

        We tried the nextwork share idea but you can not rename the folder instead it copy the contents of folder to new folder. Same behaviour as Azure blob. Any idea when this functionality will be avaialble. It has been four years since original request was made.

      • Ronald23 commented  ·   ·  Flag as inappropriate

        you can try "KrojamSoft: BatchRenameFiles Tool". i've used it so many times for this familiar work..

      • sandor commented  ·   ·  Flag as inappropriate

        Azure Files services workaround is definitely not what we asked :(. We want a fast and cost effective solution to rename blobs. As someone said, this is an extremely basic feature when it comes to storage.

        I understand there are very interesting features being actively developed, but I think such a basic feature should receive a bit more attention (almost 4 years since it was suggested and it is still not planned).

        I hope we can see this planned for early 2018 at least ;)

      • David commented  ·   ·  Flag as inappropriate

        I don't understand why renaming/moving blobs wasn't included in Azure Storage from day 1 - there's already a HTTP verb for moving entities (from WebDAV): MOVE and COPY, it should be trivial to implement.

      • Anonymous commented  ·   ·  Flag as inappropriate

        azure restore did not let me chose the name of my restored VHD. Now I can't generalize the image because the Azure generalize command doesn't like the name that Azure chose while restoring my virtual machine. The fact that Azure thinks it is best to chose names for me is ridiculous. I am an administrator and shouldn't be forced to have UID's in the names of my Azure entities.

      • sandor commented  ·   ·  Flag as inappropriate

        Similar need as the nuget team, I have some files staged in on directory and I need to move them to the final one without a download/upload op

      • Yishai Galatzer commented  ·   ·  Flag as inappropriate

        This is a really useful feature for us (The NuGet team), we have one main scenario. We want to avoid having to copy large packages over http from a preliminary upload location to the final visible location

      • Erwen commented  ·   ·  Flag as inappropriate

        This is relevant for those of us trying to do automation with IaaS resources. For example, using powershell to restore Azure Backup VM to a storage account results in blobs with random name. Also, provisioning a VM from a custom image results in random vhd file names.

      Feedback and Knowledge Base