Azure Storage Blob Overwrite on Archive


i have a file which is on Azure Blob on Archive tier.
I take backup of this file from a Linux box and it is my etc folder gziped.

It seems though that it doesn’t like the overwrite on Archive tier.
If I delete the file on the blob storage I can then upload it again.
Is there a way for Archive blob to automatically delete the file and reupload instead of trying ovewrite?
The error occurs on rclone sync function.

2019/04/21 17:34:08 Failed to sync: ->, /home/travis/gopath/src/
===== RESPONSE ERROR (ServiceCode=BlobArchived) =====
Description=This operation is not permitted on an archived blob.
Time:2019-04-21T14:34:08.8081963Z, Details:
   Code: BlobArchived
   PUT https://******
   Authorization: REDACTED
   Content-Length: [462004]
   User-Agent: [rclone/v1.47.0]
   X-Ms-Client-Request-Id: [f8a54f2c-63bb-4775-4bea-1b707623d3b7]
   X-Ms-Date: [Sun, 21 Apr 2019 14:34:08 GMT]
   X-Ms-Version: [2018-03-28]
   RESPONSE Status: 409 This operation is not permitted on an archived blob.
   Content-Length: [233]
   Content-Type: [application/xml]
   Date: [Sun, 21 Apr 2019 14:34:07 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [BlobArchived]
   X-Ms-Request-Id: [48479777-d01e-008f-1d4f-f825c9000000]
   X-Ms-Version: [2018-03-28]

Interesting… The docs agree too.

While a blob is in archive storage, the blob data is offline and cannot be read, copied, overwritten, or modified.

But it can be deleted?

I guess rclone could check to see the tier of the blob before updating it and delete it first if it is an archive blob.

Do you think most people would want that? Or is the point of archive blobs that you don’t modify them?

It seems that the solution to overwriting your archives and keeping them at the same time is soft delete.
Users can enable soft delete if they want to return the archives.
But I would say yes to your question.
When you select to sync you want to overwrite (if needed), so i would expect rclone to delete then upload to go avoid the error.

For example I’m syncing and archiving web sites that rarely change. Now I’m at a position that files have changed and I hadn’t realised that I was getting an error so my backups are out of sync.

I don’t know if someone will want to keep the existing behaviour but they can always enable soft delete…

How do you enable soft delete?

Do you want to make a new issue on github about that?

At minimum we should put some stuff in the docs about soft delete.

It is an option in the portal - click it and you are done.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.