azure-blob-container-download
Download blobs from an Azure container.
A simple, cross-platform tool to bulk-download blobs from an Azure storage container.
Though limited in scope, it does some things official tools don't:
- AzCopy is not cross-platform
- Azure CLI does not bulk-download
- Azure PowerShell is not cross-platform
- Azure Portal does not bulk-download
Install
npm install --global azure-blob-container-download
Options
Usage: abcd [options] Options: --account Storage account (or set AZURE_STORAGE_ACCOUNT) [string] --key Storage access key (or set AZURE_STORAGE_ACCESS_KEY) [string] --containerPattern Regular expression filter for container names [string] --blobPattern Regular expression filter for blob names [string] --startDate Starting date for blobs [string] --endDate Ending date for blobs [string] --snapshots True to include blob snapshots [boolean] --version Show version number [boolean] --help Show help [boolean] Download blobs from an Azure container.https://github.com/DavidAnson/azure-blob-container-download
Examples
Get help:
azure-blob-container-download --help
Or get help using the short name:
abcd --help
Download all blobs in a storage account:
abcd --account ACCOUNT --key KEY
Or set environment variables AZURE_STORAGE_ACCOUNT
and AZURE_STORAGE_ACCESS_KEY
first:
abcd
Include blob snapshots:
abcd --snapshots
Filter by last modified date of each blob:
abcd --startDate 2016-02-13 --endDate 2016-08-04
Filter by container name and/or blob name using regular expressions:
abcd --containerPattern container --blobPattern "blobs?"
Note: Some regular expression characters require escaping on the command line.
The output from azure-blob-container-download
shows when this happens.
For example (Windows):
C:\>abcd --containerPattern ^textDownloading blobs in account from [beginning of time] to [end of time].Listing containers in account matching /text/...
The leading ^
character of the --containerPattern
has been lost by the shell.
It can be recovered by quoting the parameter:
C:\>abcd --containerPattern "^text"Downloading blobs in account from [beginning of time] to [end of time].Listing containers in account matching /^text/...
History
- 0.1.0 - Initial release
- 0.1.1 - Patch for OS X