Страница:
AzCopy Set Properties
Страницы
Adjust throughput of a transfer in progress
AzCopy Set Properties
Azure Storage Data Encryption with Customer Provided Keys
Copy from AWS S3
Copy from Google Cloud Storage
Cost of data transfers
Custom mime mapping
Data integrity and validation
Disk and service constraint indicators in AzCopy
Easily download a list of files from CSV
Home
How to create test data
How to use blob index tag feature in AzCopy
How to use blob versioning feature in AzCopy
Improved login support for AzCopy commands (with in memory secret store)
Listing specific files to transfer
Load data into Blob Container in the CLFS format
Performance: Large files in general
Performance: large files on Linux
Performance: small blobs
Private endpoints
Reading from custom URL or CDN
Resilliency: automatic retries
Resilliency: resume or restart a failed job
Scenarios Not Supported by AzCopy
Security of SAS tokens on Linux
Sync command guide
Troubleshooting FAQ
2
AzCopy Set Properties
Mohit Sharma редактировал(а) эту страницу 2022-07-04 10:35:04 +05:30
Содержание
- Changing tier on blob
- To change tier of a block blob
- To change tier of a page blob
- To recursively change tier of all the blobs in a directory
- Changing Blob Index Tags
- To Change blob-index-tags of a blob to {key = "abc", val = "def"} and {key = "ghi", val = "jkl"}
- To recursively change blob-index-tags of all the blobs in a directory, use --recursive flag.
- Removing Blob Index Tags
- To remove/clear existing blob-index-tags from blob
- To recursively remove/clear existing blob-index-tags from all the blobs in a directory
- Changing Metadata
- To change the metadata of blob to {key = "abc", val = "def"} and {key = "ghi", val = "jkl"}
- To recursively change the metadata of all files in a directory to {key = "abc", val = "def"} and
- Removing Metadata
AzCopy supports setting properties on the given location (Blob, File, ADLS Gen2) from release 10.16.0 onwards.
At present, we support setting following properties :-
Changing tier on blob
To change tier of a block blob
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --block-blob-tier=[Hot/Cool/Archive]--rehydrate-priority=[Standard/High]
To change tier of a page blob
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --page-blob-tier=[P10/P15/P20/P30/P4/P40/P50/P6]--rehydrate-priority=[Standard/High]
To recursively change tier of all the blobs in a directory
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/directory]" --recursive --block-blob-tier=[Hot/Cool/Archive]--rehydrate-priority=[Standard/High]
Note:
- A blob in the Archive tier is offline — that is, it cannot be read or modified — until it is rehydrated. The rehydration process can take several hours and has associated costs. Please read the public documentation before proceeding.
- The default rehydration priority is set to STANDARD.
- If you are using DFS endpoint, it will be replaced by equivalent blob endpoints.
To learn more, refer to the public documentations here :-
- Overview of Blob access tiers
- Set a blob's access tier
- Archive a blob, Blob rehydration from the Archive tier
- Rehydrate an archived blob to an online tier
Changing Blob Index Tags
To Change blob-index-tags of a blob to {key = "abc", val = "def"}
and {key = "ghi", val = "jkl"}
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --blob-tags=abc=def&ghi=jkl
To recursively change blob-index-tags of all the blobs in a directory, use --recursive
flag.
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/directory]" --recursive --blob-tags=abc=def&ghi=jkl
Removing Blob Index Tags
To remove/clear existing blob-index-tags from blob
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --blob-tags=clear
To recursively remove/clear existing blob-index-tags from all the blobs in a directory
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/directory]" --recursive --blob-tags=clear
Note:
- Blob tags are a property of blobs only. So when setting blob tags, location must always be Blob / ADLS Gen2.
- If you are using DFS endpoint, it will be replaced by equivalent blob endpoints.
- Keys and values are URL encoded and the key-value pairs are separated by an ampersand('&')
- Setting blob index tags can be performed by the Storage Blob Data Owner and by anyone with a Shared Access Signature that has permission to access the blob's tags (the t SAS permission).
- In addition, RBAC users with the Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write permission can perform this operation.
- Caution: AzCopy does not append blob-tags to existing blob-tags. The default behaviour is to clear the existing blob-tags and apply the provided blob-tags.
Changing Metadata
To change the metadata of blob to {key = "abc", val = "def"}
and {key = "ghi", val = "jkl"}
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --metadata=abc=def;ghi=jkl
To recursively change the metadata of all files in a directory to {key = "abc", val = "def"} and
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/virtual/dir]" --recursive --metadata=abc=def;ghi=jkl
Removing Metadata
To remove/clear all existing metadata from blob
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --metadata=clear
To recursively remove/clear all existing metadata from all files in a directory
azcopy setprops "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --recursive --metadata=clear
Note:
- Metadata follows C# based naming convention.
- Setting and retrieving properties and metadata for Blob service resources
- Caution: AzCopy does not append metadata to existing metadata. The default behaviour is to clear the existing metadata and apply the given metadata.