GithubHelp home page GithubHelp logo

davidanson / azure-blob-container-download Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 0.0 12 KB

A simple, cross-platform tool to bulk-download blobs from an Azure storage container.

License: MIT License

JavaScript 100.00%

azure-blob-container-download's Introduction

azure-blob-container-download

Download blobs from an Azure container.

npm version GitHub tag License

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:

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 ^text
Downloading 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

azure-blob-container-download's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

azure-blob-container-download's Issues

containerPattern issue

Funny how just yesterday I was discussing the need for something like this with a colleague...this is awesome, thanks!

One thing I noticed is that when I set --containerPattern ^published it seems to be ignoring the start uniqueness constraint. So it's downloading both my "published" and "unpublished" containers. I believe it should only find containers that start with published.

thanks!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.