-
Notifications
You must be signed in to change notification settings - Fork 227
azcopy_set properties
GitHub Action edited this page Jan 25, 2025
·
20 revisions
Given a location, change all the valid system properties of that storage (blob or file)
Sets properties of Blob, ADLS Gen2, and File storage. The properties currently supported by this command are:
Blobs -> Tier, Metadata, Tags
ADLS Gen2 -> Tier, Metadata, Tags
Files -> Metadata
Note: dfs endpoints will be replaced by blob endpoints.
azcopy set-properties [source] [flags]
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.
--blob-tags string Set tags on blobs to categorize data in your storage account (separated by '&')
--block-blob-tier string Changes the access tier of the block blobs to the given tier. (default 'None'). Valid options are Hot, Cold, Cool, Archive (default "None")
--dry-run 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
-h, --help help for set-properties
--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 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 (default "None")
--recursive Look into sub-directories recursively when uploading from local file system.
--rehydrate-priority string Optional flag that sets rehydrate priority for rehydration. Valid values: Standard, High. Default- standard (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.
--cap-mbps float 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.
--log-level string 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'). (default "INFO")
--output-level string Define the output verbosity. Available levels: essential, quiet. (default "default")
--output-type string Format of the command's output. The choices include: text, json. The default value is 'text'. (default "text")
--skip-version-check Do not perform the version check at startup. Intended for automation scenarios & airgapped use.
--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.
- azcopy - AzCopy is a command line tool that moves data into and out of Azure Storage.