Azure Blob Storage Backup Utility

Patrik Lundin,

Download the Azure Blob Backup Utility here
(Download/Clone/Fork Project at BitBucket)

This is a simple command line utility for backing up files to Azure Blob Storage. It's main intended use is for scheduling backups using the task scheduler in windows.

This is only a file backup to and from the blob storage service, there is no support for backing up other services on Azure.

Install and configure:

There is no installer, download the package and unzip it into a folder (for example into C:\Program Files\AzureBlobBackup\).

You can specify your azure account connection string either in the AzureBlobBackup.exe.config or as a command line argument
using the --account switch.

An account connection string consists of your storage account name and the shared key, for example (all on a single line):

"DefaultEndpointsProtocol=http; AccountName=storageaccount; AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="

Sample use:

This is a command line utility, either schedule it using task scheduler or run it manually by opening a command prompt (cmd.exe)

Backup folder "C:\files" to azure container "backup" (account in config file):

AzureBlobBackup.exe --backup --source=C:\files --destination=backup

Backup folder "C:\files" to azure container "backup" (account specified on commandline):

AzureBlobBackup.exe --backup --source=C:\files --destination=backup --account="youraccountconnectionstring"

Restore files from azure container "backup" to "C:\files" (account in config file):

AzureBlobBackup.exe --restore --source=C:\files --destination=backup

Clean files in azure container "backup" that is not in the local folder "C:\files" (account in config file):

AzureBlobBackup.exe --clean --source=C:\files --destination=backup

If you want the utility to write detailed output for each file use the --verbose option. To see all options use the --help option.

AzureBackup.exe Azure Blob Backup Utility
Usage: AzureBackup.exe -b -s  -d 

  -s, --source         Local source directory path

  -d, --destination    Destination container on Azure Blob Storage. For example
                       -d backup

  -i, --include        List of file extensions to include separated by
                       semicolon. For example -i .jpg;.css;.html

  -e, --exclude        List of file extensions to exclude separated by
                       semicolon. For example -e .log;.db;.ini

  -b, --backup         Start a backup of files from local source to destination

  -c, --clean          Clean destination container if file is not in local
                       source folder

  -l, --list           List the destination container

  -r, --restore        Restores files from destination container to local
                       source directory

  -v, --verbose        Print details during execution.

  -t, --threads        Limit number of worker threads, default set to the
                       number of cores on the system

  -a, --account        Account connection string to use, overrides default in
                       config file.

  -o, --overwrite      Overwrites the backup without checking last modified

  --delete             Deletes destination container (including blobs in it).
                       Requires confirmation.

  --help               Display this help screen.

License and disclaimer:

This utility and source code is released under the Microsoft Public License (Ms-PL)