En el archivado masivo (Bulk archive) de Blobs, ¿cómo hago para que ignore los directorios?

Jose Manuel Albarrán 0 Puntos de reputación
2024-07-29T09:41:47.8333333+00:00

English:

I'm trying to bulk move blob objects from cool to archived.

I'm following the tutorial at Bulk Archive

I have two problems:

If you follow the tutorial, it only moves 5000 objects. I have changed it to

az storage blob list --account-name $accountName --account-key $key --container-name $containerName --prefix $folderName --query "[?properties.blobTier == 'Cool'].name" --num-results "*" --output tsv | xargs -I {} -P 10 az storage blob set-tier --account-name $accountName --account-key $key --container-name $containerName --tier Archive --name "{}"

But I still have the problem that the subdirectories try to move them and they generate an error

The requested operation is not supported on a directory.

RequestId:d8a62dd3-401e-0046-489b-e1d5ea000000

Time:2024-07-29T09:40:50.0194384Z

ErrorCode:OperationNotSupportedOnDirectory

Any help (for the second point) will be welcome


Estoy intentando mover masivamente objetos blob desde el almacenamiento esporádico ("Cool") a archivado ("Archive").

Estoy siguiendo el tutorial en Bulk Archive

Tengo dos problemas:

  1. Si sigues el tutorial, solo mueve 5000 objetos. Lo he cambiado a

az storage blob list --account-name $accountName --account-key $key --container-name $containerName --prefix $folderName --query "[?properties.blobTier == 'Cool'].name" --num-results "*" --output tsv | xargs -I {} -P 10 az storage blob set-tier --account-name $accountName --account-key $key --container-name $containerName --tier Archive --name "{}"

  1. Pero sigo teniendo el problema que los subdirectorios los intenta mover y generan un error

The requested operation is not supported on a directory.

RequestId:d8a62dd3-401e-0046-489b-e1d5ea000000

Time:2024-07-29T09:40:50.0194384Z

ErrorCode:OperationNotSupportedOnDirectory

Cualquier ayuda (para el segundo punto) será bienvenida

Azure
Azure
Plataforma e infraestructura de informática en la nube para crear, implementar y administrar aplicaciones y servicios a través de una red mundial de centros de datos administrados por Microsoft.
499 preguntas
{count} votos

1 respuesta

Ordenar por: Muy útil
  1. KarishmaTiwari-MSFT 20,312 Puntos de reputación Empleado de Microsoft
    2024-08-05T22:14:28.8966667+00:00

    It looks like you’re encountering an issue because the command is trying to move directories, which aren’t supported. To avoid this, you can filter out directories from your list of blobs before attempting to change their tier. filter to only include blobs of type BlockBlob, which should exclude directories. Try this and let me know the results.

    --query "[?properties.blobTier == 'Cool' && properties.blobType == 'BlockBlob']
    
    0 comentarios No hay comentarios

Su respuesta

Las respuestas se pueden marcar como respuestas aceptadas por el autor de la pregunta, lo que ayuda a los usuarios a conocer la respuesta que resolvió el problema del autor.