0.1.0-beta.2 • Published 6 years ago

@simplrjs/azure-storage-backup v0.1.0-beta.2

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

@simplrjs/azure-storage-backup

CLI tool to backup Azure storage account to file system.

Get started

npm install @simplrjs/azure-storage-backup -g

Features

  • Retrieves statistics of your Azure storage account.
  • Downloads blobs from Azure storage account.
  • Checks for missing files in your file system after download.
  • Allows you to define a count of downloads performed concurrently.
  • Allows you to define a count of failed download retries.

Command line

Usage

azure-storage-backup -h

Commands

CommandDescription
initGenerates a configuration file.
statsProvides a statistics about blobs in Azure Storage account containers.
checkChecks if all blobs from Azure Storage were downloaded to your file system.
syncDownloads all blobs that are missing in your file system.

Arguments

ArgumentTypeDefaultDescription
configstringprocess.cwd();Config file path.
containerstring-Performs an action on a specific container instead of all Azure storage account.
noCachebooleanfalsePrevents using cached values from previously performed actions.

Config

You can generate configuration using CLI command init:

azure-storage-backup init

It will also add a JSON schema to your generated configuration JSON.

Default configuration file name is backup.config.json.

PropertyTypeDefaultDescription
storageAccount(*)string-Name of your Azure storage account.
storageAccessKey(*)string-A key to access your Azure storage account.
storageHoststring-Azure storage account host.
outDirstringprocess.cwd();An output directory for downloaded blobs from your storage account.
maxRetriesCountnumber3Max retries count for failed operations (container blobs list fetching or blobs downloading).
logPathstringprocess.cwd();(1)Path to log file.
simultaneousDownloadsCountnumber5Count of concurrently performed blob downloads.
noLogFilebooleanfalsePrevents to logging CLI activities to a log file.

(*) - Required properties.

(1) - Default log file name is .backup-log.