-
Notifications
You must be signed in to change notification settings - Fork 263
azcopy_set properties
GitHub Action edited this page Feb 4, 2026
·
58 revisions
Given a location, change all the valid system properties of that storage (blob or file)
Sets properties of Blob, Data Lake Storage, and File storage. The properties currently supported by this command are:
Blobs -> Tier, Metadata, Tags
Data Lake Storage -> Tier, Metadata, Tags
Files -> Metadata
Note: dfs endpoints will be replaced by blob endpoints.
azcopy set-properties [source]Change tier of blob to hot:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --block-blob-tier=hot
Change tier of blob to cold:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --block-blob-tier=cold
Change tier of blob from hot to Archive:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --block-blob-tier=archive
Change tier of blob from archive to cool with rehydrate priority set to high:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --block-blob-tier=cool --rehydrate-priority=high
Change tier of blob from cool to hot with rehydrate priority set to standard:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --block-blob-tier=hot --rehydrate-priority=standard
Change tier of all files in a directory to archive:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/virtual/dir]" --block-blob-tier=archive --recursive=true
Change tier of a page blob:
- azcopy set-properties "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]
Change metadata of blob to {key = "abc", val = "def"} and {key = "ghi", val = "jkl"}:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --metadata=abc=def;ghi=jkl
Change metadata of all files in a directory to {key = "abc", val = "def"} and {key = "ghi", val = "jkl"}:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/virtual/dir]" --metadata=abc=def;ghi=jkl --recursive=true
Clear all existing metadata of blob:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --metadata=clear
Clear all existing metadata from all files:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --recursive --metadata=clear
Change blob-tags of blob to {key = "abc", val = "def"} and {key = "ghi", val = "jkl"}:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --blob-tags=abc=def&ghi=jkl
- While setting tags on the blobs, there are additional permissions('t' for tags) in SAS without which the service will give authorization error back.
Clear all existing blob-tags of blob:
- azcopy set-properties "https://[account].blob.core.windows.net/[container]/[path/to/blob]" --blob-tags=clear
- While setting tags on the blobs, there are additional permissions('t' for tags) in SAS without which the service will give authorization error back.
| Flag | Type | Default | Description |
|---|---|---|---|
--blob-tags |
string | `` | Set tags on blobs to categorize data in your storage account (separated by '&') |
--block-blob-tier |
string | None |
Changes the access tier of the block blobs to the given tier. (default 'None'). Valid options are Hot, Cold, Cool, Archive |
--dry-run |
bool | false |
Prints the file paths that would be affected by this command. This flag does not affect the actual files. |
--exclude-path |
string | `` | Exclude these paths when removing. This option does not support wildcard characters (*). Checks relative path prefix. For example: myFolder;myFolder/subDirName/file.pdf |
--exclude-pattern |
string | `` | Exclude files where the name matches the pattern list. For example: .jpg;.pdf;exactName |
--from-to |
string | `` | Optionally specifies the source destination combination. Valid values : BlobNone, FileNone, BlobFSNone |
--include-path |
string | `` | Include only these paths when setting property. This option does not support wildcard characters (*). Checks relative path prefix. For example: myFolder;myFolder/subDirName/file.pdf |
--include-pattern |
string | `` | Include only files where the name matches the pattern list. For example: .jpg;.pdf;exactName |
--list-of-files |
string | `` | Defines the location of text file which has the list of only files to be copied. |
--metadata |
string | `` | Set the given location with these key-value pairs (separated by ';') as metadata. |
--page-blob-tier |
string | None |
Changes the access tier of the page blobs to the given tier. (default 'None'). Valid options are P10, P15, P20, P30, P4, P40, P50, P6 |
--recursive |
bool | false |
Look into sub-directories recursively when uploading from local file system. |
--rehydrate-priority |
string | Standard |
Optional flag that sets rehydrate priority for rehydration. Valid values: Standard, High. Default- standard |
--trailing-dot |
string | `` | 'Enable' by default to treat file share related operations in a safe manner. Available options: Enable, Disable, AllowToUnsafeDestination. Choose 'Disable' to go back to legacy (potentially unsafe) treatment of trailing dot files where the file service will trim any trailing dots in paths. This can result in potential data corruption if the transfer contains two paths that differ only by a trailing dot (ex: mypath and mypath.). If this flag is set to 'Disable' and AzCopy encounters a trailing dot file, it will warn customers in the scanning log but will not attempt to abort the operation. If the destination does not support trailing dot files (Windows or Blob Storage), AzCopy will fail if the trailing dot file is the root of the transfer and skip any trailing dot paths encountered during enumeration. |
These options are inherited from parent commands.
| Flag | Type | Default | Description |
|---|---|---|---|
--await-continue |
bool | false |
Used when debugging, to tell AzCopy to await continue on stdin before starting any work. Assists with debugging AzCopy via attach-to-process |
--await-open |
bool | false |
Used when debugging, to tell AzCopy to await open on stdin, after scanning but before opening the first file. Assists with testing cases around file modifications between scanning and usage |
--cap-mbps |
float64 | 0 |
Caps the transfer rate, in megabits per second. Moment-by-moment throughput might vary slightly from the cap. If this option is set to zero, or it is omitted, the throughput isn't capped. |
--check-version |
bool | false |
Check if a newer AzCopy version is available. |
--debug-skip-files |
string | `` | Used when debugging, to tell AzCopy to cancel the job midway. List of relative paths to skip in the STE. |
--log-level |
string | INFO |
Define the log verbosity for the log file, available levels: DEBUG(detailed trace), INFO(all requests/responses), WARNING(slow responses), ERROR(only failed requests), and NONE(no output logs). (default 'INFO'). |
--output-level |
string | default |
Define the output verbosity. Available levels: essential, quiet. |
--output-type |
string | text |
Format of the command's output. The choices include: text, json. The default value is 'text'. |
--trusted-microsoft-suffixes |
string | `` | Specifies additional domain suffixes where Azure Active Directory login tokens may be sent. The default is '.core.windows.net;.core.chinacloudapi.cn;.core.cloudapi.de;.core.usgovcloudapi.net;*.storage.azure.net'. Any listed here are added to the default. For security, you should only put Microsoft Azure domains here. Separate multiple entries with semi-colons. |
Parent command: azcopy