Azure Blob Store command line tool to download and upload files.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
azrcmd
.gitignore
.travis.yml try to fix the azure dependency Oct 20, 2015
LICENSE
README.md Update README.md Nov 24, 2016
requirements.txt new azure-storage compatibility Mar 3, 2016
setup.py

README.md

azrcmd

Build Status Downloads Version License

Azure Blob Store command line tool to download and upload files. It works in Python 2.7 & 3.3+. This package was crafted for using Azure Blob Store in Linux or OSX! Windows is not supported. It was heavily inspired by s3cmd.

Installation

You can install easily with pip.

$ `sudo -H pip install azrcmd --ignore-installed markerlib`

Note: You won't be able to install it with easy_install because of the incompatibility between setuptools and azure libraries. The upper hack is required because azure-storage is buggy and really hard to install.

Create your configuration file as a bash script or put this information on your .bash_profile.

export AZURE_STORAGE_ACCOUNT=""
export AZURE_STORAGE_ACCESS_KEY=""
export AZURE_STORAGE_MAX_CONNECTIONS=5

Usage

Upload files

You can upload a file easily:

$ azrcmd-put filename wasbc://container/path/filename
$ azrcmd-put filename wasbc://container/path/

Of course, you can upload multiple files with a single command:

$ azrcmd-put filepart* wasbc://container/path/

If you want to upload full directories than you have to define the --recursive parameter.

$ azrcmd-put --recursive dirname/ wasbc://container/path/dirname/

Furthermore, if you want to test the function you can use the --dryrun parameter.

Download files

Download a single file with

$ azrcmd-get wasbc://container/path/filename filename
$ azrcmd-get wasbc://container/path/filename dirname/

Download files and directories with the --prefix parameter.

$ azrcmd-get --prefix wasbc://container/path-prefix dirname/
$ azrcmd-get --prefix wasbc://container/path-prefix/ dirname/

It always override the already existing files! If you want to turn off this behaviour, please use the --skip_existing parameter. Of course, if you only want to download the new or changed blobs than you'd use the --sync attribute. You can test the methods with the --dryrun parameter.

List files

List all blobs with the given prefix.

$ azrcmd-ls wasbc://container/path-prefix

Delete files

Delete a single blob with the following command:

$ azrcmd-rm wasbc://container/path/filename

or multiple blobs with a prefix:

$ azrcmd-rm --prefix wasbc://container/path-prefix

You can test the methods with the --dryrun parameter.

What's next?

  • Add --sync parameter to do not upload or download unchanged files.
  • Symlink support (ignoring circles).
  • etc.

License

Copyright © 2015 Bence Faludi.

Distributed under the MIT License.