1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/windows/azcopy.md

29 lines
1.1 KiB
Markdown
Raw Normal View History

2020-10-12 11:53:17 +08:00
# azcopy
> A file transfer tool for uploading to Azure Cloud Storage Accounts.
> More information: <https://docs.microsoft.com/azure/storage/common/storage-use-azcopy-v10>.
- Log in to an Azure Tenant:
2020-10-12 11:53:17 +08:00
`azopy login`
- Upload a local file:
`azcopy copy '{{path/to/source/file}}' 'https://{{storage_account_name}}.blob.core.windows.net/{{container_name}}/{{blob_name}}'`
2020-10-12 11:53:17 +08:00
- Upload files with `.txt` and `.jpg` extensions:
`azcopy copy '{{path/to/source}}' 'https://{{storage_account_name}}.blob.core.windows.net/{{container_name}}' --include-pattern '{{*.txt;*.jpg}}'`
2020-10-12 11:53:17 +08:00
- Copy a container directly between two Azure storage accounts:
`azcopy copy 'https://{{source_storage_account_name}}.blob.core.windows.net/{{container_name}}' 'https://{{destination_storage_account_name}}.blob.core.windows.net/{{container_name}}'`
2020-10-12 11:53:17 +08:00
- Synchronize a local directory and delete files in the destination if they no longer exist in the source:
2020-10-12 11:53:17 +08:00
`azcopy sync '{{path/to/source}}' 'https://{{storage_account_name}}.blob.core.windows.net/{{container_name}}' --recursive --delete-destination=true`
2020-10-12 11:53:17 +08:00
- Display detailed usage information:
`azcopy --help`